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
On Wed, Aug 05, 2026 at 11:24:41AM +0000, Santiago Vila wrote:
>...
> --------------------------------------------------------------------------------
> [...]
> [ 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
> --------------------------------------------------------------------------------
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