#1012302 apbs: ftbfs on riscv64: error: ‘_FPU_MASK_IM’ undeclared (first use in this function)

Package:
apbs
Source:
apbs
Description:
Adaptive Poisson Boltzmann Solver
Submitter:
Bo YU
Date:
2022-06-04 08:51:03 UTC
Severity:
minor
Tags:
#1012302#5
Date:
2022-06-03 09:28:09 UTC
From:
To:
Dear Maintainer,

The apbs package has ftbfs on riscv64:

```
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:305:17: error: ‘_FPU_MASK_IM’ undeclared (first use in this function)
  305 |         cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
      |                 ^~~~~~~~~~~~
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:305: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:305:32: error: ‘_FPU_MASK_ZM’ undeclared (first use in this function)
  305 |         cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
      |                                ^~~~~~~~~~~~
[  8%] Building C object _deps/fetk-build/punc/src/cgcode/CMakeFiles/cgcode.dir/spcgnr.c.o
/<<PKGBUILDDIR>>/debian/external_deps/fetk/punc/src/vf2c/uninit.c:305:47: error: ‘_FPU_MASK_OM’ undeclared (first use in this function)
  305 |         cw &= ~(_FPU_MASK_IM | _FPU_MASK_ZM | _FPU_MASK_OM);
      |                                               ^~~~~~~~~~~~
```

The full buildd is here:

https://buildd.debian.org/status/fetch.php?pkg=apbs&arch=riscv64&ver=3.4.1-3&stamp=1654099965&raw=0

And I refer to here[0], becasue the fpu_control.h on riscv64 does not
have these macroes are defined, so I am intend to add these macroes in
uninit.c by manual.

Tha patch attached is fix the issue and it is build ok on localy.

```
Build Architecture: riscv64
Build Type: binary
Build-Space: 436052
Build-Time: 1883
Distribution: UNRELEASED
Host Architecture: riscv64
Install-Time: 245
Job: /home/vimer/build/06/02_apbs/apbs_3.4.1-4.dsc
Lintian: warn
Machine Architecture: amd64
Package: apbs
Package-Time: 2170
Source-Version: 3.4.1-4
Space: 436052
Status: successful
Version: 3.4.1-4
--------------------------------------------------------------------------------
Finished at 2022-06-03T07:43:04Z
Build needed 00:36:10, 436052k disk space
```

Please consider to apply it in next upload and if any issue please let
me know.

PS: I noticed there is different with abps on sala repo and sid.
I have to switch the newest repo to build it:)

[0]: https://github.com/Electrostatics/FETK/issues/71

#1012302#8
Date:
2022-06-03 15:36:50 UTC
From:
To:
Hello,

Bug #1012302 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/fc4d3509ea40ab4f4a5efeda85e54f90a88c6add
------------------------------------------------------------------------
patch FETK punc vf2c/uninit.c to define Masks for riscv64 interrupts

Thanks Bo YU.

Closes: #1012302.
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1012302

#1012302#15
Date:
2022-06-04 08:49:11 UTC
From:
To:
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 1012302@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: Sat, 04 Jun 2022 09:58:09 +0200
Source: apbs
Architecture: source
Version: 3.4.1-4
Distribution: unstable
Urgency: medium
Maintainer: Debichem Team <debichem-devel@lists.alioth.debian.org>
Changed-By: Drew Parsons <dparsons@debian.org>
Closes: 1012302
Changes:
 apbs (3.4.1-4) unstable; urgency=medium
 .
   * Team upload.
   * update patch on FETK punc component vf2c/uninit.c to test for
     availability of _FPU_MASK_IM rather than __mips to allow riscv64
     to build.
   * patch FETK punc component vf2c/uninit.c to define Masks for
     riscv64 interrupts. Thanks Bo YU. Closes: #1012302.
   * Standards-Version: 4.6.1
Checksums-Sha1:
 1bfb84d418dd8857eabff835e831d7c141d507b7 2639 apbs_3.4.1-4.dsc
 aa1a0f5d77284b1a48caf721497dd0805f70205b 20296516 apbs_3.4.1-4.debian.tar.xz
Checksums-Sha256:
 89324f7566273fd93d70adfa069a8ab0d97a1a069ed1279791aa0cfa71f8357f 2639 apbs_3.4.1-4.dsc
 445e8abde1de6771e11596a297992414b153f0539a7fb454fcc0e6ae55413870 20296516 apbs_3.4.1-4.debian.tar.xz
Files:
 2fdcd8c09266fa2681ff97e1d0c26a4d 2639 science optional apbs_3.4.1-4.dsc
 db710f1269afa77ab8b2b28ec8a31782 20296516 science optional apbs_3.4.1-4.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEI8mpPlhYGekSbQo2Vz7x5L1aAfoFAmKbFv8ACgkQVz7x5L1a
AfobWw/6Ak1RfJnNuu4ZvlwXubypGl9QFJaxNMin5y9LWYicUk2Ijjs2iBX/tiaM
oLjCOyvvyN3gvFhub1WaCzJXwCI/Fw5tV6LDG70FXfjmEPSZdTuZK4T9YC+1NRqg
ow23NebEphrJ8gY+ocTM7eEoldRKcoQGDPCPxUbMDifZwMIhEUeolyMzjxIce+Cr
Whze8vo3eVedyWUOcraAxaXo9UYcWyxJwdjJpuyaXUyFqGXiqk/gKL4QIzdSnjGZ
8py1XmIY+N/ARGszYvd8ASLjExaf/x7KEy8frzy6y+bCbrA8zG8ulnsg3+ezRgAW
EBO/WLAEvxqP77/E+ROp+A6KtyIMEM4R8R25XwOPxLqgi8XH21Ro4tZolLJDnFSd
FcjL8BR+falLbftVDFM9mK43VKR9R81RKC0W+HNTy7l1TDFA3c1IbzVxbrMDkVQE
5MBX3+Mq2MI6CGdSWMFGOFXkKoM/vnMxM0NNOLP88aZbIfp0B0c8wfbk7mKyI1Mi
TgAaeKU1miTWhoxjnqypBgZ50bT+6fkSk0lAiVmWcbEF83bPw+rIsZhwdjHy9JqA
dJJhjR+a9V7vhoQ8EuZl1m932rP/CFMwXNJhLMnszVcUzbSTrr331qp2vjS7kGsZ
5psG7KXo/mm6NtWmwYREYe8HvQAcIGGxOEnEdpWHy4dt1HWhgBw=
=QX5y
-----END PGP SIGNATURE-----