[Pkg-netmeasure-discuss] Bug#1024945: libtins FTCBFS: does not pass CROSS_COMPILING to cmake
Helmut Grohne
helmut at subdivi.de
Sat Nov 26 15:06:29 GMT 2022
Source: libtins
Version: 4.0-1
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs
libtins fails to cross build from source, because it does not pass
CROSS_COMPILING to cmake and thus issues a try_run test, which produces
a hard failure. The actual build is a little non-obvious. This is what
currently happens:
* dh_auto_configure runs cmake in obj-*/
* override_dh_auto_build runs cmake in build/
* override_dh_auto_build runs make in build/
* dh_auto_install runs make install in obj-*/ which happens to also
perform a build
As a result, the build/ folder is completely irrelevant to what ends up
in the binary package and the -DLIBTINS_ENABLE_CXX11=1 flag is being
ignored.
I'm attaching a patch to fix the FTCBFS for your convenience. It happens
to also drop the unused secondary build in build/.
Helmut
-------------- next part --------------
diff --minimal -Nru libtins-4.0/debian/changelog libtins-4.0/debian/changelog
--- libtins-4.0/debian/changelog 2018-09-19 23:31:41.000000000 +0200
+++ libtins-4.0/debian/changelog 2022-11-26 09:34:49.000000000 +0100
@@ -1,3 +1,10 @@
+libtins (4.0-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Pass CROSS_COMPILING to cmake. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Sat, 26 Nov 2022 09:34:49 +0100
+
libtins (4.0-1) unstable; urgency=medium
* New upstream release (Closes: #897440)
diff --minimal -Nru libtins-4.0/debian/rules libtins-4.0/debian/rules
--- libtins-4.0/debian/rules 2018-09-19 23:31:41.000000000 +0200
+++ libtins-4.0/debian/rules 2022-11-26 09:34:49.000000000 +0100
@@ -1,4 +1,7 @@
#!/usr/bin/make -f
+
+include /usr/share/dpkg/architecture.mk
+
export DH_VERBOSE = 1
export V=1 # verbose mode for make
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
@@ -6,16 +9,10 @@
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
%:
- dh $@
+ dh $@
-override_dh_auto_build:
- mkdir -p build
- cd build && cmake ../ -DLIBTINS_ENABLE_CXX11=1
- cd build && make
+override_dh_auto_configure:
+ dh_auto_configure -- -DCROSS_COMPILING=$(if $(filter $(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)),OFF,ON)
override_dh_installchangelogs:
dh_installchangelogs CHANGES.md
-
-override_dh_auto_clean:
- rm build -rf
- dh_auto_clean
More information about the Pkg-netmeasure-discuss
mailing list