mac: Install MacVim
July 6th, 2011 — 05:38 pmToday, trying to compile MacVim I ran into a problem with some shared libraries:
... Undefined symbols: "_iconv_close", referenced from: _buf_write in fileio.o _readfile in fileio.o _readfile in fileio.o ...
The problem has to do with lib search path. I don’t know yet why isn’t used the system path (under /usr/lib) rather than the one used by macports.
Well, the thing is that the libiconv2.dylib under /opt/local/lib doesn’t have the _iconv_close function (among others):
[madtrick { lib } ]pwd /opt/local/lib [madtrick { lib } ]nm libiconv.2.dylib | grep "iconv_close" 000163f0 T _libiconv_close
While libiconv.2.dylib on /usr/lib does:
[madtrick { lib } ]pwd /usr/lib [madtrick { lib } ]nm libiconv.2.dylib | grep "iconv_close" 0000b905 T _iconv_close 0000fcce T _libiconv_close
So to fix this problem you have several choices:
- Deactivate libiconv on macports (and all its dependencies)
- Prepend a lib path
I went for the second one:
LDFLAGS="-L/usr/lib" ./configure _your_options_here_
There you go : )