Bug#1053140: xtensor: armel failure with clang-16: undefined reference to `__atomic_store_1'

Drew Parsons dparsons at debian.org
Thu Sep 28 02:13:06 BST 2023


Source: xtensor
Version: 0.24.7-1
Severity: normal
Control: forwarded -1 https://github.com/xtensor-stack/xtensor/issues/2729

xtensor 0.24.7-1 fails debci test on armel (gnueabi) architecture with clang 16.0.6.
The tests pass with g++ 13.2.0, and pass with clang-16 on other architectures.
A test log is found at https://ci.debian.net/data/autopkgtest/unstable/armel/x/xtensor/38202370/log.gz
see also https://ci.debian.net/packages/x/xtensor/unstable/armel/

Except of the test log is

520s [100%] Linking CXX executable test_xtensor_lib
520s /usr/bin/cmake -E cmake_link_script CMakeFiles/test_xtensor_lib.dir/link.txt --verbose=1
520s /usr/bin/clang++  -DXSIMD_ENABLE_XTL_COMPLEX=1 -std=c++14 -Wunused-parameter -Wextra -Wreorder -Wconversion -Wsign-conversion -Wold-style-cast -Wunused-variable -O3 -DNDEBUG -rdynamic CMakeFiles/test_xtensor_lib.dir/main.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xadaptor_semantic.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xarray_adaptor.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xarray.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xblockwise_reducer.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xbroadcast.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xbuilder.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xcontainer_semantic.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xeval.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xexception.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xexpression.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xexpression_traits.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xfunction.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xfunc_on_xexpression.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xmultiindex_iterator.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xiterator.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xmath.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xoperation.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xoptional_assembly.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xreducer.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xscalar.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xscalar_semantic.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xshape.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xstorage.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xstrided_view.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xstrides.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xtensor.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xtensor_adaptor.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xtensor_semantic.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xview.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xview_semantic.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xutils.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xsimd8.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xaccumulator.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xadapt.cpp.o CMakeFiles/test_xtensor_lib.dir/test_strided_assign.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xassign.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xaxis_iterator.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xaxis_slice_iterator.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xbuffer_adaptor.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xchunked_array.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xchunked_view.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xcomplex.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xcsv.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xdatesupport.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xdynamic_view.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xfunctor_adaptor.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xfixed.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xhistogram.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xpad.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xindex_view.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xio.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xlayout.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xmanipulation.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xmasked_view.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xmath_result_type.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xnan_functions.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xnoalias.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xnorm.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xoptional.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xoptional_assembly_adaptor.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xoptional_assembly_storage.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xset_operation.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xrandom.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xrepeat.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xsort.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xsimd.cpp.o CMakeFiles/test_xtensor_lib.dir/test_xvectorize.cpp.o CMakeFiles/test_xtensor_lib.dir/test_extended_xmath_interp.cpp.o CMakeFiles/test_xtensor_lib.dir/test_extended_broadcast_view.cpp.o CMakeFiles/test_xtensor_lib.dir/test_extended_xmath_reducers.cpp.o CMakeFiles/test_xtensor_lib.dir/test_extended_xhistogram.cpp.o CMakeFiles/test_xtensor_lib.dir/test_extended_xsort.cpp.o CMakeFiles/test_xtensor_lib.dir/test_sfinae.cpp.o -o test_xtensor_lib 
521s /usr/bin/arm-linux-gnueabi-ld: CMakeFiles/test_xtensor_lib.dir/main.cpp.o: in function `doctest::detail::Subcase::~Subcase()':
521s main.cpp:(.text+0x3f4c): undefined reference to `__atomic_load_1'
521s /usr/bin/arm-linux-gnueabi-ld: main.cpp:(.text+0x4034): undefined reference to `__atomic_store_1'
521s /usr/bin/arm-linux-gnueabi-ld: CMakeFiles/test_xtensor_lib.dir/main.cpp.o: in function `doctest::detail::ResultBuilder::log()':
521s main.cpp:(.text+0x5fe4): undefined reference to `__atomic_fetch_add_4'
521s /usr/bin/arm-linux-gnueabi-ld: main.cpp:(.text+0x6074): undefined reference to `__atomic_fetch_add_4'
521s /usr/bin/arm-linux-gnueabi-ld: main.cpp:(.text+0x6138): undefined reference to `__atomic_fetch_add_4'
521s /usr/bin/arm-linux-gnueabi-ld: main.cpp:(.text+0x616c): undefined reference to `__atomic_fetch_add_4'
521s /usr/bin/arm-linux-gnueabi-ld: CMakeFiles/test_xtensor_lib.dir/main.cpp.o: in function `doctest::detail::MessageBuilder::log()':
521s main.cpp:(.text+0x67e4): undefined reference to `__atomic_fetch_add_4'
521s /usr/bin/arm-linux-gnueabi-ld: CMakeFiles/test_xtensor_lib.dir/main.cpp.o:main.cpp:(.text+0x6828): more undefined references to `__atomic_fetch_add_4' follow
521s /usr/bin/arm-linux-gnueabi-ld: CMakeFiles/test_xtensor_lib.dir/main.cpp.o: in function `doctest::Context::run()':
521s main.cpp:(.text+0xa144): undefined reference to `__atomic_store_1'
521s /usr/bin/arm-linux-gnueabi-ld: CMakeFiles/test_xtensor_lib.dir/main.cpp.o: in function `std::atomic<bool>::operator=(bool)':
521s main.cpp:(.text._ZNSt6atomicIbEaSEb[_ZNSt6atomicIbEaSEb]+0xc): undefined reference to `__atomic_store_1'
521s /usr/bin/arm-linux-gnueabi-ld: CMakeFiles/test_xtensor_lib.dir/main.cpp.o: in function `doctest::detail::MultiLaneAtomic<int>::load(std::memory_order) const':
521s main.cpp:(.text._ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order[_ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order]+0xc): undefined reference to `__atomic_load_4'
521s /usr/bin/arm-linux-gnueabi-ld: main.cpp:(.text._ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order[_ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order]+0x1c): undefined reference to `__atomic_load_4'
521s /usr/bin/arm-linux-gnueabi-ld: main.cpp:(.text._ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order[_ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order]+0x2c): undefined reference to `__atomic_load_4'
521s /usr/bin/arm-linux-gnueabi-ld: main.cpp:(.text._ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order[_ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order]+0x3c): undefined reference to `__atomic_load_4'
521s /usr/bin/arm-linux-gnueabi-ld: main.cpp:(.text._ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order[_ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order]+0x4c): undefined reference to `__atomic_load_4'
521s /usr/bin/arm-linux-gnueabi-ld: CMakeFiles/test_xtensor_lib.dir/main.cpp.o:main.cpp:(.text._ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order[_ZNK7doctest6detail15MultiLaneAtomicIiE4loadESt12memory_order]+0x5c): more undefined references to `__atomic_load_4' follow
...

openssl once had problems with clang and atomic,
cf. https://github.com/openssl/openssl/issues/16572
So adding -latomic might help.

But it's strange only one architecture is affected. Maybe it's a bug
in clang. They've had such problems in the past,
https://github.com/llvm/llvm-project/issues/57390
but that should have been fixed already.



More information about the debian-science-maintainers mailing list