libiconv madness

Gentleones,

My nmblookup crashes every time something calls it, and it gripes with this message:
Dyld Error Message:
Symbol not found: iconvopen
Referenced from: /usr/bin/nmblookup
Expected in: /usr/local/lib/libiconv.2.dylib

My smbd crashes like this:
[2008/12/03 22:56:29, 0] /SourceCache/samba/samba-187.4/samba/source/nmbd/nmbd.c:main(695)
Netbios nameserver version 3.0.25b-apple started.
Copyright Andrew Tridgell and the Samba Team 1992-2007
dyld: lazy symbol binding failed: Symbol not found: iconvopen

Both are essentially griping because of the same thing: that my libiconv.2.4.0.dylib does not contain a symbol iconvopen, and they are both correct as "nm libiconv.2.4.0.dylib" reveals. However, had they been built with the iconv.h file from libiconv.2.4.0.dylib, then all would be well as it defines iconvopen correctly to point to the libiconv_open function in that dynamic library.

The header in /usr/include, however, includes no such definition, which makes me suspect that my dylib has outgrown the original dylib included with the system. Or something. I don't know. Therefore, my question:

Can someone who has a working nmbd and nmblookup on OSX Server 10.5.6 please tell me what version dylib they have (if you'll merely paste in the results of "ls -la /usr/local/lib/libiconv*") and what your iconv.h file looks like (pasting in the results of "more /usr/include/iconv.h" ought to do it)?

I'll use that as a starting point, then try to figure out where to get my missing pieces.

Thanks in advance,
Bill

(More info can be found here http://www.bill.eccles.net/bills_words/2008/12/libiconv-madness.html )

Message was edited by: Bill Eccles - updated the URL at the end.

iMG4, PMG3 (beige), PBG3, PMG4, 6400, 5200, +, 128, Mac OS X (10.5.6)

Posted on Mar 6, 2009 12:20 PM

Reply
1 reply

Mar 10, 2009 7:40 AM in response to Bill Eccles

OK, I have found the solution to the problem.

It turns out that the libiconv that I had in /usr/local/lib is not the libiconv that Apple supplies with MacOS X Server 10.5.x. That one resides in /usr/lib, and mine was completely missing. I don't know where it went, nor how it disappeared.

The solution was to tarball the libiconv from a virgin OSXS 10.5.6 machine and plunk it down into /usr/lib, then delete (the usual, careful way--renaming all the files ".old" and then seeing how things work, then deleting them) the old ones.

I did get some help from Bruno Haible (one of the authors of libiconv) who pointed out that Apple had their own special version... but finding it on the Apple website was maddening. I had to use Google to find it. Anyway, if you want to build libiconv the way that Apple does, you'll need to use the stuff on this page:

http://www.opensource.apple.com/darwinsource/10.5.6/libiconv-24/

This builds a file whose structure is very different from the default configure/make/install that Bruno's package provides. You can look at the output of nm on the resulting file to see that.

Anyway, problem solved. Hope this helps someone else.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

libiconv madness

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.