Bug 4230 - building samba from SAMBA_3_0 branch produce incorrect shared objects
building samba from SAMBA_3_0 branch produce incorrect shared objects
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
x86 Linux
: P3 major
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
: 4367 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2006-11-15 09:23 UTC by Mikhail Kshevetskiy
Modified: 2009-04-04 08:03 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Kshevetskiy 2006-11-15 09:23:39 UTC
building samba from SAMBA_3_0 branch (revision 19710) on slackware linux (gcc-3.4.6, glibc-2.3.6, linux-2.6.17) produce incorrect shared libraries: libaddns.so, libmsrpc.so, libsmbclient.so, libsmbsharemodes.so.

to build samba i use the following script
cd ./source
CFAGS="-O2 -march=i486 -mtune=i686" ./configure \
    --enable-cups \
    --enable-static=no \
    --enable-shared=yes \
    --with-fhs \
    --with-acl-support=yes \
    --with-automount \
    --prefix=/usr \
    --localstatedir=/var \
    --bindir=/usr/bin \
    --sbindir=/usr/sbin \
    --with-lockdir=/var/cache/samba \
    --sysconfdir=/etc \
    --with-configdir=/etc/samba \
    --with-privatedir=/etc/samba/private \
    --with-swatdir=/usr/share/swat \
    --with-smbmount \
    --with-quotas \
    --with-syslog \
    --with-utmp \
    --with-libsmbclient \
    --with-winbind \
make clean

There was no compilation errors, but the 'ldd source/bin/*.so' commands gives:

/usr/bin/ldd: line 124: source/bin/libaddns.so: No such file or directory
/usr/bin/ldd: line 124: source/bin/libmsrpc.so: No such file or directory
/usr/bin/ldd: line 124: source/bin/libsmbclient.so: No such file or directory
/usr/bin/ldd: line 124: source/bin/libsmbsharemodes.so: No such file or directory

Linking with this libraries also do not work.
Comment 1 Derrell Lipman 2007-02-03 11:44:06 UTC
Please update to latest svn, and then from the source directory, do:

  make distclean
  ./configure.developer --enable-debug
  make install

It's possible that some of the configure options you are using are mutually exclusive, and causing the problem.  It's important to know, though, if a standard configuration (no special options) works.

I'm closing this bug.  If the problem still exists, please re-open this bug after determining, if at all possible, which configure option(s) cause the problem.
Comment 2 Mikhail Kshevetskiy 2007-02-03 18:21:22 UTC
I did the following steps. This does not help.

  make distclean
  ./configure.developer --enable-debug
  make install

the "./configure.developer --enable-debug" say:
Using libraries:
    LIBS = -lcrypt -lresolv -lresolv -lnsl -ldl
    LDAP_LIBS = -lldap -llber 
    AUTH_LIBS = -lcrypt 

the "make" say:
Using FLAGS = -g -D_SAMBA_BUILD_=3 -gstabs -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -DDEBUG_PASSWORD -DDEVELOPER -Wdeclaration-after-statement  -I/tmp/s/samba3/source/iniparser/src -Iinclude -I./include  -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc  -DHAVE_CONFIG_H  -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED    -I/tmp/s/samba3/source/lib -D_SAMBA_BUILD_=3
      PICFLAG    = -fPIC
      LIBS       = -lcrypt -lresolv -lresolv -lnsl -ldl
      LDFLAGS    = -pie 
      DYNEXP     = -Wl,--export-dynamic
      LDSHFLAGS  = -shared -Wl,-Bsymbolic 
      SHLIBEXT   = so
      SONAMEFLAG = -Wl,-soname=

Comment 3 Derrell Lipman 2007-02-03 18:35:26 UTC
Jelmer, Jerry, Jeremy, any idea what's going on here?

I'm reassigning this to the Build Environment default assignee...

Comment 4 Gerald (Jerry) Carter 2007-02-03 20:48:13 UTC
Either this report  or one on the mailing list indicated 
the problem was adding -fPIC to thelinking stage. I'll take the 
on and get it fixed.
Comment 5 Gerald (Jerry) Carter 2007-04-14 17:42:25 UTC
please retest against 3.0.25.  Thanks.
Comment 6 Mikhail Kshevetskiy 2007-04-20 15:27:30 UTC
bug still exist
Comment 7 Mikhail Kshevetskiy 2007-04-24 23:46:48 UTC
*** Bug 4367 has been marked as a duplicate of this bug. ***