Bug 4230 - building samba from SAMBA_3_0 branch produce incorrect shared objects
Summary: building samba from SAMBA_3_0 branch produce incorrect shared objects
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.25
Hardware: x86 Linux
: P3 major
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
: 4367 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-15 09:23 UTC by Mikhail Kshevetskiy (dead mail account)
Modified: 2021-03-18 23:44 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Kshevetskiy (dead mail account) 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
---------------------------------------------------------------
#!/bin/bash
cd ./source
./autogen.sh
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 \
    --with-ldap
make clean
make
---------------------------------------------------------------

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

source/bin/libaddns.so:
/usr/bin/ldd: line 124: source/bin/libaddns.so: No such file or directory
source/bin/libmsrpc.so:
/usr/bin/ldd: line 124: source/bin/libmsrpc.so: No such file or directory
source/bin/libsmbclient.so:
/usr/bin/ldd: line 124: source/bin/libsmbclient.so: No such file or directory
source/bin/libsmbsharemodes.so:
/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
  ./autogen.sh
  ./configure.developer --enable-debug
  make
  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 (dead mail account) 2007-02-03 18:21:22 UTC
I did the following steps. This does not help.

  make distclean
  ./autogen.sh
  ./configure.developer --enable-debug
  make
  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...

Derrell
Comment 4 Gerald (Jerry) Carter (dead mail address) 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 (dead mail address) 2007-04-14 17:42:25 UTC
please retest against 3.0.25.  Thanks.
Comment 6 Mikhail Kshevetskiy (dead mail account) 2007-04-20 15:27:30 UTC
bug still exist
Comment 7 Mikhail Kshevetskiy (dead mail account) 2007-04-24 23:46:48 UTC
*** Bug 4367 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Bartlett 2021-03-18 23:44:01 UTC
Closing as fixed as the whole build system has been replaced since then.