examples/libsmbclient/* link error with libwbclient

Derrell Lipman derrell.lipman at unwireduniverse.com
Fri Jan 11 18:22:49 GMT 2008


Hi all.  I'm trying to build the examples/libsmbclient directory with
current git source.  I've added -lwbclient to the makefile.  Linking now
gives me this:

Linking testsmbc
gcc -O0 -g -I../../source/include `gtk-config --cflags`
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-L/usr/local/samba/lib -lldap -lkrb5 -lgssapi_krb5 -o testsmbc
testsmbc.o-lsmbclient -lwbclient -ldl -lresolv
/usr/local/samba/lib/libwbclient.so: undefined reference to
`swrap_getsockopt'
/usr/local/samba/lib/libwbclient.so: undefined reference to `swrap_connect'
/usr/local/samba/lib/libwbclient.so: undefined reference to `swrap_socket'
/usr/local/samba/lib/libwbclient.so: undefined reference to `swrap_close'

I've added /usr/local/samba/lib to /etc/ld.so.conf.d/samba.conf and rerun
ldconfig.

ldd now provides:

% ldd /usr/local/samba/lib/libwbclient.so
    linux-gate.so.1 =>  (0xb7f84000)
    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e1c000)
    /lib/ld-linux.so.2 (0x80000000)

% ldd /usr/local/samba/lib/libsmbclient.so
    linux-gate.so.1 =>  (0xb7f74000)
    libwbclient.so.0 => /usr/local/samba/lib/libwbclient.so.0 (0xb7b7b000)
    libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7b4d000)
    libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7b39000)
    libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7b21000)
    libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7b1d000)
    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb79d3000)
    /lib/ld-linux.so.2 (0x80000000)

I also tried swapping the order of -lwbclient and -lsmbclient since this
appears to be a circular reference: libsmbclient requires libwbclient which
req

I still get the same link errors.  Any hints?


More information about the samba-technical mailing list