threads / discuss / 28164

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

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

## tl;dr

8 messages between Aug 19, 2011 and Aug 19, 2011.

replies: 7people: 5as markdown or json

Sorin Sbarnea· Aug 19, 2011, 16:31 UTC · lore
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,
-- 
Sorin Sbarnea
David Aguilar· Aug 19, 2011, 20:58 UTC · re: Sorin Sbarnea · lore

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

On Aug 19, 2011, at 9:31 AM, Sorin Sbarnea <sorin.sbarnea@gmail.com> wrote:
Show 20 quoted lines
> 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,
> -- 
> Sorin Sbarnea
Did you upgrade to lion from a system where you were building previously? Did you try "make clean"?
-- 
                                        David
Sorin Sbarnea· Aug 19, 2011, 21:43 UTC · re: David Aguilar · lore

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

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.

-- 
Sorin Sbarnea

On Fri, Aug 19, 2011 at 21:58, David Aguilar <davvid@gmail.com> wrote:
> On Aug 19, 2011, at 9:31 AM, Sorin Sbarnea <sorin.sbarnea@gmail.com> wrote:
>
>> 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,
>> --
>> Sorin Sbarnea
>
> Did you upgrade to lion from a system where you were building previously? Did you try "make clean"?
>
> --
>                                        David
Thomas Rast· Aug 19, 2011, 22:12 UTC · re: Sorin Sbarnea · lore

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

Sorin Sbarnea wrote:
Show 7 quoted lines
> 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?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Brandon Casey· Aug 19, 2011, 22:19 UTC · re: Thomas Rast · lore

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

On 08/19/2011 05:12 PM, Thomas Rast wrote:
Show 18 quoted lines
> Sorin Sbarnea wrote:
>> 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?
Probably MakeMaker.
Setting NO_PERL_MAKEMAKER may help:
   rm perl/perl.mak
   make NO_PERL_MAKEMAKER=1
-Brandon
Sorin Sbarnea· Aug 19, 2011, 22:27 UTC · re: Brandon Casey · lore

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

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

On Fri, Aug 19, 2011 at 23:19, Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> wrote:

Show 29 quoted lines
> On 08/19/2011 05:12 PM, Thomas Rast wrote:
>> Sorin Sbarnea wrote:
>>> 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?
>
> Probably MakeMaker.
>
> Setting NO_PERL_MAKEMAKER may help:
>
>   rm perl/perl.mak
>   make NO_PERL_MAKEMAKER=1
>
> -Brandon
>
Junio C Hamano· Aug 19, 2011, 22:42 UTC · re: Sorin Sbarnea · lore

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

Sorin Sbarnea <sorin.sbarnea@gmail.com> writes:
Show 11 quoted lines
> On Fri, Aug 19, 2011 at 23:19, Brandon Casey
>> 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.
Brandon Casey· Aug 19, 2011, 22:57 UTC · re: Junio C Hamano · lore

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

On 08/19/2011 05:42 PM, Junio C Hamano wrote:
Show 21 quoted lines
> Sorin Sbarnea <sorin.sbarnea@gmail.com> writes:
> 
>> On Fri, Aug 19, 2011 at 23:19, Brandon Casey
>>> 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.

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.

Earlier he said:
>> 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

← back to recent threads