We cross-compile samba4 for openwrt and therefor have to set a custom --destdir. We also specify what targets we want, depending on configuration needs.
Since 4.10/11 the waf install behavior changed and now only installs some minor script files and headers this way. In 4.9 all the bins/libs where installed correctly and we could copy from the --destdir.
In 4.10/11 we now need to manually grab the bins/libs from the build-dir/samba4/bin and samba4/bin/shared path.
Created attachment 15556 [details]
samba build - installation fails to install anything useful
Sorry for the "me too" but, well... now that I've finally managed to successfully cross-compile 4.10.x I've hit this installation issue too.
I can't confirm if this issue exists in 4.11.x, due to #14164.
./buildtools/bin/waf install --destdir=$SYSROOT_PREFIX --targets=smbclient
would install the following files:
Now with 4.10.9, it installs only the following 2 files:
It's a similar situation with other targets and custom --destdir, eg.
./buildtools/bin/waf install --destdir=$INSTALL --targets="smbclient,client/smbclient,smbtree,nmblookup,testparm,smbd/smbd,nmbd,smbpasswd"
All the binaries and shared object libraries for the targets are not installed to $INSTALL - I'm not actually sure where they're installed, it looks like they're not actually installed.
I'm attaching a complete V=1 build log. The build instructions are here.
Confirming this is still an issue with 4.11.1 when "cross-compiling" x86_64 -> x86_64 (this build is "successful" as bug #14164 isn't fatal when the host and target arch is the same). Despite the 4.11.1 build completing, no binary or shared object library files are installed.
Most normal linux packages use DESTDIR=... rather than a waf option, but looking at the code that does the same thing.
So I think this is related to the --targets, which is much less used.
Even fake cross-compiling isn't required, just 'waf install --targets=smbclient --destdir=/tmp/install-samba' will do.
I've checked DESTDIR and the results are not any better.
(In reply to Andrew Bartlett from comment #3)
We at OpenWrt use --targets as a "sane" way to just compile the minimal fileserver package, which is what most users want, without needing to worry about what shared libs belong to which binary/target.
I mean look at the crazy alpine buildfile:
They do a full build and than manually select which shared lib belongs to which target, for there install packages.
We also set DESTDIR=, but the buggy make wrapper does not correctly support setting our --targets.
Just tested 4.12.3 and same issue, libs/bins are not installed via:
./buildtools/bin/waf install \
All i get is usr/bin/findsmb and lib/samba/libreplace-samba4.so, instead of all the libs and sbin/smbd.