# Thu Feb 19 10:58:57 2004//TSAMBA_3_0 build of libnss_wins.so /w native iconv support (libiconv exists) incomplete libiconv not in dynamically linked list of libnss_wins.so (by means of ldd) yield: 'relocation error: /lib/libnss_wins.so.2: undefined symbol: libiconv_open'
please provide much more information as to why you think samba is at fault rather than a system/OS misconfiguration issue. Thanks.
--------------------- >>>> nm lib/libnss_wins.so | grep iconv 0007b3b8 t iconv_copy 00056bdd T init_iconv 0007a9dc t lazy_initialize_iconv U libiconv U libiconv_close U libiconv_open 0007aaca T smb_iconv 0007af97 T smb_iconv_close 0007ac05 T smb_iconv_open 0007aa4b t sys_iconv >>>> ldd lib/libnss_wins.so (note missing libiconv) libldap.so.201 => /usr/lib/libldap.so.201 (0x400c3000) liblber.so.201 => /usr/lib/liblber.so.201 (0x400f5000) libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x40102000) libgssapi_krb5.so.2 => /usr/local/lib/libgssapi_krb5.so.2 (0x401ba000) libkrb5.so.3 => /usr/local/lib/libkrb5.so.3 (0x401d0000) libk5crypto.so.3 => /usr/local/lib/libk5crypto.so.3 (0x40238000) libcom_err.so.3 => /usr/local/lib/libcom_err.so.3 (0x4025a000) libresolv.so.2 => /lib/libresolv.so.2 (0x40264000) libc.so.6 => /lib/libc.so.6 (0x40276000) libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x403a1000) libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x403b6000) libdl.so.2 => /lib/libdl.so.2 (0x403e3000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) >>>> getent -s wins hosts x getent: relocation error: /lib/libnss_wins.so.2: undefined symbol: libiconv_open ---------------------------------- i do not suppose, it is a misconfiguration to have 1) (glibc) /usr/include/iconv.h 2) (libiconv) /usr/local/include/iconv.h ----------------------------------- >>>> config.status configured by ./configure, generated by GNU Autoconf 2.59, with options \"'--prefix=/usr' '--with-smbmount' '--with-fhs' '--with-pam' '--with-datadir=/usr/share' '--with-configdir=/etc/samba' '--with-lockdir=/var/run/samba' '--with-libiconv=/usr/local' '--with-pam_smbpass' '--with-quotas' '--with-acl-support' '--with-winbind' '--enable-cups' '--with-ads'\" >>>> grep iconv * (relevant parts) config.log:configure:24033: checking for iconv in /usr/local config.log:configure:24059: gcc -o conftest -O -D_LARGEFILE64_SOURCE -D_FILE_O config.log:conftest.c:271:20: biconv.h: No such file or directory config.log:conftest.c:275: error: `iconv_t' undeclared (first use in this functi config.log:| #include <biconv.h> config.log:| iconv_t cd = iconv_open("",""); config.log:| iconv(cd,NULL,NULL,NULL,NULL); config.log:| iconv_close(cd); config.log:conftest.c:271:20: giconv.h: No such file or directory config.log:conftest.c:275: error: `iconv_t' undeclared (first use in this functi config.log:| #include <giconv.h> config.log:| iconv_t cd = iconv_open("",""); config.log:| iconv(cd,NULL,NULL,NULL,NULL); config.log:| iconv_close(cd); config.log:: undefined reference to `libiconv_open' config.log:: undefined reference to `libiconv' config.log:: undefined reference to `libiconv_close' config.log:| #include <iconv.h> config.log:| iconv_t cd = iconv_open("",""); config.log:| iconv(cd,NULL,NULL,NULL,NULL); config.log:| iconv_close(cd); config.log:configure:24220: gcc -o conftest -O -D_LARGEFILE64_SOURCE -D_FILE_O config.log:conftest.c:271:20: giconv.h: No such file or directory config.log:conftest.c:275: error: `iconv_t' undeclared (first use in this functi config.log:| #include <giconv.h> config.log:| iconv_t cd = iconv_open("",""); config.log:| iconv(cd,NULL,NULL,NULL,NULL); config.log:| iconv_close(cd); Makefile:LIBS= -lcrypt -lresolv -lnsl -ldl -liconv ----------------------------- please feel free to obtain any complete build/install logs regards w.pichler
Created attachment 524 [details] Patch for linking libs with libnss_wins.so I met same problem and checked with objdump, # objdump -x /lib/libnss_wins.so | grep NEEDED NEEDED libldap.so.2 NEEDED liblber.so.2 NEEDED libgssapi_krb5.so.2 NEEDED libkrb5.so.3 NEEDED libk5crypto.so.3 NEEDED libcom_err.so.2 NEEDED libc.so.6 No libiconv.so.2 is found. I found libiconv is not linked when linking libnss_wins.so and apply the patch attached, libnss_wins.so works well.
I found the problem at Samba 3.0.4.
database cleanup
"r17198: Fix wins_nss dependencies" committed at Sun Jul 23 03:33:28 2006 http://viewcvs.samba.org/cgi-bin/viewcvs.cgi?rev=17198&view=rev
Fixed at Samba 3.0.25.
Fixed in current releases.