#1143681 opm-common: FTBFS: /<<PKGBUILDDIR>>/opm/material/common/quad.hpp:282:13: error: redefinition of 'quad std::abs(quad)'

#1143681#5
Date:
2026-08-05 11:24:41 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202608/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:opm-common, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
[ 25%] Building CXX object CMakeFiles/opmcommon.dir/opm/material/densead/Evaluation.cpp.o
/usr/bin/x86_64-linux-gnu-g++ -DEMBEDDED_PYTHON -DFMT_SHARED [too-long-redacted] material/densead/Evaluation.cpp
In file included from /<<PKGBUILDDIR>>/opm/material/densead/Evaluation.cpp:28:
/<<PKGBUILDDIR>>/opm/material/common/quad.hpp:282:13: error: redefinition of ‘quad std::abs(quad)’
  282 | inline quad abs(quad val)
      |             ^~~
In file included from /usr/include/c++/16/cstdlib:87,
                 from /usr/include/c++/16/ext/string_conversions.h:45,
                 from /usr/include/c++/16/bits/basic_string.h:4499,
                 from /usr/include/c++/16/string:58,
                 from /usr/include/c++/16/stdexcept:41,
                 from /<<PKGBUILDDIR>>/opm/material/densead/Evaluation.hpp:42,
                 from /<<PKGBUILDDIR>>/opm/material/densead/Evaluation.cpp:25:
/usr/include/c++/16/bits/std_abs.h:150:3: note: ‘constexpr __float128 std::abs(__float128)’ previously defined here
  150 |   abs(__float128 __x)
      |   ^~~
make[3]: *** [CMakeFiles/opmcommon.dir/build.make:3840: CMakeFiles/opmcommon.dir/opm/material/densead/Evaluation.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:871: CMakeFiles/opmcommon.dir/all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:149: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j2 INSTALL="install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:17: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1143681#10
Date:
2026-08-14 13:23:18 UTC
From:
To:
Control: reassign 1143684 src:opm-common
Control: tags -1 experimental
Control: forcemerge -1 1143684
Control: affects -1  src:opm-simulators libopm-common-dev
Control: retitle -1 opm-common FTBFS with GCC 16 on amd64
Markus, the root cause is the following in the log that is already
present with earlier GCC version:
  -- Performing Test QuadMath_HAS_MATH_OPS
  -- Performing Test QuadMath_HAS_MATH_OPS - Failed

When I edit cmake/Modules/FindQuadMath.cmake to have empty main() in
the QuadMath_HAS_MATH_OPS check the build passes.


The test fails (also with older GCC versions) due to:

$ cat test.cc
#include <cstdlib>
#include <cmath>
int main()
{
   __float128 b=10;
   __float128 c=std::atan(b);
}
$ g++ test.cc
test.cc: In function ‘int main()’:
test.cc:6:26: error: call of overloaded ‘atan(__float128&)’ is ambiguous
    6 |    __float128 c=std::atan(b);
      |                 ~~~~~~~~~^~~
  • there are 3 candidates
In file included from /usr/include/features.h:539,
                 from /usr/include/x86_64-linux-gnu/c++/16/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/16/bits/c++config.h:733,
                 from /usr/include/c++/16/cstdlib:46,
                 from test.cc:1:
    • candidate 1: ‘double atan(double)’
      /usr/include/x86_64-linux-gnu/bits/mathcalls.h:57:1:
         57 | __MATHCALL_VEC (atan,, (_Mdouble_ __x));
            | ^~~~~~~~~~~~~~
In file included from test.cc:2:
    • candidate 2: ‘constexpr float std::atan(float)’
      /usr/include/c++/16/cmath:138:3:
        138 |   atan(float __x)
            |   ^~~~
    • candidate 3: ‘constexpr long double std::atan(long double)’
      /usr/include/c++/16/cmath:142:3:
        142 |   atan(long double __x)
            |   ^~~~
$


cu
Adrian

#1143681#23
Date:
2026-08-30 10:19:45 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
opm-common, 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 1143681@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Markus Blatt <markus@dr-blatt.de> (supplier of updated opm-common 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: Sun, 30 Aug 2026 11:53:37 +0200
Source: opm-common
Architecture: source
Version: 2025.10+ds-5
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Changed-By: Markus Blatt <markus@dr-blatt.de>
Closes: 1143681
Changes:
 opm-common (2025.10+ds-5) unstable; urgency=medium
 .
   * Fixes ambiguous lookup of abs for __float128 with gcc16 (Closes: #1143681)
Checksums-Sha1:
 73b9610b3cdf6b3291c7c50d59dbb6608d781e8f 3196 opm-common_2025.10+ds-5.dsc
 3a8912e64178ef09c91195dab828f8a6c3311753 23208 opm-common_2025.10+ds-5.debian.tar.xz
 cad3b50d99b0837c8897de92f229859f594b7afa 14960 opm-common_2025.10+ds-5_source.buildinfo
Checksums-Sha256:
 06eb121705bd27bd641f4f9a54fdb1bea047b305c03d9824c9eaebfd294e7af6 3196 opm-common_2025.10+ds-5.dsc
 3f49c1371361f3d7e4195a5a569b7c64c156caf78c0fa1594e770fad9d001fc8 23208 opm-common_2025.10+ds-5.debian.tar.xz
 e2c0ccf630eaa2e95f733d0700f0f9eef9e7e9200338ed5c4734064ad1990eff 14960 opm-common_2025.10+ds-5_source.buildinfo
Files:
 6e40c51de0b0d017950417e7b746bf1d 3196 libs optional opm-common_2025.10+ds-5.dsc
 7b2ec5d86dc2097d2fbc1d23a8ee8978 23208 libs optional opm-common_2025.10+ds-5.debian.tar.xz
 2ce0eb61cd347bf53022a1dabc000462 14960 libs optional opm-common_2025.10+ds-5_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEX5730Qbzr+QcV2vnUAaxd/1SdC8FAmqT/f8ACgkQUAaxd/1S
dC9eoxAAmL6vOhXhpSt3v2ZWgCrY4DikT7BrLbaLJp5azWTaB4Qw/eI9tS6QgNSM
FxzrhGVtuBdP5njwsTlK1OoCzgI61GBV6hxLOhq6+phGciPXuMQImzOaW5u3+bgv
F5QTtTaH/IE+q0xmCmc7N3McM+qqnnQN4rtXY9XFK1/BXFpCOvx9M/dWhzN6oJPS
CSDlS+uu7jMdTDiotsKxKRp3Unk2SxGFsYrhMXA8oGPd9DiZ97wc7XNr4c8fT89Q
SGhStSuhmz8zOHIFTEizFGAEShJI7LC3BjKTftF8Pk2/vQ9ThF0g+DGSJZ4SdP90
coOrEAl/0dMtFnvJtyUYPxPTV+sytIQxPaWK9JgKvj7rl18qQWICTvLUrbrWBoN1
HJ8SX0qwGSIcQD9h4zh+M+41STCpLJlTy1ssjQpwNNFgm3vLFdXB6SCeryTPkH8c
Q3FPohY83t2uZbXLUv/b0K+tdG3fgP6q3nLbNySHJ4dB1V20P07Fse/eOxaa/H30
GTWOi+u6Y352VdpkRme0bcdEwP55pgqilX/aTd7BrjTmwUmz7oU8VAa/Jyp1s8ZG
M3VIt8cynlmpCPtfcz1uj6llS5ijLa3QrM3d2t2ak96U8WCK3pyTDRn83V/NZtcU
MzvcDr1yx+7XEQH41gpDdzIhXK4b4AdaE/6pqfol6Vs7NlkQBSM=
=xqxS
-----END PGP SIGNATURE-----