Skip to contentSkip to conversation

Unable to build git on Lion - missing config.h from Perl header files

DISCUSSION Thomas Rast 5 participants 8 messages Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi,

I came across the following problem while trying to build git (1.7.6) on Lion
https://github.com/mxcl/homebrew/issues/7091

The only files existing in /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/ are libperl.dylib andperl.h.

make[2]: *** No rule to make target /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/config.h', needed by perl.mak'. Stop.
make[1]: *** [instlibdir] Error 2

If possible it would be a good idea to continue the discussion on homebrew bug tracker

Thanks,

Signature · 1 line
Sorin Sbarnea
#2 lore raw
Quoted 14 lines · Sorin Sbarnea

Hi,

I came across the following problem while trying to build git (1.7.6) on Lion
https://github.com/mxcl/homebrew/issues/7091

The only files existing in /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/ are libperl.dylib andperl.h.

make[2]: *** No rule to make target /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/config.h', needed by perl.mak'. Stop.
make[1]: *** [instlibdir] Error 2

Quoted 6 lines

If possible it would be a good idea to continue the discussion on homebrew bug tracker

Thanks,

Signature · 1 line
Sorin Sbarnea

Did you upgrade to lion from a system where you were building previously? Did you try "make clean"?

Signature · 1 line
                                        David
#3 lore raw

This was a clean-new Lion install, not an upgrade. I just installed Xcode on alternate location /Developer41 instead of /Developer

Yes, I did a make clean but it has no effect.

The problem is that on Lion there is no config.h in the perl directory, only a perl.h file.

Signature · 1 line
Sorin Sbarnea
Quoted 27 lines · David Aguilar
Quoted 14 lines · Sorin Sbarnea

Hi,

I came across the following problem while trying to build git (1.7.6) on Lion
https://github.com/mxcl/homebrew/issues/7091

The only files existing in /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/ are libperl.dylib andperl.h.

make[2]: *** No rule to make target /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/config.h', needed by perl.mak'.  Stop.
make[1]: *** [instlibdir] Error 2

Quoted 6 lines

If possible it would be a good idea to continue the discussion on homebrew bug tracker

Thanks,
--
Sorin Sbarnea

Did you upgrade to lion from a system where you were building previously? Did you try "make clean"?

--
                                       David

#4 lore raw
Quoted 7 lines · Sorin Sbarnea

This was a clean-new Lion install, not an upgrade. I just installed Xcode on alternate location /Developer41 instead of /Developer

Yes, I did a make clean but it has no effect.

The problem is that on Lion there is no config.h in the perl directory, only a perl.h file.

Color me puzzled, but where is it getting the config.h idea from?

  $ git grep config\\.h
  compat/fnmatch/fnmatch.c:# include <config.h>
  compat/regex/regex.c:#include "config.h"
  t/t4014-format-patch.sh:test_expect_success '--no-add-headers overrides config.headers' '

Similarly, 'git grep config perl' only turns up matches in perl code. So what tells it to use config.h?

Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.ch
#5 lore raw
Quoted 11 lines · Thomas Rast
Quoted 7 lines · Sorin Sbarnea

This was a clean-new Lion install, not an upgrade. I just installed Xcode on alternate location /Developer41 instead of /Developer

Yes, I did a make clean but it has no effect.

The problem is that on Lion there is no config.h in the perl directory, only a perl.h file.

Color me puzzled, but where is it getting the config.h idea from?

Quoted 7 lines
  $ git grep config\\.h
  compat/fnmatch/fnmatch.c:# include <config.h>
  compat/regex/regex.c:#include "config.h"
  t/t4014-format-patch.sh:test_expect_success '--no-add-headers overrides config.headers' '

Similarly, 'git grep config perl' only turns up matches in perl code. So what tells it to use config.h?

Probably MakeMaker.

Setting NO_PERL_MAKEMAKER may help:

rm perl/perl.mak
make NO_PERL_MAKEMAKER=1

-Brandon

#6 lore raw

I confirm that this workaround solved the problem. Now the question is what should be changed so git will be installed (and build) without problems by homebrew?

Thanks
Sorin Sbarnea

Quoted 29 lines · Brandon Casey
Quoted 11 lines · Thomas Rast
Quoted 7 lines · Sorin Sbarnea

This was a clean-new Lion install, not an upgrade. I just installed Xcode on alternate location /Developer41 instead of /Developer

Yes, I did a make clean but it has no effect.

The problem is that on Lion there is no config.h in the perl directory, only a perl.h file.

Color me puzzled, but where is it getting the config.h idea from?

Quoted 7 lines
  $ git grep config\\.h
  compat/fnmatch/fnmatch.c:# include <config.h>
  compat/regex/regex.c:#include "config.h"
  t/t4014-format-patch.sh:test_expect_success '--no-add-headers overrides config.headers' '

Similarly, 'git grep config perl' only turns up matches in perl code. So what tells it to use config.h?

Probably MakeMaker.

Setting NO_PERL_MAKEMAKER may help:

  rm perl/perl.mak
  make NO_PERL_MAKEMAKER=1

-Brandon

#7 lore raw
Quoted 11 lines · Sorin Sbarnea

On Fri, Aug 19, 2011 at 23:19, Brandon Casey

Quoted 7 lines

Probably MakeMaker.

Setting NO_PERL_MAKEMAKER may help:

  rm perl/perl.mak
  make NO_PERL_MAKEMAKER=1

I confirm that this workaround solved the problem. Now the question is what should be changed so git will be installed (and build) without problems by homebrew?

If the user's distro does not have packaged makemaker, or if the user chooses not to install it, then the build procedure of git can be told to avoid using it, which is what you did. So there is nothing to fix there.

If you are not going to tell git to avoid makemaker, in other words, if you want to use makemaker, then installing it before starting the build procedure would help, too. But that is outside the scope of git project.

Please do not top post.

#8 lore raw
Quoted 14 lines · Junio C Hamano
Quoted 11 lines · Sorin Sbarnea

On Fri, Aug 19, 2011 at 23:19, Brandon Casey

Quoted 7 lines

Probably MakeMaker.

Setting NO_PERL_MAKEMAKER may help:

rm perl/perl.mak
make NO_PERL_MAKEMAKER=1

I confirm that this workaround solved the problem. Now the question is what should be changed so git will be installed (and build) without problems by homebrew?

Quoted 7 lines

If the user's distro does not have packaged makemaker, or if the user chooses not to install it, then the build procedure of git can be told to avoid using it, which is what you did. So there is nothing to fix there.

If you are not going to tell git to avoid makemaker, in other words, if you want to use makemaker, then installing it before starting the build procedure would help, too. But that is outside the scope of git project.

I got the impression that his system did have makemaker, and that it created the perl.mak file, but then building git failed because some header files were missing from his perl installation.

Quoted 3 lines · Earlier he
Quoted 3 lines

The only files existing in /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/ are libperl.dylib andperl.h.

I don't have access to a mac, but on my system I have many header files in .../x86_64-linux-thread-multi/CORE/ including config.h. These files are part of the base perl installation rpm (i.e. not some -devel rpm).

But like you said, there is nothing to fix on the git side of things.

-Brandon