Source: combblas
Version: 1.6.2-4
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

combblas fails to cross build from source, because it uses mpicc. mpicc
is unfixable for cross compilation and the only way to make cross
building work is not using mpicc. Fortunately, much of combblas already
uses pkg-config for discovering mpi already. It's just two
subdirectories that fail to propagate the relevant compiler flags. After
doing so, there is no need to use mpicc anymore. Please consider
applying the attached patch.

Helmut
diff --minimal -Nru combblas-1.6.2/debian/changelog 
combblas-1.6.2/debian/changelog
--- combblas-1.6.2/debian/changelog     2019-09-14 16:43:46.000000000 +0200
+++ combblas-1.6.2/debian/changelog     2019-09-18 19:30:51.000000000 +0200
@@ -1,3 +1,10 @@
+combblas (1.6.2-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Improve cross building: Don't use mpicc. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 18 Sep 2019 19:30:51 +0200
+
 combblas (1.6.2-4) unstable; urgency=medium
 
   * Standards-Version: 4.4.0
diff --minimal -Nru combblas-1.6.2/debian/patches/mpi.patch 
combblas-1.6.2/debian/patches/mpi.patch
--- combblas-1.6.2/debian/patches/mpi.patch     1970-01-01 01:00:00.000000000 
+0100
+++ combblas-1.6.2/debian/patches/mpi.patch     2019-09-18 19:30:51.000000000 
+0200
@@ -0,0 +1,20 @@
+--- combblas-1.6.2.orig/graph500-1.2/generator/CMakeLists.txt
++++ combblas-1.6.2/graph500-1.2/generator/CMakeLists.txt
+@@ -3,6 +3,7 @@
+ ADD_LIBRARY( GraphGenlib btrd_binomial_distribution.c splittable_mrg.c 
mrg_transitions.c graph_generator.c permutation_gen.c make_graph.c utils.c 
scramble_edges.c)
+ target_include_directories(GraphGenlib PUBLIC 
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 
$<INSTALL_INTERFACE:include>)
+ target_include_directories(GraphGenlib PRIVATE include/graph500/generator)
++target_include_directories(GraphGenlib PUBLIC "${MPI_C_INCLUDE_PATH}")
+ if(CMAKE_C_COMPILER_ID STREQUAL "Intel")
+   target_compile_options(GraphGenlib PRIVATE "-restrict")
+ endif()
+--- combblas-1.6.2.orig/usort/CMakeLists.txt
++++ combblas-1.6.2/usort/CMakeLists.txt
+@@ -3,6 +3,7 @@
+ ADD_LIBRARY( Usortlib src/parUtils.cpp src/binUtils.cpp )
+ target_include_directories(Usortlib PUBLIC 
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 
$<INSTALL_INTERFACE:include>)
+ target_include_directories(Usortlib PRIVATE include/usort)
++target_include_directories(Usortlib PUBLIC "${MPI_C_INCLUDE_PATH}")
+ 
+ install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ install(TARGETS Usortlib EXPORT CombBLASTargets
diff --minimal -Nru combblas-1.6.2/debian/patches/series 
combblas-1.6.2/debian/patches/series
--- combblas-1.6.2/debian/patches/series        2019-09-14 16:43:46.000000000 
+0200
+++ combblas-1.6.2/debian/patches/series        2019-09-18 19:30:51.000000000 
+0200
@@ -1,2 +1,3 @@
 cmake_multiarch.patch
 sublibs_soname.patch
+mpi.patch
diff --minimal -Nru combblas-1.6.2/debian/rules combblas-1.6.2/debian/rules
--- combblas-1.6.2/debian/rules 2019-09-14 16:43:46.000000000 +0200
+++ combblas-1.6.2/debian/rules 2019-09-18 19:30:51.000000000 +0200
@@ -30,8 +30,6 @@
        dh_auto_configure -- \
             -DBUILD_SHARED_LIBS=ON \
             -DCMAKE_SKIP_RPATH=ON \
-            -DCMAKE_C_COMPILER=mpicc \
-            -DCMAKE_CXX_COMPILER=mpic++ \
             -DMPIEXEC_PREFLAGS=--allow-run-as-root
        tar xzf debian/testdata_combblas*.tgz -C $(BUILDDIR)
 

Reply via email to