Ticket #74 (new defect)
Haskeline can't link against MacPorts' libiconv
|Reported by:||judah||Owned by:|
On OS X, the following fails (where Test.hs is from the examples folder):
$ ghc --make Test.hs -L/opt/local/lib -I/opt/local/include -fforce-recomp [1 of 1] Compiling Main ( test.hs, test.o ) Linking test ... Undefined symbols: "_iconv_open", referenced from: _s2e5_info in libHShaskeline-0.6.0.1.a(IConv.o) "_iconv_close", referenced from: _iconv_close$non_lazy_ptr in libHShaskeline-0.6.0.1.a(IConv.o) "_iconv", referenced from: _s2oc_info in libHShaskeline-0.6.0.1.a(IConv.o) ld: symbol(s) not found collect2: ld returned 1 exit status
Reported by Antoine Latter.
The problem is that MacPorts' iconv typedefs the iconv functions rather than defining them directly. This will affect any program linking against a library in MacPorts, even if it intends to use the OS X system libiconv.