tags:

views:

293

answers:

2

I recently ditched MacPorts for Homebrew, as a result im now experiencing some issues with make. Namely this error:

/Developer/usr/bin/llvm-gcc   -rdynamic -o zsh main.o  `cat stamp-modobjs`   -liconv -ldl -ltermcap -lm  -lc
Undefined symbols:
  "_libiconv_open", referenced from:
      llvm bitcode in utils.o
  "_libiconv_close", referenced from:
      llvm bitcode in utils.o
  "_libiconv", referenced from:
      llvm bitcode in utils.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [zsh] Error 1
make: *** [install.bin] Error 2

It seems those three libraries aren't linked or something. To be honest I'm a Ruby Developer and never have to compile anything so don't really know where to go to fix this. It happens when I compile anything from source.

In the example above that is the output when running make when installing zsh

+2  A: 

It seems libiconv is not linked in, you do supply -liconv to the command line, so it seems that the library is not installed or at least not available to the linker in the standard locations. Do you have libiconv installed?

wich
Homebrew -> http://github.com/mxcl/homebrew
Ned Deily
Ah, thanks Ned, I presumed homebrew as in from scratch... A link in the question to the package might be nice...
wich
+1  A: 

Why are you using llvm-gcc ? For maximum compatibility you'd be better of with gcc-4.0 or gcc-4.2, which are both installed as part of the developer tools in OS X 10.6.

Paul R
I guess that must be the tool that Homebrew (package manager) is using. Not sure how to get around that... and ideas are appreciated.
Joseph Silvashy
Welp... I ended out just upgrading xcode. That worked.
Joseph Silvashy