Support for CentOS 8?

does the CentOS 7 distribution also support CentOS 8 ?

I have tried building a simple example that works on CentOS 7, and the build fails with

$ /opt/codeplay/latest/bin/compute++ -O2 -sycl-driver -no-serial-memop -O2 -std=c++17 -g -I/opt/codeplay/latest/include src/vector-add.cpp -o vector-add.sycl -L/opt/codeplay/latest/lib -lComputeCpp

/tmp/fwyzard/vector-add-0182cf.o: In function `cl::sycl::default_selector::default_selector()':
/opt/codeplay/latest/include/SYCL/device_selector.h:95: undefined reference to `cl::sycl::default_selector::default_selector(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/fwyzard/vector-add-0182cf.o: In function `add_vectors_parallel(std::array<int, 10000ul>&, std::array<int, 10000ul> const&, std::array<int, 10000ul> const&)':
/opt/codeplay/latest/include/SYCL/program.h:343: undefined reference to `cl::sycl::program::get_kernel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const'
/tmp/fwyzard/vector-add-0182cf.o: In function `cl::sycl::program cl::sycl::program::create_program_for_kernel<VectorAdd>(cl::sycl::context)':
/opt/codeplay/latest/include/SYCL/program.h:477: undefined reference to `cl::sycl::program::create_program_for_kernel_impl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned char const*, int, char const* const*, std::shared_ptr<cl::sycl::detail::context>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
compute++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:13: vector-add.sycl] Error 1

Answering to myself: the issue seems related to the C++ ABI changes between CentOS 7 and CentOS 8.

Adding the compilation flag -D_GLIBCXX_USE_CXX11_ABI=0 seems to solve it.

Thanks for posting your reply and answer. I’ve asked if we can fix this so that CentOS 8 so it works without changes. It sounds like it may just be a change to our headers.

For now you could also try the Ubuntu 16.04 build, since that uses the newer ABI, the same as CentOS 8 appears to use. If you do, and it works, we’d be grateful if you could let us know!

Hi @duncan,
yes, using the Ubuntu 16.04 build on CentOS 8 works with the new C++ ABI.

It does print a warning:

/opt/codeplay/ComputeCpp-CE-1.1.6-Ubuntu-16.04-x86_64/bin/compute++: /lib64/ no version information available (required by /opt/codeplay/ComputeCpp-CE-1.1.6-Ubuntu-16.04-x86_64/bin/compute++)

but the compilation and linking are fine, and the resulting executable works without issues.

Note that /lib64/ comes from the ncurses-compat-libs package, which is not part of the default CentOS 8 installation.

That’s great to know, thanks! Yeah we’ve seen the libtinfo problems before, the same problem now happens on Arch systems (and presumably lots of others). Fortunately it’s not a necessary component.