Martin Kjær Jørgensen
2026-Jun-14 13:54 UTC
[Samba] cross compile heimdal linking libbsd issue
Hey list, I am trying to cross compile samba on x86_64 to aarch64 on a Debian'ized system using ptxdist rules. ./configure runs okay but it seems linking compile_et fails: /build-target/samba-4.23.6/bin/compile_et: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory If I install libbsd0:arm64 on the host, the entire samba build finishes correctly. Are there special building/linking exceptions to heimdal, or have I configured something wrong, or maybe ptxdist cflags and ldflags are not propagated correctly to thirdparty projects? -- /Martin
On Sun, 14 Jun 2026 15:54:47 +0200 Martin Kj?r J?rgensen via samba <samba at lists.samba.org> wrote:> Hey list, > > I am trying to cross compile samba on x86_64 to aarch64 on a > Debian'ized system using ptxdist rules. ./configure runs okay but it > seems linking compile_et fails: > > /build-target/samba-4.23.6/bin/compile_et: error while loading shared > libraries: libbsd.so.0: cannot open shared object file: No such file > or directory > > If I install libbsd0:arm64 on the host, the entire samba build > finishes correctly. > > Are there special building/linking exceptions to heimdal, or have I > configured something wrong, or maybe ptxdist cflags and ldflags are > not propagated correctly to thirdparty projects? >As far as I can see PTXdist is a tool to build packages for embedded systems, which are usually fairly small, so do you actually want/need the AD DC parts of Samba ? If you are using waf to build Samba, you can turn off the AD DC functionality with the '--without-ad-dc' option to ./configure Rowland
On 14.06.2026 16:54, Martin Kj?r J?rgensen via samba wrote:> Hey list, > > I am trying to cross compile samba on x86_64 to aarch64 on a Debian'ized > system using ptxdist rules. ./configure runs okay but it seems linking compile_etNot an answer to your question directly but do you know that samba package for debian can be easily cross-compiled using multiarch and qemu-user? In particular, I provide builds of debian samba packages for x86_64 *and* for arm64 architectures on my site this way (http://www.corpit.ru/mjt/packages/samba/).> fails: > > /build-target/samba-4.23.6/bin/compile_et: error while loading shared libraries: libbsd.so.0: > cannot open shared object file: No such file or directory > > If I install libbsd0:arm64 on the host, the entire samba build finishes > correctly.The Build-Depends filed of the debian samba package includes libbsd-dev, which, in turn, depends on libbsd0. This is the host architecture, i.e. the architecture you're building for. So your build system should have libbsd0:arm64 installed. Thanks, /mjt