Can't build samples w/ ptx64 backend

Hello Charles,

I’m sorry, we should have been more clear.

From the linker error I can tell that it still expects a function with a C++11 ABI std::__cxx11::basic_string.

_GLIBCXX_USE_CXX11_ABI is a preprocessor definition that needs to be passed to the compiler, not CMake. To do so, you can either add target_compile_definitions(simple-vector-add PRIVATE _GLIBCXX_USE_CXX11_ABI=0) to the CMakeLists to enable it for this that target specifically or do add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0) in the top-level CMakeLists before you add any target to change it on a default level.

A third option would be to put add_compile_definitions in a CMake toolchain file, which is the way to go if you’d need to recompile an existing codebase and/or don’t want to modify any build scripts.

The reason you have to do this is because our CentOS 7 package is compiled with the old C++03 ABI since that’s what the default gcc 4.8.5 on CentOS 7 supports, but your gcc 8 defaults to the new C++11 ABI.

If you really need to use the C++11 ABI, you could try to use the Ubuntu package instead. CentOS 7’s glibc probably is too old for that to link, so you’d need to upgrade to CentOS 8. Of course, using the Ubuntu package on another distribution is untested and unsupported, but it would be worth a try.

Let me know if that helps
Morris