Skip to content

ROOT 6.40.00 seems won't compile with Clang + GCC 16 standard library #22370

Description

@zhao-shihan

Check duplicate issues.

  • Checked for duplicates

Description

ROOT 6.40.00 cannot be built by clang or icpx with libstdc++ from GCC 16.1, but can be build with GCC 15.2 or 16.1.

Compiler Can it build?
Intel icpx 2025.3.0
Clang 21.1.8
GCC 15.2
GCC 16.1

I think the issue raises from some kind of type mismatch with stdex::simd, but I haven't investigate it thoroughly yet.

[3896/5868] Building CXX object math/mathcore/CMakeFiles/MathCore.dir/src/FitUtil.cxx.o
FAILED: [code=1] math/mathcore/CMakeFiles/MathCore.dir/src/FitUtil.cxx.o 
/opt/intel/oneapi/2025.3.0/compiler/2025.3/bin/icpx -DROOT_CORE_THREAD_TBB -I/build/root/6.40.00/root-6.40.00/math/mathcore/inc -I/build/root/6.40.00/root-6.40.00/core/unix/../clib/res -I/build/root/6.40.00/root-6.40.00/core/unix/inc -I/build/root/6.40.00/root-6.40.00/core/zstd/inc -I/build/root/6.40.00/root-6.40.00/core/lz4/inc -I/build/root/6.40.00/root-6.40.00/core/lzma/inc -I/build/root/6.40.00/root-6.40.00/core/zip/inc -I/build/root/6.40.00/root-6.40.00/core/thread/inc -I/build/root/6.40.00/root-6.40.00/core/textinput/src -I/build/root/6.40.00/root-6.40.00/core/textinput/inc -I/build/root/6.40.00/root-6.40.00/core/rint/inc -I/build/root/6.40.00/root-6.40.00/core/meta/inc -I/build/root/6.40.00/root-6.40.00/core/gui/inc -I/build/root/6.40.00/root-6.40.00/core/foundation/res -I/build/root/6.40.00/root-6.40.00/core/foundation/inc -I/build/root/6.40.00/root-6.40.00/core/cont/inc -I/build/root/6.40.00/root-6.40.00/core/clingutils/res -I/build/root/6.40.00/root-6.40.00/core/clingutils/inc -I/build/root/6.40.00/root-6.40.00/core/clib/inc -I/build/root/6.40.00/root-6.40.00/core/base/inc -I/build/root/6.40.00/root-6.40.00/core/base/src -I/build/root/6.40.00/build/ginclude -I/build/root/6.40.00/root-6.40.00/core/imt/inc -I/build/root/6.40.00/root-6.40.00/core/multiproc/inc -I/build/root/6.40.00/root-6.40.00/net/net/inc -I/build/root/6.40.00/root-6.40.00/io/io/inc -xHost -pthread -O3 -DNDEBUG -std=c++20 -fPIC -MD -MT math/mathcore/CMakeFiles/MathCore.dir/src/FitUtil.cxx.o -MF math/mathcore/CMakeFiles/MathCore.dir/src/FitUtil.cxx.o.d -o math/mathcore/CMakeFiles/MathCore.dir/src/FitUtil.cxx.o -c /build/root/6.40.00/root-6.40.00/math/mathcore/src/FitUtil.cxx
In file included from /build/root/6.40.00/root-6.40.00/math/mathcore/src/FitUtil.cxx:13:
In file included from /build/root/6.40.00/root-6.40.00/math/mathcore/inc/Fit/FitUtil.h:17:
In file included from /build/root/6.40.00/root-6.40.00/math/mathcore/inc/Math/IParamFunction.h:23:
In file included from /build/root/6.40.00/root-6.40.00/math/mathcore/inc/Math/Util.h:29:
In file included from /build/root/6.40.00/root-6.40.00/math/mathcore/inc/Math/Types.h:10:
In file included from /usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/experimental/simd:80:
/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/experimental/bits/simd_x86.h:4232:18: error: static assertion failed due to requirement 'is_same_v<long long, long>'
 4232 |           static_assert(is_same_v<_Tp, __int_for_sizeof_t<_Tp>>);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/experimental/bits/simd_x86.h:2392:26: note: in instantiation of function template specialization 'std::experimental::_MaskImplX86Mixin::_S_to_bits<long long, 8UL>' requested here
 2392 |               return _MaskImpl::_S_to_bits(
      |                                 ^
/usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/experimental/bits/simd.h:5648:40: note: in instantiation of function template specialization 'std::experimental::_SimdImplX86<std::experimental::simd_abi::_VecBltnBtmsk<64>>::_S_less<double, 8UL>' requested here
 5648 |     { return simd::_S_make_mask(_Impl::_S_less(__y._M_data, __x._M_data)); }
      |                                        ^
/build/root/6.40.00/root-6.40.00/math/mathcore/src/FitUtil.cxx:1966:18: note: in instantiation of member function 'std::experimental::operator>' requested here
 1966 |       where(chi2 > maxResValue, chi2) = maxResValue;
      |                  ^
1 error generated.
[3924/5868] Building CUDA object roofit/batchcompute/CMakeFiles/RooBatchCompute_CUDA.dir/src/ComputeFunctions.cu.o
ninja: build stopped: subcommand failed.

Reproducer

  • See comments below.

ROOT version

6.40.00

Installation method

Build from source

Operating system

Debian Testing

Additional context

C++ standard library: libstdc++ from GCC 16.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions