On Mon, Nov 06, 2000 at 07:12:11PM -0500, Ben Collins wrote: > On Mon, Nov 06, 2000 at 05:15:02PM -0600, Sam TH wrote: > > Recently, I upgraded my system (running woody) to the newest libc. This caused static > > compilation of AbiWord (of which I am a developer) to break. I don't ever compile > > things statically otherwise, so this is the only thing broken. However, since the errors, > > which look like so: > > > > /usr/lib/libc.a(nsswitch.o)(.data+0xd4): undefined reference to `_nss_files_sethostent' > > > > do not mention any AbiWord files, and they appeared immediately after the upgrade, I > > suspect this is a libc issue. > > > > Has anyone else had this problem? Is there a fix I should know about? I was unable to > > find anything in the archives. > > NSS is now compiled statically (i.e. seperate from libc.a), so if your > program requires lookup calls (those that work with NSS), then you need to > do this: > > gcc -o temp temp.c /usr/lib/libc.a -lnss_files -lnss_dns > > I might revert this, but then static compilations really aren't static > anymore (your static app will still dlopen NSS modules, possibly from a > different version of libc). I've investigated this further, and it appears that abiword never uses NSS. At least, the string "nss" never appears in the code. Yet it still gives the errors I previously reported when I tried to statically link. I shouldn't have to change the link line if I don't use those libraries, right? Or is there something I'm missing here? sam th sam@uchicago.edu http://www.abisource.com/~sam/ GnuPG Key: http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0xCABD33FC
Attachment:
pgpBVztSsgguv.pgp
Description: PGP signature