vf2c (punc component) is failing to build on MIPS architecture (specifically mip64el and 32-bit mipsel) on Debian Linux. The problem arises in uninit.c
There is a __mips section in uninit.c with
#ifdef __mips /* must link with -lfpe */
#define IEEE0_done
/* code from Eric Grosse */
#include <stdlib.h>
#include <stdio.h>
#include "/usr/include/sigfpe.h" /* full pathname for lcc -N */
#include "/usr/include/sys/fpu.h"
A standard build attempt fails since these header files don't exist (with gcc on linux). A full build log can be found here.
If I skip that section by patching to
#if defined (__mips) && !defined (__linux__)
then the build fails with
[ 9%] Building C object _deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/uninit.c.o
cd /<<PKGBUILDDIR>>/obj-mips64el-linux-gnuabi64/_deps/fetk-build/punc/src/vf2c && /usr/bin/cc -Dvf2c_EXPORTS -I/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c -I/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/punc -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fcommon -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/tirpc -O2 -g -DNDEBUG -fPIC -fPIC -MD -MT _deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/uninit.c.o -MF CMakeFiles/vf2c.dir/uninit.c.o.d -o CMakeFiles/vf2c.dir/uninit.c.o -c /<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c: In function ‘ieee0’:
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:302:17: error: ‘_FPU_MASK_IM’ undeclared (first use in this function)
302 | cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
| ^~~~~~~~~~~~
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:302:17: note: each undeclared identifier is reported only once for each function it appears in
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:302:32: error: ‘_FPU_MASK_ZM’ undeclared (first use in this function)
302 | cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
| ^~~~~~~~~~~~
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:302:47: error: ‘_FPU_MASK_OM’ undeclared (first use in this function)
302 | cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
| ^~~~~~~~~~~~
make[3]: *** [_deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/build.make:331: _deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/uninit.c.o] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-mips64el-linux-gnuabi64'
make[2]: *** [CMakeFiles/Makefile2:764: _deps/fetk-build/punc/src/vf2c/CMakeFiles/vf2c.dir/all] Error 2
Full build log here. This error also occurs on riscv64.
mipsel (32-bit) gives the same build errors as mips64el.
Hello, Bug #1012177 in apbs reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/debichem-team/apbs/-/commit/28e3b1616e76f47afe20d29a2b99b51938f40bca ------------------------------------------------------------------------ patch FETK punc component vf2c/uninit.c to use specific MIPS masks fpu masks used with _FPU_SETCW. Closes: #1012177. ------------------------------------------------------------------------ (this message was generated automatically) -- Greetings https://bugs.debian.org/1012177
We believe that the bug you reported is fixed in the latest version of
apbs, 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 1012177@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Drew Parsons <dparsons@debian.org> (supplier of updated apbs 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, 01 Jun 2022 13:43:34 +0200
Source: apbs
Architecture: source
Version: 3.4.1-3
Distribution: unstable
Urgency: medium
Maintainer: Debichem Team <debichem-devel@lists.alioth.debian.org>
Changed-By: Drew Parsons <dparsons@debian.org>
Closes: 1012177
Changes:
apbs (3.4.1-3) unstable; urgency=medium
.
* Team upload.
* patch FETK punc component vf2c/uninit.c to use specific MIPS fpu
masks with _FPU_SETCW. Closes: #1012177.
Checksums-Sha1:
06794fd98af252eda49d0f3eb36f062002067275 2639 apbs_3.4.1-3.dsc
5465cfda14209e1aacaeec469847cbad450208c0 20297968 apbs_3.4.1-3.debian.tar.xz
Checksums-Sha256:
1e139db475461feff31f18179dfdad1a88ea30e73eee00fb1125bc90e16ed381 2639 apbs_3.4.1-3.dsc
7c6eab09016ea802c4bb69ccfda8592deb8035342c5f0b7e1d4c082d5a3ccd4a 20297968 apbs_3.4.1-3.debian.tar.xz
Files:
c2747970f44b2d50fd06c16cf9abbf40 2639 science optional apbs_3.4.1-3.dsc
152e25cddc44bf53ba29ec64e4c2e8b5 20297968 science optional apbs_3.4.1-3.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEI8mpPlhYGekSbQo2Vz7x5L1aAfoFAmKXf3oACgkQVz7x5L1a
AfqzIA//fQBgMRK83COHmgzASKYAgfR9ZFrKujXwcnSS2jNSv8uH5Qpvq+BFvcmj
DMaX6U9daDvvW7HiWdSE/c543owBLVL/QgPC0+aXbwVy4LqlRMDornSrwV6CQi5C
w2FJcQNSO3ZFiuOU/xeAz9M4b34bvhjYtWrW4DwWgEDcjn6uXNWPME1pqSIYvbJJ
JlfwPhd7K9TKanUUfk310lkmDdekzY7oIaSPHJ75hGIzEd9OQ2AAs1TT48zEEEZH
K3PC+bqVfiniOKOD9PbZ7Fccw3zDA2KBiNbwHWwwhPJ7sZ7w1zLmv5Ik9t1BbQ0z
InIKJdr7Q5el8OOmzW06Frey+MmIX/f/w7yACo0hRTTardtXLzuCB+1k0mqzQAHr
PRPXBIAazTiXNPfkgiQakp16lRZm944TepRFwf8vpoj261lckV12dk307rWoUGV+
23YepM5wgwptyoIAqN9dP36cgoTpGpFrYJWQ4gUPhI2IvSyx0bzS1bE+TSZFf5EJ
uihFBh6j1SlDxBCn2E1G0xVJs1/wxf2BB6OfoCbtj3c8NhFDVD6R4GKASHJg70LR
Ts2gA+zzUARhAusTik4IMqy/IiWJsqzWhU+YA6zgweCmS9FTOz7PKEt8FvMK52ro
c+vxvTRle73GxTHXPlr+OiYU0MFWAeMwHWcNuynNKZSFNUUTtX4=
=AoGf
-----END PGP SIGNATURE-----