1

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

ian
  • 12,003
  • 9
  • 51
  • 107
JP Silvashy
  • 46,977
  • 48
  • 149
  • 227

2 Answers2

2

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
  • 16,709
  • 6
  • 47
  • 72
  • Ah, thanks Ned, I presumed homebrew as in from scratch... A link in the question to the package might be nice... – wich Feb 08 '10 at 19:43
1

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
  • 208,748
  • 37
  • 389
  • 560
  • I guess that must be the tool that Homebrew (package manager) is using. Not sure how to get around that... and ideas are appreciated. – JP Silvashy Feb 08 '10 at 22:36