[Debian-med-packaging] Bug#943311: hyphy: please add pkg-config to Build-Depends for cross compilation

Helmut Grohne helmut at subdivi.de
Wed Oct 23 08:15:19 BST 2019


Source: hyphy
Version: 2.3.14+dfsg-2
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

hyphy fails to cross build from source, because it fails finding mpi.
This happens, because cmake's FindMPI.cmake uses compiler wrappers such
as mpicc to discover mpi. Such compiler wrappers cannot work at all for
cross building and they will not be supported on Debian at all. Beyond
breaking cross compilation, compiler wrappers become a pain when you
need two of them (e.g. ccache/distcc/mpicc/...). As such they should be
avoided and the natural solution for this case is using pkg-config,
which is well-supported by all major mpi providers since ages.  Making
FindMPI.cmake use pkg-config is a separate issue outside the scope of
hyphy and there will be a separate bug about that. However, hyphy needs
to depend on pkg-config. Therefore, please add pkg-config to
Build-Depends. You can make this dependency conditional to cross
compilation by annotating it with <cross> if you like, because we'll
keep using mpicc for the native case. I don't think the unconditional
dependency hurts. Please consider applying the attached patch and
understand that it is only half of the picture: The required changes to
cmake are still to be filed. Applying this patch early will make it
easier to develop the cmake patch. I'm attaching my first draft for
reference only.

Helmut
-------------- next part --------------
diff --minimal -Nru hyphy-2.3.14+dfsg/debian/changelog hyphy-2.3.14+dfsg/debian/changelog
--- hyphy-2.3.14+dfsg/debian/changelog	2019-07-05 15:45:06.000000000 +0200
+++ hyphy-2.3.14+dfsg/debian/changelog	2019-10-23 09:00:30.000000000 +0200
@@ -1,3 +1,11 @@
+hyphy (2.3.14+dfsg-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add pkg-config to Build-Depends as FindMPI.cmake will need it for cross
+    compilation. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Wed, 23 Oct 2019 09:00:30 +0200
+
 hyphy (2.3.14+dfsg-2) unstable; urgency=medium
 
   [ Saira Hussain ]
diff --minimal -Nru hyphy-2.3.14+dfsg/debian/control hyphy-2.3.14+dfsg/debian/control
--- hyphy-2.3.14+dfsg/debian/control	2019-07-05 15:45:06.000000000 +0200
+++ hyphy-2.3.14+dfsg/debian/control	2019-10-23 08:19:10.000000000 +0200
@@ -8,7 +8,8 @@
                mpi-default-dev,
                libcurl4-gnutls-dev | libcurl4-dev,
                libssl-dev,
-               libsqlite3-dev
+               libsqlite3-dev,
+               pkg-config,
 Standards-Version: 4.3.1
 Vcs-Browser: https://salsa.debian.org/med-team/hyphy
 Vcs-Git: https://salsa.debian.org/med-team/hyphy.git
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpipkgconfig.patch
Type: text/x-diff
Size: 2911 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20191023/9ed4062c/attachment.patch>


More information about the Debian-med-packaging mailing list