Bug 8796 - wafsamba does not specify sufficient -rpath flags while linking the Samba 4 Python modules
wafsamba does not specify sufficient -rpath flags while linking the Samba 4 P...
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Build
unspecified
x64 Linux
: P5 normal
: ---
Assigned To: Andrew Tridgell
samba4-qa@samba.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-06 16:16 UTC by Torsten Kurbad
Modified: 2012-07-03 16:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Kurbad 2012-03-06 16:16:06 UTC
While trying to build the latest GIT / Alpha18 of Samba 4 in a
"distribution-friendly" way on Gentoo, I ran into some problems
regarding the rpath entries of the Python C extensions included with
Samba 4.

More precisely, I specified (among others) the following configure options

--disable-rpath
--disable-rpath-install
--with-modulesdir=/usr/lib[64]

which places all the Samba modules in /usr/lib[64]/samba.
Nonetheless, the rpath entry of several Python modules only
contains /usr/lib[64], instead of /usr/lib[64]:/usr/lib[64]/samba.

A recent conversation on the samba-technical mailing list revealed that this seems to be due to a bug in wafsamba.

For the time being, I was able to circumvent the issue by making some of the Python modules' implicit dependencies explicit ones in the respective wscript_build scripts.

Nonetheless, a more permanent fix to the problem would be much appreciated.

Best regards,
Torsten
Comment 1 Matthias Dieter Wallnöfer 2012-03-06 17:04:24 UTC
Jelmer, could you have a look, please?
Comment 2 Jelmer Vernooij 2012-03-06 17:09:59 UTC
(In reply to comment #1)
> Jelmer, could you have a look, please?
See the conversation on the mailing list. I don't have time to look into this at the moment.
Comment 3 Amitay Isaacs 2012-03-07 01:21:09 UTC
(In reply to comment #0)
> More precisely, I specified (among others) the following configure options
> 
> --disable-rpath
> --disable-rpath-install
> --with-modulesdir=/usr/lib[64]
> 
> which places all the Samba modules in /usr/lib[64]/samba.

What's the exact configure command did you use? 

I used the following command:

configure --prefix=$HOME/samba/prefix1 \
          --disable-rpath \
          --disable-rpath-install \
          --with-modulesdir=$HOME/samba/prefix1/lib64

I can see all the modules are installed under $HOME/samba/prefix1/lib64 and
not samba subdir ($HOME/samba/prefix1/lib64/samba).

Also the rpath entries exist only for private libs.
Comment 4 Torsten Kurbad 2012-03-07 07:36:05 UTC
First of all, I forgot to mention that the problem only occurs while compiling with system talloc, tevent, tdb, and ldb. But that's something you definitely want while packaging for a distribution.

(In reply to comment #3)
> What's the exact configure command did you use? 

On my system (amd64), the Gentoo waf eclass constructs the following line to configure the source:

CCFLAGS="-O3 -march=native -pipe" \
LINKFLAGS="-Wl,-O1 -Wl,--as-needed" \
"/var/tmp/portage/net-fs/samba-python-modules-4.0.0_alpha18/work/samba-4.0.0alpha18/buildtools/bin/waf" \
 --prefix=/usr \
 --libdir=/usr/lib64 \
 --enable-fhs \
 --sysconfdir=/etc \
 --localstatedir=/var \
 --with-modulesdir=/usr/lib64 \
 --disable-rpath --disable-rpath-install \
 --nopyc \
 --nopyo \
 --bundled-libraries=NONE \
 --builtin-libraries=replace,ccan \
 --disable-tdb2 \
 --with-dnsupdate \
 --with-acl \
 --with-ads \
 --without-aio-support \
 --with-ldap \
configure

Amitay, can you try building with in-system talloc, tevent, tdb, and ldb, and see, if you can reproduce the problem then?

Thanks,
Torsten
Comment 5 Torsten Kurbad 2012-03-29 07:39:34 UTC
Amitay,

did you meanwhile have a chance to try the aforementioned setup?

Best,
Torsten
Comment 6 Torsten Kurbad 2012-07-03 16:10:32 UTC
The problem seems to be fixed in Beta3.