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

8 messages from 2011-08-19 to 2011-08-19. Participants: Sorin Sbarnea, David Aguilar, Thomas Rast, Brandon Casey, Junio C Hamano.
Thread: https://gitlist.dev/t/28164

## Sorin Sbarnea, 2011-08-19 16:31

Subject: Unable to build git on Lion - missing config.h from Perl header files
Message-ID: <CAGDPfJr01SPXvqDkYwingJ0Vu9DZx7GXO4G2uhFFfOWPvm1Rgw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGDPfJr01SPXvqDkYwingJ0Vu9DZx7GXO4G2uhFFfOWPvm1Rgw%40mail.gmail.com
In-Reply-To: <611AB1F99D784B92B1F7278139D6EED5@gmail.com>

```
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, 2011-08-19 20:58

Subject: Re: Unable to build git on Lion - missing config.h from Perl header files
Message-ID: <9B588F2F-ACDF-4DA7-BE30-E075CA729731@gmail.com>
URL: https://gitlist.dev/e/9B588F2F-ACDF-4DA7-BE30-E075CA729731%40gmail.com
In-Reply-To: <CAGDPfJr01SPXvqDkYwingJ0Vu9DZx7GXO4G2uhFFfOWPvm1Rgw@mail.gmail.com>

```
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
```

## Sorin Sbarnea, 2011-08-19 21:43

Subject: Re: Unable to build git on Lion - missing config.h from Perl header files
Message-ID: <CAGDPfJoG_ksfL5vqzGWe5jqW646CKB=Qxm9_G5d=ZHMWfixweA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGDPfJoG_ksfL5vqzGWe5jqW646CKB%3DQxm9_G5d%3DZHMWfixweA%40mail.gmail.com
In-Reply-To: <9B588F2F-ACDF-4DA7-BE30-E075CA729731@gmail.com>

```
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, 2011-08-19 22:12

Subject: Re: Unable to build git on Lion - missing config.h from Perl header files
Message-ID: <201108200012.17580.trast@student.ethz.ch>
URL: https://gitlist.dev/e/201108200012.17580.trast%40student.ethz.ch
In-Reply-To: <CAGDPfJoG_ksfL5vqzGWe5jqW646CKB=Qxm9_G5d=ZHMWfixweA@mail.gmail.com>

```
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?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```

## Brandon Casey, 2011-08-19 22:19

Subject: Re: Unable to build git on Lion - missing config.h from Perl header files
Message-ID: <6LbwaepC5kIygT8uWl1Wf2A7S_AD1YkTya7FLCpDK4LOS7CNxjOveFLpzZtHv0dg_JJ8l78oW6XVugLUDAHkvBFItwH2yzYH6BgRAAZkFuM@cipher.nrlssc.navy.mil>
URL: https://gitlist.dev/e/6LbwaepC5kIygT8uWl1Wf2A7S_AD1YkTya7FLCpDK4LOS7CNxjOveFLpzZtHv0dg_JJ8l78oW6XVugLUDAHkvBFItwH2yzYH6BgRAAZkFuM%40cipher.nrlssc.navy.mil
In-Reply-To: <201108200012.17580.trast@student.ethz.ch>

```
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

```

## Sorin Sbarnea, 2011-08-19 22:27

Subject: Re: Unable to build git on Lion - missing config.h from Perl header files
Message-ID: <CAGDPfJpSVknybUjUsHkb1Mb8_SqQxJB2idRTxxfsT8eRSA91CQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAGDPfJpSVknybUjUsHkb1Mb8_SqQxJB2idRTxxfsT8eRSA91CQ%40mail.gmail.com
In-Reply-To: <6LbwaepC5kIygT8uWl1Wf2A7S_AD1YkTya7FLCpDK4LOS7CNxjOveFLpzZtHv0dg_JJ8l78oW6XVugLUDAHkvBFItwH2yzYH6BgRAAZkFuM@cipher.nrlssc.navy.mil>

```
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:
> 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, 2011-08-19 22:42

Subject: Re: Unable to build git on Lion - missing config.h from Perl header files
Message-ID: <7vk4a910rd.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vk4a910rd.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CAGDPfJpSVknybUjUsHkb1Mb8_SqQxJB2idRTxxfsT8eRSA91CQ@mail.gmail.com>

```
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.

Please do not top post.

```

## Brandon Casey, 2011-08-19 22:57

Subject: Re: Unable to build git on Lion - missing config.h from Perl header files
Message-ID: <3TtrXbFVbVBpoFp03GzorAbFk1nah9JWGbzZoev7ibqE4phUwUuQOxugdF7MaGB4A7t5rxO6zbw9rxO2xRnaY15F4dNLwBGhb-XCgbYKZ1E@cipher.nrlssc.navy.mil>
URL: https://gitlist.dev/e/3TtrXbFVbVBpoFp03GzorAbFk1nah9JWGbzZoev7ibqE4phUwUuQOxugdF7MaGB4A7t5rxO6zbw9rxO2xRnaY15F4dNLwBGhb-XCgbYKZ1E%40cipher.nrlssc.navy.mil
In-Reply-To: <7vk4a910rd.fsf@alter.siamese.dyndns.org>

```
On 08/19/2011 05:42 PM, Junio C Hamano wrote:
> 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

```
