[Debian-med-packaging] Bug#1085491: ray FTCBFS: uses mpicxx

Helmut Grohne helmut at subdivi.de
Sat Oct 19 21:32:58 BST 2024


Source: ray
Version: 2.3.1-8
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

ray fails to cross build from source, because it uses mpicxx. The
problem here is that both mpi and cross building want to change the
compiler name (for injecting compiler flags and for selecting the
architecture to build for respectively). Usage of mpicxx is
fundamentally incompatible with cross building - and unnecessary. One
can simply pass the necessary flags by querying .pc files as is done for
any other library. I'm attaching a patch for your convenience.

Helmut
-------------- next part --------------
diff --minimal -Nru ray-2.3.1/debian/changelog ray-2.3.1/debian/changelog
--- ray-2.3.1/debian/changelog	2023-12-06 14:16:19.000000000 +0100
+++ ray-2.3.1/debian/changelog	2024-10-19 22:06:00.000000000 +0200
@@ -1,3 +1,10 @@
+ray (2.3.1-8.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Compute mpi compile flags using pkgconf. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sat, 19 Oct 2024 22:06:00 +0200
+
 ray (2.3.1-8) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru ray-2.3.1/debian/control ray-2.3.1/debian/control
--- ray-2.3.1/debian/control	2023-12-06 14:16:19.000000000 +0100
+++ ray-2.3.1/debian/control	2024-10-19 22:06:00.000000000 +0200
@@ -7,7 +7,8 @@
 Build-Depends: debhelper-compat (= 13),
                zlib1g-dev,
                libbz2-dev,
-               mpi-default-dev
+               mpi-default-dev,
+               pkgconf,
 Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/ray
 Vcs-Git: https://salsa.debian.org/med-team/ray.git
diff --minimal -Nru ray-2.3.1/debian/rules ray-2.3.1/debian/rules
--- ray-2.3.1/debian/rules	2023-12-06 14:16:19.000000000 +0100
+++ ray-2.3.1/debian/rules	2024-10-19 22:06:00.000000000 +0200
@@ -1,10 +1,14 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
+include /usr/share/dpkg/buildtools.mk
+
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CXXFLAGS_MAINT_APPEND = $(shell $(PKG_CONFIG) --cflags mpi-c)
+export DEB_LDFLAGS_MAINT_APPEND = $(shell $(PKG_CONFIG) --libs mpi-c)
 
 %:
 	dh $@
@@ -15,7 +19,7 @@
 	rm -f README.Ray README.RayPlatform RayPlatform/README
 
 override_dh_auto_build:
-	dh_auto_build -- CXXFLAGS="$(CXXFLAGS)" DEBLDFLAGS="$(LDFLAGS) -lpthread" HAVE_LIBBZ2=y HAVE_LIBZ=y
+	dh_auto_build -- MPICXX='$(CXX)' CXXFLAGS="$(CXXFLAGS)" DEBLDFLAGS="$(LDFLAGS) -lpthread" HAVE_LIBBZ2=y HAVE_LIBZ=y
 	#Rename 2 docs to make more sence in package context
 	cp README.md README.Ray
 	cp RayPlatform/README.md README.RayPlatform


More information about the Debian-med-packaging mailing list