Skip to content

Instantly share code, notes, and snippets.

@dmpeters
Created July 29, 2012 00:04
Show Gist options
  • Save dmpeters/3195360 to your computer and use it in GitHub Desktop.
Save dmpeters/3195360 to your computer and use it in GitHub Desktop.
homebrew issues with git and pkg-config after installing mountain lion osx 10.8
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_reencode_string in libgit.a(utf8.o)
_reencode_string in libgit.a(utf8.o)
"_iconv_close", referenced from:
"_iconv_close", referenced from:
_reencode_string in libgit.a(utf8.o)
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_reencode_string in libgit.a(utf8.o)
_reencode_string in libgit.a(utf8.o)
"_iconv_open", referenced from:
"_iconv_open", referenced from:
_reencode_string in libgit.a(utf8.o)
"_iconv_close", referenced from:
_reencode_string in libgit.a(utf8.o)
Undefined symbols for architecture x86_64:
_reencode_string in libgit.a(utf8.o)
"_iconv", referenced from:
"_iconv_open", referenced from:
_reencode_string in libgit.a(utf8.o)
_reencode_string in libgit.a(utf8.o)
ld: symbol(s) not found for architecture x86_64
ld: symbol(s) not found for architecture x86_64
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [git-credential-store] Error 1
make: *** Waiting for unfinished jobs....
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: make: error: linker command failed with exit code 1 (use -v to see invocation)
"_iconv_close", referenced from:
*** [git-fast-import] Error 1
_reencode_string in libgit.a(utf8.o)
make: *** [git-daemon] Error 1
"_iconv_open", referenced from:
_reencode_string in libgit.a(utf8.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [git-http-backend] Error 1
==> Exit Status: 2
https://github.com/mxcl/master/blob/master/Library/Formula/git.rb#L49
==> Build Environment
HOMEBREW_VERSION: 0.9.2
HEAD: 0b296b217d813dd30c574639c203c9ccc110780c
CPU: quad-core 64-bit sandybridge
OS X: 10.8-x86_64
Xcode: 4.4
CLT: 4.4.0.0.1.1249367152
X11: 2.7.2 @ /opt/X11
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
CPPFLAGS: -isystem /usr/local/include
LDFLAGS: -L/usr/local/lib
MACOSX_DEPLOYMENT_TARGET: 10.8
MAKEFLAGS: -j4
Error: Failed executing: make prefix=/usr/local/Cellar/git/1.7.11.3 CC=/usr/bin/clang CFLAGS=-Os\ -w\ -pipe\ -march=native\ -Qunused-arguments\ -mmacosx-version-min=10.8 LDFLAGS=-L/usr/local/lib install (git.rb:49)
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/8643
https://github.com/mxcl/homebrew/issues/10544
https://github.com/mxcl/homebrew/issues/11481
https://github.com/mxcl/homebrew/issues/12344
https://github.com/mxcl/homebrew/issues/12814
https://github.com/mxcl/homebrew/issues/13648
Otherwise, this may help you fix or report the issue:
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
@dmpeters
Copy link
Author

/usr/local (master)> brew doctor
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built.

git

Warning: You have a non-Homebrew 'pkg-config' in your PATH:
bin/pkg-config

./configure may have problems finding brew-installed packages using
this other pkg-config.

@dmpeters
Copy link
Author

SOLUTION:

brew remove libiconv
brew prune
brew cleanup

"It was removed from Homebrew on account of not being necessary and causing Problems." ~ @MistyM #machomebrew

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