Tests fail with AMD clang 13.0.0
I use AMD Clang (Clang 13) from spack (aocc) to build Byfl and although it compiles normally, tests fail. Test 4/22 (BfClangNoOptsCompiles) fails with this error:
error: unable to load plugin 'Byfl/build_aocc/lib/bytesflops/bytesflops.so': 'Byfl/build_aocc/lib/bytesflops/bytesflops.so: undefined symbol: _ZTVN4llvm2cl6parserINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE
If I use the default system's clang (clang 12) I do not get this error and all tests are passed.
I've seen this error message in other contexts. According to some notes I jotted down the last time, two causes I've observed are
- A mismatch between the compiler used to build Byfl and the compiler used to build LLVM/Clang. In this case, try rebuilding everything with the same version of the same compiler.
- A mismatch between C++ headers and C++ libraries. In this case, try setting the
CPLUS_INCLUDE_PATHenvironment variable appropriately. Or if it is set, try unsetting it.
I can't control the compiler to build LLVM/CLang in this system. I use the same clang compiler to build byfl and I found that this symbol actually comes from system's llvm in /usr/lib64 and it does not exist in the llvm library that I use. I am not sure how to change that.