Your message dated Fri, 19 Feb 2021 16:18:45 +0000
with message-id <[email protected]>
and subject line Bug#980484: fixed in gmap 2021-02-12+ds-1
has caused the Debian Bug report #980484,
regarding gmap FTCBFS: AC_RUN_IFELSE
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
980484: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=980484
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: gmap
Version: 2020-12-17+ds-2
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

gmap fails to cross build from source, because it uses AC_RUN_IFELSE a
lot. I wa able to reduce the impact somewhat with the attached patch:
 * When checking for e.g. __builtin_popcount, still check that it works
   on native builds, but during cross builds assume that it works when
   the symbol is available.
 * The bsr assembler instruction test doesn't gain anything from running
   it. It can be demoted to a link test.
 * Checks involving #include <immintrin.h> can be skipped when the
   header is unavailable.

This still leaves a number of remaining AC_RUN_IFELSE and gmap will not
become cross buildable. Please consider applying my patch as an
incremental improvement nonetheless.

Helmut
--- gmap-2020-12-17+ds.orig/config/builtin-popcount.m4
+++ gmap-2020-12-17+ds/config/builtin-popcount.m4
@@ -33,29 +33,41 @@
 # Test for __builtin functions with or without the -mpopcnt compiler flag
 CFLAGS="$CFLAGS_ORIG $POPCNT_CFLAGS"
 
-AC_MSG_CHECKING(for __builtin_popcount)
+AC_CHECK_DECL([__builtin_popcount],[
+AC_MSG_CHECKING(whether __builtin_popcount works)
 AC_RUN_IFELSE(
   [AC_LANG_PROGRAM([[]],
                    [[return (__builtin_popcount(0xffffffffu) == 32) ? 0 : 9;]])],
   [AC_MSG_RESULT(yes)
    AC_DEFINE([HAVE_BUILTIN_POPCOUNT],[1],[Define to 1 if __builtin_popcount works.])],
-  [AC_MSG_RESULT(no)])
+  [AC_MSG_RESULT(no)],
+  [AC_MSG_RESULT([cross, guessing yes])
+   AC_DEFINE([HAVE_BUILTIN_POPCOUNT],[1],[Define to 1 if __builtin_popcount works.])])
+],[])
 
-AC_MSG_CHECKING(for __builtin_clz)
+AC_CHECK_DECL([__builtin_clz],[
+AC_MSG_CHECKING(whether __builtin_clz works)
 AC_RUN_IFELSE(
   [AC_LANG_PROGRAM([[]],
                    [[return (__builtin_clz(0x1u) == 31) ? 0 : 9;]])],
   [AC_MSG_RESULT(yes)
    AC_DEFINE([HAVE_BUILTIN_CLZ],[1],[Define to 1 if __builtin_clz works.])],
-  [AC_MSG_RESULT(no)])
+  [AC_MSG_RESULT(no)],
+  [AC_MSG_RESULT([cross, guessing yes])
+   AC_DEFINE([HAVE_BUILTIN_CLZ],[1],[Define to 1 if __builtin_clz works.])])
+],[])
 
-AC_MSG_CHECKING(for __builtin_ctz)
+AC_CHECK_DECL([__builtin_ctz],[
+AC_MSG_CHECKING(whether __builtin_ctz works)
 AC_RUN_IFELSE(
   [AC_LANG_PROGRAM([[]],
                    [[return (__builtin_ctz(0x80000000u) == 31) ? 0 : 9;]])],
   [AC_MSG_RESULT(yes)
    AC_DEFINE([HAVE_BUILTIN_CTZ],[1],[Define to 1 if __builtin_ctz works.])],
-  [AC_MSG_RESULT(no)])
+  [AC_MSG_RESULT(no)],
+  [AC_MSG_RESULT([cross, guessing yes])
+   AC_DEFINE([HAVE_BUILTIN_CTZ],[1],[Define to 1 if __builtin_ctz works.])])
+])
 
 CFLAGS=$CFLAGS_ORIG
 
--- gmap-2020-12-17+ds.orig/config/asm-bsr.m4
+++ gmap-2020-12-17+ds/config/asm-bsr.m4
@@ -4,7 +4,7 @@
 AC_LANG(C)
 
 AC_MSG_CHECKING(for bsr instruction in assembly)
-AC_RUN_IFELSE(
+AC_LINK_IFELSE(
   [AC_LANG_PROGRAM([[ ]],
                    [[int msb; unsigned int x = rand(); asm("bsr %1,%0" : "=r"(msb) : "r"(x));]])],
   [AC_MSG_RESULT(yes)
--- gmap-2020-12-17+ds.orig/config/ax_cpuid_intel.m4
+++ gmap-2020-12-17+ds/config/ax_cpuid_intel.m4
@@ -1,6 +1,7 @@
 AC_DEFUN([AX_CPUID_INTEL],
 [AC_REQUIRE([AC_PROG_CC])
 AC_LANG_PUSH([C])
+AC_CHECK_HEADER([immintrin.h],[
 # Test for SSE2 support
   AC_MSG_CHECKING(for sse2 support)
   AC_RUN_IFELSE(
@@ -63,7 +64,7 @@
         [AC_MSG_RESULT(yes)
          ax_cv_cpu_has_avx512bw_ext=yes],
 	[AC_MSG_RESULT(no)])
-
+],[])
 AC_LANG_POP([C])
 ])
 

--- End Message ---
--- Begin Message ---
Source: gmap
Source-Version: 2021-02-12+ds-1
Done: Michael R. Crusoe <[email protected]>

We believe that the bug you reported is fixed in the latest version of
gmap, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael R. Crusoe <[email protected]> (supplier of updated gmap package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 19 Feb 2021 16:32:15 +0100
Source: gmap
Architecture: source
Version: 2021-02-12+ds-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team 
<[email protected]>
Changed-By: Michael R. Crusoe <[email protected]>
Closes: 980484
Changes:
 gmap (2021-02-12+ds-1) unstable; urgency=medium
 .
   * Team upload.
   * Apply patch from Helmut Grohne for slightly better cross building
     support. Closes: #980484
   * New upstream release.
Checksums-Sha1:
 19adf2bf851f01563a3bd0c22f874b139c6c8ae9 2199 gmap_2021-02-12+ds-1.dsc
 c913eec311757be28dff5d8a6ca57056b25bd890 2493932 gmap_2021-02-12+ds.orig.tar.xz
 16c18d72a8f040d5f8855d8051a0d875f6550d2a 11340 
gmap_2021-02-12+ds-1.debian.tar.xz
 e9e4cfd8c3df5087a9cf2a5434f405f110255228 6048 
gmap_2021-02-12+ds-1_source.buildinfo
Checksums-Sha256:
 471f9d977b711d945f9b2bbf34a4211c67708d0e94b531547fe0d88eed8e6053 2199 
gmap_2021-02-12+ds-1.dsc
 e9d5f3860ff092b8412dd775d60949706fd968f054e5ed65503a2cddd4b7ae5a 2493932 
gmap_2021-02-12+ds.orig.tar.xz
 9729a6109b193751129994afc0fc7f7040e4d796eb92abe4ea60f17b0df8dd1e 11340 
gmap_2021-02-12+ds-1.debian.tar.xz
 50083b096078122bee0521f3569b2546b523f5c1dc69e96e1e89340dabbec383 6048 
gmap_2021-02-12+ds-1_source.buildinfo
Files:
 5cf7b1ed808452b17ca9238724c17581 2199 science optional gmap_2021-02-12+ds-1.dsc
 44e64eed029a611396f93dcc6b386020 2493932 science optional 
gmap_2021-02-12+ds.orig.tar.xz
 13af3e15d6fd4e910a3ce72f636c5155 11340 science optional 
gmap_2021-02-12+ds-1.debian.tar.xz
 0343b242606d567f6d4d84a1cb8eca9e 6048 science optional 
gmap_2021-02-12+ds-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEck1gkzcRPHEFUNdHPCZ2P2xn5uIFAmAv2rEACgkQPCZ2P2xn
5uKojQ//VLtwj70Hv3ffORK4wAuexwnoSCkLM9bTE9nkTcjgnFt6mulNGfURy4zE
nbnhSFApVHWPVYG1zg54gX4sfBP0Oo32q7nQ42xyod6uKmBf2iHHEXoTqADHvSXJ
7jLjzVbeB6NqQDhDdbrWeQ/fqU8TDRGYku0jHTdmbZ1ad7iR+EphoFh/mJhVDr0d
bOGLVJ8SFn+m3tHXLzG9NMugPXdZYqgp8AhiM1pfKdBHekoBNdEihWTlrRSm2jEZ
cDToYUYuvy+KwHOswteTB3+srs/kr0NmLcGyv6UZfWDbI6ZuvUGsjbVrPxNYnPGD
yThvk9xJkZkW/QB5CGA8lC1MQSiz40MEVPqE83Pb9Ht+bbZV9OexMOV+vg+nFyN4
vQOpyyO56rpkzNMhD+tPijfMesfjlNqCZAOvQBs0DFu57njH8UmhHRCcbj5AkD0b
7a4+BlAeMolwW6/SxzbnTN83nxvuvn/ckBP/bz2aBKBnlqL2hyK1UPWWWziafg6i
3f98ECGo3ph8DbLU3qu12eBWDcxCaukOOk9ebEibfYzkoLU7TTMabIvxpPvdA7UL
lwkbxj/dVFQMrs44Kyf40WmHuw0fXtDej987ikzI4giRuirr93r24YqyeXUlIYRD
dDubeKUV3+oQNJ0V3tpPMgNjHCHEiw5aysJyanfMWSxCoxvlqTg=
=0Les
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to