Source: mujs Version: 1.3.3-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
mujs fails to cross build from source. The reason is using the build architecture compiler in a linker step and then failing to find a library that is only requested for the host architecture. Stepping back, that linker invocation happens during dh_auto_install. debhelper does not pass cross tools to dh_auto_install as it expects the build to be complete at this point. So the real issue is that part of the build is performed at dh_auto_install time. It turns out that the default target performs a debug build while the install-shared target needs a release build and these builds differ in build product paths. Once telling dh_auto_build to perform a release build, it actually builds what is needed for dh_auto_install and that also fixes the cross build. I'm attaching a patch for your convenience. Helmut
diff --minimal -Nru mujs-1.3.3/debian/changelog mujs-1.3.3/debian/changelog --- mujs-1.3.3/debian/changelog 2023-06-19 10:23:20.000000000 +0200 +++ mujs-1.3.3/debian/changelog 2023-08-30 09:28:20.000000000 +0200 @@ -1,3 +1,10 @@ +mujs (1.3.3-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Build during dh_auto_build. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Wed, 30 Aug 2023 09:28:20 +0200 + mujs (1.3.3-1) unstable; urgency=medium * New upstream version 1.3.3 diff --minimal -Nru mujs-1.3.3/debian/rules mujs-1.3.3/debian/rules --- mujs-1.3.3/debian/rules 2023-06-19 10:23:20.000000000 +0200 +++ mujs-1.3.3/debian/rules 2023-08-30 09:28:19.000000000 +0200 @@ -14,7 +14,7 @@ override_dh_auto_build: dh_auto_build -- CFLAGS="$(CFLAGS) -Wl,-soname,libmujs.so.3" build/release/libmujs.so - dh_auto_build -- CFLAGS="$(CFLAGS)" + dh_auto_build -- CFLAGS="$(CFLAGS)" release override_dh_auto_install: $(MAKE) prefix=$(prefix) libdir=$(libdir) install-shared