开发者

Error compiling Git via Home Brew

开发者 https://www.devze.com 2023-03-29 07:51 出处:网络
Having problems compiling Git via Homebrew Error: Failed executing: make prefix=/usr/local/Cellar/git/1.7.6 install

Having problems compiling Git via Homebrew

Error: Failed executing: make prefix=/usr/local/Cellar/git/1.7.6 install

I've deleted and reinstall Homebrew and also reinstalled Xcode 3.2.6

System: Mac OS X 10.6.8

Any ideas what is going on?

Updated:

Here's t开发者_如何学运维he tail end of error trace. Not sure where else to look. Hope this helps.

referenced  from :
 " _libiconv",      referenced _reencode_stringfrom: 
_reencode_stringin  libgit.a(inutf8.o )libgit.a
( utf8.o )"
_libiconv_close " ," _libiconv_close",    referencedreferenced  from   _reencode_string infrom:
   :  
  libgit.a_reencode_string(  in  utf8.o    libgit.a_reencode_string( utf8.oin) 
libgit.a ()utf8.o)
   "  _libiconv_close " ,
  referenced    _reencode_string  from:in
  libgit.a( _reencode_string utf8.o )
ld in :   _reencode_string symbol(s) not found
 in libgit.a(utf8.o)
ld: symbol(slibgit.a) not( utf8.o)
found 
     _reencode_string in libgit.a(utf8.o)
ld: symbol(s) not found
collect2: collect2: Undefinedld returned 1 exit status 
symbols:
  "ld returned 1 exit status_libiconv_open"
, referenced from:
      _reencode_string in libgit.a(utf8.o)
  "_libiconvcollect2: ", referencedld returned 1 exit status 
from:
      _reencode_string in libgit.a(utf8.o)
  "_libiconv_close", referenced from:
      _reencode_string in libgit.a(utf8.o)
      _reencode_string in libgit.a(utf8.o)

ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [git-daemon] Error 1
make: *** Waiting for unfinished jobs....
make: *** [git-fast-import] Error 1
make: *** [git-imap-send] Error 1
make: *** [git-shell] Error 1
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/git.rb#L37
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: 63da621a3fb430cb9ae757a09077890be8aa689e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit arrandale
OS X: 10.6.8
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.6
GCC-4.0: build 5494 
GCC-4.2: build 5666 
LLVM: build 2335 
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -w -pipe
CXXFLAGS: -O3 -w -pipe
MAKEFLAGS: -j4

Not sure if it's worth noting but the trace shows Ruby 1.8 while ruby -v gives a ruby 1.9.2p180

Okay I've updated the error trace.


The ld: symbol(s) not found occurs either when you don't have a needed library dependency installed, or its inclusion or that of an object file is missing from the compile line for some reason. Without knowing what symbols are not found, it's impossible to help further. You cut off just at the good part of the error message. It's like getting to the last chapter of a mystery novel and finding it ripped out :-)


I fixed this issue by renaming the lib and include directories in /usr/local to lib_old and include_old and then running brew install git Unfortunately, this will likely break other code that depends on those directories...

Via this discussion: https://github.com/mxcl/homebrew/issues/1948#issuecomment-326283

0

精彩评论

暂无评论...
验证码 换一张
取 消