git does not install on Lion - missing Perl 5.12 header files #7091

Closed
ssbarnea opened this Issue Aug 19, 2011 · 17 comments

Comments

Projects
None yet
8 participants

The bug was reproduced with Xcode 4.1 and 4.2 b5 on Lion.

I suspect that the problem does appear because all copies of Xcode were installed in alternative locations instead of the default one: /Developer - while this is a perfect normal scenario many developers wrongly uses hardcoded paths.

Full logs available at https://gist.github.com/1156431

In fact this seams to be a problem common for many people, related to Perl header files.

The only files existing in /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/ are libperl.dylib and perl.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
Contributor

jacknagel commented Aug 19, 2011

Perhaps the Git devs need to be made aware of this, then (git@vger.kernel.org)?

Contributor

adamv commented Aug 19, 2011

I'd recommend reporting this upstream to git as well.

It seams that by doing this git will build, but I don't know how to to modify brew recipe

rm perl/perl.mak
make NO_PERL_MAKEMAKER=1

ssbarnea closed this Aug 19, 2011

ssbarnea reopened this Aug 19, 2011

Contributor

jacknagel commented Aug 19, 2011

Give

brew install https://raw.github.com/jacknagel/homebrew/673c3d2c383f66928f8d2df9762a4c29a7d1c31c/Library/Formula/git.rb

a try.

Contributor

jacknagel commented Aug 19, 2011

Perhaps the XCode 4 installation doesn't have Perl MakeMaker, but those users who installed over the top of XCode 3 had it left over. Or something.

Contributor

adamv commented Aug 19, 2011

Should we add a brew doctor check for this?

Contributor

jacknagel commented Aug 19, 2011

Possibly, or we could just always build with NO_PERL_MAKEMAKER (if that fixes the reported issue).

It looks to me like we don't lose anything other than the Perl Git interface gets installed directly to lib rather than the site_perl directory.

Contributor

adamv commented Aug 19, 2011

I have no idea what the pros and cons are to that.

Contributor

jacknagel commented Aug 19, 2011

I don't either, but it seems like a brew doctor check is only going to tell them "this is broken, so you have to edit the git formula to build it correctly". Unless you had something else in mind.

Xcode 4.1 is incompatible with lion (brew should give a notice).
Update xcode and launch his installer in your application folder.

If the problem still persist perhaps we should run a clean make.

Contributor

jacknagel commented Aug 24, 2011

Xcode 4.1 is incompatible with lion (brew should give a notice).

Do you mean 3.2.x?

Could someone on Lion please test

brew install https://raw.github.com/jacknagel/homebrew/673c3d2c383f66928f8d2df9762a4c29a7d1c31c/Library/Formula/git.rb

preferably someone who has a clean install (no leftover XCode 3.2.x files)?

Contributor

gvvaughan commented Aug 24, 2011

When I installed Lion last month, I made a bootable install drive, and completely wiped my machine for a pristine installation. I'm up to date with Software Updates, and have just a hand full of brew packages and 3rd party apps installed. The recipe you linked above installs without a hitch for me.

% brew install https://raw.github.com/jacknagel/homebrew/673c3d2c383f66928f8d2df9762a4c29a7d1c31c/Library/Formula/git.rb
######################################################################## 100.0%                     
==> Downloading http://kernel.org/pub/software/scm/git/git-1.7.6.tar.bz2
######################################################################## 100.0%                     
==> make prefix=/usr/local/Cellar/git/1.7.6 install
==> Downloading http://kernel.org/pub/software/scm/git/git-manpages-1.7.6.tar.bz2                   
######################################################################## 100.0%                     
==> Downloading http://kernel.org/pub/software/scm/git/git-htmldocs-1.7.6.tar.bz2                   
######################################################################## 100.0%                     
==> Caveats   
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

Emacs support has been installed to:
  /usr/local/Cellar/git/1.7.6/share/doc/git-core/contrib/emacs

The rest of the "contrib" has been installed to:             
  /usr/local/Cellar/git/1.7.6/share/contrib
==> Summary
/usr/local/Cellar/git/1.7.6: 1068 files, 19M, built in 77 seconds
Contributor

jacknagel commented Aug 24, 2011

Thanks!

jacknagel closed this in 6f4b710 Aug 24, 2011

Contributor

jacknagel commented Aug 24, 2011

Pushed a tentative fix in 6f4b710; please reopen if the issue persists.

@martinploeger martinploeger added a commit to martinploeger/homebrew that referenced this issue Oct 8, 2011

@jacknagel @martinploeger jacknagel + martinploeger git: define NO_PERL_MAKEMAKER on Lion
Clean XCode 4.x installs (i.e., not on top of an existing XCode 3.2.x
installation) do not include Perl MakeMaker.

Tentatively fixes #7091.
a5969ee

@Julian Julian added a commit to Julian/homebrew that referenced this issue Nov 21, 2011

@jacknagel @Julian jacknagel + Julian git: define NO_PERL_MAKEMAKER on Lion
Clean XCode 4.x installs (i.e., not on top of an existing XCode 3.2.x
installation) do not include Perl MakeMaker.

Tentatively fixes #7091.
4c516f5

@Sharpie Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 12, 2012

@jacknagel jacknagel git: define NO_PERL_MAKEMAKER on Lion
Clean XCode 4.x installs (i.e., not on top of an existing XCode 3.2.x
installation) do not include Perl MakeMaker.

Tentatively fixes #7091.
4f4d062

@snakeyroc3 snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012

@jacknagel jacknagel git: define NO_PERL_MAKEMAKER on Lion
Clean XCode 4.x installs (i.e., not on top of an existing XCode 3.2.x
installation) do not include Perl MakeMaker.

Tentatively fixes #7091.
744c0c0

Just had this happen to me, Lion install is fresh (10.7.5) with Xcode 4.6.3. Attempted to try the fix mention above but it gave a 404, so I was unable to test it.

Owner

bfontaine commented Aug 27, 2015

@ParaPenguin Please open another issue.

bfontaine locked and limited conversation to collaborators Aug 27, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.