DESTDIR install fails without samba-specific rpath options

Sam Liddicott sam at liddicott.com
Tue Jan 18 08:02:43 MST 2011


I've had a few days worth of trouble building samba4 and installing into 
a packaging directory.

My problems may be compounded by the fact that I am linking to 
non-installed libraries that have been built for the same target platform.

By setting LDPATH to refer to the build-system library directory, with 
both -L and also with -Wl,-rpath-link,.... I was able to build without 
severe problems (OK, I had hell with python but I solved that).

This message concerns specific remedies I had to take in order to get a 
DESTDIR install to work.

If DESTDIR was not set, the installation works fine.

if DESTDIR was set, then some un-expected installation-time linking 
failed with difficulty finding samba-built libraries. I presume that 
no-DESTDIR installs pass because those libraries get installed to a 
standard location "just in time".

Here is a sample error:
warning: libtdb-wrap-samba4.so, needed by 
default/source4/cluster/libcluster-samba4.so, not found (try using 
-rpath or -rpath-link)

I was required to add these items to LDFLAGS in order to be able to 
install into a DESTDIR
-Wl,-rpath-link,default/source4/lib -Wl,-rpath-link,shared/private 
-Wl,-rpath-link,shared

Further, I had to have those values set for the entire build-process - 
or at least setting merely for install was not sufficient.

I don't know so much how WAF works, but I know that DESTDIR installs are 
failing without the fixes I mention that I am using, which are to add 
samba build directories into the rpath.

On IRC, ita suggested I mention it here.I don't know what he means, but 
he said:
(14:25:16) ita: samjam: ok, so this means that the library propagation 
is not working anymore - you should post this on the mailing-list
(14:26:06) ita: normally, the library paths should be propagated to 
disable the use of rpath completely

Sam


More information about the samba-technical mailing list