#1009622 ck: FTBFS on armhf due to wrong -march target

Package:
ck
Source:
ck
Submitter:
Steve Langasek
Date:
2022-07-07 08:51:06 UTC
Severity:
important
Tags:
#1009622#5
Date:
2022-04-13 06:39:09 UTC
From:
To:
Package: ck
Version: 0.7.1-6
Severity: important
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch

Hi Daniel,

In Ubuntu, ck fails to build on armhf because the upstream build system is
passing an explicit -march option that is no longer correct because it does
not include floating-point support which is implicit in armhf:

[...]
/usr/bin/cc -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv7-a -fPIC -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -std=gnu99 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv7-a -fPIC -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/include -D__arm__ -c -o /<<PKGBUILDDIR>>/src/ck_barrier_tournament.o /<<PKGBUILDDIR>>/src/ck_barrier_tournament.c
cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU
cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU
[...]

  (https://launchpad.net/ubuntu/+source/ck/0.7.1-6/+build/22357550)

I have not verified whether this build failure exists with the current
toolchain in Debian, therefore I am not marking this as a serious bug;
however, I expect that if this toolchain change has not yet happened in
Debian, it will happen soon.

I have applied the attached patch in Ubuntu to let ck build by choosing an
appropriate cpu target of -march=armv7-a+fp.  Please consider applying it in
Debian as well.  Alternatively, upstream could just not override the -march
at all and trust the compiler defaults.

Thanks,

#1009622#10
Date:
2022-04-13 07:18:58 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ck, 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 1009622@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel.baumann@progress-linux.org> (supplier of updated ck 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 ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 13 Apr 2022 08:50:08 +0200
Source: ck
Architecture: source
Version: 0.7.1-7
Distribution: sid
Urgency: medium
Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
Changed-By: Daniel Baumann <daniel.baumann@progress-linux.org>
Closes: 1009622
Changes:
 ck (0.7.1-7) sid; urgency=medium
 .
   * Uploading to sid.
   * Overwriting armhf platform target to fix FTBFS with newer GCC (Closes:
     #1009622).
Checksums-Sha1:
 c7dc6786b977d2a9728ee90de066eff8120d7ca4 1910 ck_0.7.1-7.dsc
 7c6b676b1ccd58fc08073b1a6228ae236a940a5b 4732 ck_0.7.1-7.debian.tar.xz
 f9e2bb208790734a46ee146e8dc2050a1a86d88b 6336 ck_0.7.1-7_amd64.buildinfo
Checksums-Sha256:
 a7d8d7cbcbb2c8d935903a55ad11d8e6dfeaa23889fdad393118e15b6fff2991 1910 ck_0.7.1-7.dsc
 08232516f83b2c96e837c9fda83aa346d3592e74ced3aa7b15355b31ff1d2cd6 4732 ck_0.7.1-7.debian.tar.xz
 e872c40d542f1066e70942152803ae5429d791074af5a84361084b568039e6af 6336 ck_0.7.1-7_amd64.buildinfo
Files:
 d22f0711ccb60af67f2041890c112c1b 1910 libs optional ck_0.7.1-7.dsc
 688977c1fd8a5739a7efc282d162b129 4732 libs optional ck_0.7.1-7.debian.tar.xz
 434cf2db4d8c2326dc7641ff6abebe00 6336 libs optional ck_0.7.1-7_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEgTbtJcfWfpLHSkKSVc8b+YaruccFAmJWc+EACgkQVc8b+Yar
ucfn0A/+MJMLGdKybepD/j7z+lQUyEX/RcFvY5HhJCQNTzz0ZRw0cF+r27Hw44Kr
VupuM6+PRwnI5rtRb/EtPgMDGiqcG1vmTBdB4fCQzhA7LTXtF4tMaSp+JERub1Uz
4oM9cpW+3yFZXb4GmpSoflQcKHFZiUg8VMy1z2hnAlg+X+2aVC+CWG7+L+SleB7a
Ph1XWgG2p1gtW66l8p9D2Vviep43eJJrFQ1xOo32IRHPuud87VSITrMjsIuAzx8v
ay1uV+lMCuY75/hDPz7c61DT75dh+NSvqYRhiX4xc5Evu4+EkKauI2unYLyUd1Z4
iIgQXkSnc13QT4CkXhHAHLVY10WYa8COIus/jmge9pb1IkUFUH55HQwysLPZ/lr5
u3bowQQlha62PlfY0YNl2wJb8xRMKynQtZfB1FNo5AEAsltnostgEpVMUk6EYegM
QjwBw4xrzoAHbkupuk1ig54FdPcD1HnNbYbI5cs0+rrf8m7PeaIKlhwWpmmf/auN
fHaJCn2mPUBChE3gJ8PGWlxAIOfFhJ0yh3t8qWrHjdkdNHW+u9Dm/7M+iP5iUPza
38Bi1Fw+03ZiSu53cAqN0Y0O7SS2jzWnYGQodiMMSUCOqAa7UY1zeg4QvlDnBIaW
1PFQytbBphBAuiEGC0yPQrSFOGf5Z4fQYOMKzykE0jbzelkFA94=
=gSaN
-----END PGP SIGNATURE-----

#1009622#15
Date:
2022-04-13 15:06:12 UTC
From:
To:
Thanks for the quick turnaround, unfortunately it seems my fix is
insufficient.  It worked in a test build only because the environment I was
testing on returned armv8l for platform instead of armv7.  On a real armv7
system, the additional -march argument is unfortunately added to the
commandline BEFORE the one from the upstream build system, which overrides
it.  So surgery on the upstream build system is required.

#1009622#24
Date:
2022-04-13 15:20:24 UTC
From:
To:
Please find attached an updated patch.
#1009622#29
Date:
2022-07-07 08:49:02 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ck, 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 1009622@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel.baumann@progress-linux.org> (supplier of updated ck 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 ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 07 Jul 2022 10:14:36 +0200
Source: ck
Architecture: source
Version: 0.7.1-8
Distribution: sid
Urgency: medium
Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
Changed-By: Daniel Baumann <daniel.baumann@progress-linux.org>
Closes: 1009622
Changes:
 ck (0.7.1-8) sid; urgency=medium
 .
   * Uploading to sid.
   * Updating to standards version 4.6.1.
   * Adding patch from Steve Langasek <steve.langasek@canonical.com> to fix
     FTBFS on armhf (Closes: #1009622).
Checksums-Sha1:
 523cba7aa93d42fd3d62c8dd51379edca87e6784 1910 ck_0.7.1-8.dsc
 224584481e0b76768aed492f6398fcbe85d4b1e3 5036 ck_0.7.1-8.debian.tar.xz
 d0708b4cc38a2c792b2ca1e5e5278ddfb5184d0b 6395 ck_0.7.1-8_amd64.buildinfo
Checksums-Sha256:
 b2818d9f89a7c45edc04b4aead97ddcf3d74d94a1305ae1195c083e88ad6f8d9 1910 ck_0.7.1-8.dsc
 359248e9fc16b5a985c15d14b39a65564747773f178737a0d43089412ad433a4 5036 ck_0.7.1-8.debian.tar.xz
 1854e213ee560cd9edc2590d6d99bc79271a4b65ee49eb90576f762e0234b7b6 6395 ck_0.7.1-8_amd64.buildinfo
Files:
 c586ace538bc089229654b1fd425685e 1910 libs optional ck_0.7.1-8.dsc
 04be502b0423cfb50ee1572b50efb958 5036 libs optional ck_0.7.1-8.debian.tar.xz
 a1c3d53d0ff83442f414abf674700c13 6395 libs optional ck_0.7.1-8_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEgTbtJcfWfpLHSkKSVc8b+YaruccFAmLGl00ACgkQVc8b+Yar
ucfWOw//U5gEZlxPB39GUBYkzz39IB9piQ1dfhXpsOvPZXQ6J0a88uN2FD9J+1LH
BLOqXdyzjZN5AZCY4KTMbDWHY6xeBY/j1pA9v1P1fuK4bVPDCWe6G6b6szzBojY6
gQsIIizPFTeWnEm7lIHqlTldhfJxtpwh5OUHiVOuEP1pzVqwW6gng9CV0eAdVGw/
yxu1l7gfUwHGMq+kcR/QnoGT5w6Dt6WSBPkHHFE41y8kQC5ANrHd42UTvCiN8+II
BQFDDraXT2Zqkj5TnW/XMYzQxD1gk7ge0n5KmZZH2quM4cidtQn0C+/ErGBk14l2
mLgsvlymYiJ9QwVRV5HIvQgzleoNgy/GPu2CZWhBPEHUl/4VsJNlfH1TOJlk1Mtl
zV0xQAJyUdriyvMT+k3G0nbgTJcRV3mWGWJsOtIbsP05XIUyT1s74zzWlV1uHGD8
GHaykxIN3WpRtaI1vdYusaCzx4YeuoXJpsB2naW6F0xUJzGa0+vDvV2Wo2tSJazv
xd9e2P8PLh+H6e+OuqWcEtWRhVWPckjfAVTqRIEIi/SN2VGvtXBAv0tYBMxhDy4o
8repDuv9PP4OLqsd3/8gCNgWNAY3ARyyWgKFuRsnKqQbq5HAobv+7Hb7GbVWnXJ+
KhTSsRSQwWF2DB3BJqeKSmVFPorcUvnlaIkeJotAItS4zjXuzS8=
=bXhQ
-----END PGP SIGNATURE-----