[Samba] Samba Compile Error

John Smith linux_developer at hotmail.com
Tue Oct 3 11:48:55 GMT 2006


Hi,

    I've been having the following compile error with Samba for the past few
releases.  The last successful compile I have had is with version 3.0.22.
At least all the 3.0.23 versions are affected.  The compile dies with:

Linking bin/tdbbackup
tdb/spinlock.o(.text+0x1d0): In function `tdb_create_rwlocks':
: undefined reference to `this_is_smp'
collect2: ld returned 1 exit status
make: *** [bin/tdbbackup] Error 1

    I've tried playing with several of the compile options to no effect.
The only thing that works in getting the compile to work is disabling the
spinlocks support which is undesirable and also resulted in the server
crashing on load when I tried it.  Below are my configure options:

--prefix=/usr \
--bindir=/usr/sbin \
--sysconfdir=/etc \
--localstatedir=/var \
--libdir=/etc/samba \
--with-privatedir=/etc/samba/private \
--with-lockdir=/var/lock/samba \
--with-piddir=/var/run \
--with-swatdir=/etc/samba/swat \
--with-configdir=/etc/samba \
--with-codepagedir=/etc/samba/codepages \
--with-logfilebase=/var/log/samba \
--enable-cups \
--with-readline \
--with-smbwrapper \
--with-automount \
--with-smbmount \
--with-cifsmount \
--without-pam \
--without-ssl \
--with-quotas \
--with-sys-quotas \
--with-sambabook=/etc/samba/swat/using_samba \
--enable-socket-wrapper \
--with-libsmbclient \
--with-aio-support \
--with-acl-support \
--with-sendfile-support \
--with-cluster-support \
--with-winbind \
--with-fhs \
--with-utmp \
--with-expsam=xml,mysql \
--with-spinlocks \
--with-vfs \
--with-msdfs \
--disable-nls

    I've tried this on several different Linux machine with different
configurations but I get the same error on all of them.  At first I thought
it may be related with my 2.4.x kernel installations however I've tried a
2.6.16.x kernel with the same result.  Is this problem known about and is
there a fix?

    Also as long as I'm posting.  I've had another linking related error for
several releases.  However it was one error I have been easily able to fix
by adjusting the generated Makefile.  This error only appears on older Linux
systems so it seams to be related to older compilers and/or linkers.  On
these older systems my adjustments to the Makefile to get samba to compile
is the following:

< LDSHFLAGS=-shared -Wl,-Bsymbolic  -s -Wl,-rpath,/usr/lib
< WINBIND_NSS_LDSHFLAGS=-shared -Wl,-Bsymbolic  -s -Wl,-rpath,/usr/lib
> LDSHFLAGS=-shared -Bsymbolic  -s -Wl,-rpath,/usr/lib
> WINBIND_NSS_LDSHFLAGS=-shared -Bsymbolic  -s -Wl,-rpath,/usr/lib

    This may not do exactly the same as the original options however it does
result in a working binary on these older systems.  Perhaps something can be
done for the configure script for this older systems so the Makefile does
not have to be adjusted manually for them.  Thanks.







More information about the samba mailing list