In #659 helloWorld was not compiling, leading to the fix in #665 from @BenjaminW3 .
After fixing #671 there are still lots of errors for all other tests. I wonder why clang7 is working in travis environment.
Full compiler output (3.3M): compile_clang_only.txt
spack load --dependencies cmake
spack load --dependencies [email protected]
spack load --dependencies [email protected]
# only cpu-seq back-end is enabled
cmake -DALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=OFF -DALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=OFF -DALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE=OFF -DALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=OFF -DALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=OFF -DALPAKA_ACC_CPU_BT_OMP4_ENABLE=OFF -DALPAKA_ACC_GPU_CUDA_ENABLE=OFF ..
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
A few pieces could be fixed by the PR #677.
Start 1: bufferCopy
1/26 Test #1: bufferCopy ....................... Passed 0.01 sec
Start 2: helloWorld
2/26 Test #2: helloWorld ....................... Passed 0.01 sec
Start 3: helloWorldLambda
3/26 Test #3: helloWorldLambda ................. Passed 0.01 sec
Start 4: reduce
4/26 Test #4: reduce ........................... Passed 5.43 sec
Start 5: vectorAdd
5/26 Test #5: vectorAdd ........................ Passed 0.06 sec
// ... rest fails
The other things still fail to compile, but mostly due to linker errors.
Example:
[100%] Linking CXX executable idx
cd /home/mwerner/cuda-workspace/alpaka/build_clang/test/unit/idx && /opt/spack-modules/linux-ubuntu16.04-x86_64/gcc-5.4.0/cmake-3.12.2-raqsionsms2ykbduiz7bqqmq56qx6rc4/bin/cmake -E cmake_link_script CMakeFiles/idx.dir/link.txt --verbose=1
/opt/spack-modules/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-6.0.1-kerbxgzo4hpjhind6xbgggsvkqwfok3o/bin/clang++ CMakeFiles/idx.dir/src/MapIdx.cpp.o CMakeFiles/idx.dir/src/main.cpp.o -o idx ../../common/libcommon.a /opt/spack-modules/linux-ubuntu16.04-x86_64/gcc-5.4.0/boost-1.65.1-5ovw2kdz2fh44at4z3bb2d7n5n3bs4u7/lib/libboost_unit_test_framework-mt.so -lpthread -lrt
/opt/spack-modules/linux-ubuntu16.04-x86_64/gcc-5.4.0/binutils-2.31.1-qfw5zesz7kydsfpzgsomsqumlvsmevk5/bin/ld: CMakeFiles/idx.dir/src/MapIdx.cpp.o: in function `void boost::unit_test::ut_detail::generate_test_case_4_type<boost::unit_test::ut_detail::template_test_case_gen<idx::mapIdx_invoker, std::__1::tuple<std::__1::integral_constant<unsigned long, 1ul>, std::__1::integral_constant<unsigned long, 2ul>, std::__1::integral_constant<unsigned long, 3ul>, std::__1::integral_constant<unsigned long, 4ul> > >, idx::mapIdx_invoker>::operator()<std::__1::integral_constant<unsigned long, 1ul> >(boost::mpl::identity<std::__1::integral_constant<unsigned long, 1ul> >)':
MapIdx.cpp:(.text._ZN5boost9unit_test9ut_detail25generate_test_case_4_typeINS1_22template_test_case_genIN3idx14mapIdx_invokerENSt3__15tupleIJNS6_17integral_constantImLm1EEENS8_ImLm2EEENS8_ImLm3EEENS8_ImLm4EEEEEEEES5_EclIS9_EEvNS_3mpl8identityIT_EE[_ZN5boost9unit_test9ut_detail25generate_test_case_4_typeINS1_22template_test_case_genIN3idx14mapIdx_invokerENSt3__15tupleIJNS6_17integral_constantImLm1EEENS8_ImLm2EEENS8_ImLm3EEENS8_ImLm4EEEEEEEES5_EclIS9_EEvNS_3mpl8identityIT_EE]+0x447): undefined reference to `boost::unit_test::ut_detail::normalize_test_case_name(boost::unit_test::basic_cstring<char const>)'
You'll find some results on the net regarding the ABI. I tried the options on both sides even with enabled C++11 variant via spack, but no change.
It must be something about how Boost is compiled by spack; likely the static linkage and the C++11 option. But I stopped digging as it drains too much time again.
--
I compiled boost on my own with the script used in alpaka/travis and then called:
$ export BOOST_ROOT=$HOME/software/boost_1.65.1
$ cmake -DBoost_USE_STATIC_LIBS=ON -DBoost_USE_MULTITHREADED=ON -DBoost_USE_STATIC_RUNTIME=OFF -DALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE=OFF -DALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE=OFF -DALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE=OFF -DALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE=OFF -DALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE=OFF -DALPAKA_ACC_CPU_BT_OMP4_ENABLE=OFF -DALPAKA_ACC_GPU_CUDA_ENABLE=OFF ..
Now there are only two tests that fail to compile: __atomic__ & __sharedMem__ (complete output)
[ 79%] Building CXX object test/unit/atomic/CMakeFiles/atomic.dir/src/AtomicTest.cpp.o
In file included from /home/mwerner/cuda-workspace/alpaka/test/unit/atomic/src/AtomicTest.cpp:30:
In file included from /home/mwerner/cuda-workspace/alpaka/include/alpaka/alpaka.hpp:33:
In file included from /home/mwerner/cuda-workspace/alpaka/include/alpaka/acc/AccCpuSerial.hpp:31:
/home/mwerner/cuda-workspace/alpaka/include/alpaka/atomic/AtomicStdLibLock.hpp:99:36: error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
hashTableSize> m_mtxAtomic; //!< The mutex protecting access for an atomic operation.
^
/home/mwerner/cuda-workspace/alpaka/include/alpaka/atomic/AtomicStdLibLock.hpp:126:61: note: in instantiation of function template specialization
'alpaka::atomic::AtomicStdLibLock<16>::getMutex<signed char>' requested here
std::lock_guard<std::mutex> lock(atomic.getMutex(addr));
Edit: changed title, as all clang versions 5,6,7 are affected
Edit2: another issue could be, that spack used gcc toolset (llvm is rejected, clang is not recognized), tried clanglibcpp as spack variant parameter without success
Edit3: fixed final cmake call (using export BOOST_ROOT=... for finding own boost)
Yes, -Wexit-time-destructors need all to go! #468
But they are a warning, you are compiling with -Werror :)
Here it is! We already suppressed this in a different location. I do not know why we do not see this one in CI.
All the issues regarding clang should be fixed now. The boost link issue seems to be completely unrelated. If you want to investigate this, please open a new ticket.