[Openmp-dev] Build error with Debug Clang

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Tue Oct 29 16:58:40 PDT 2019


Hi,
a C++ code like:
#include <iostream>
int main() {}

fails to build with a Debug Clang which was configured with CMake
with LIBOMPTARGET_ENABLE_DEBUG is set.

$ clang++ -g -std=c++11 -fopenmp -fopenmp-targnvptx64 t1.cpp
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char const*,
std::allocator<char> const&)@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&,
unsigned long)@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_M_dispose()@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::operator=(char
const*)@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_M_capacity(unsigned
long)@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_M_data()
const at GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::c_str() const at GLIBCXX_3.4.21
'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_S_copy_chars(char*, char*,
char*)@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_M_data(char*)@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_M_local_data()@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::basic_string()@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::~basic_string()@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::operator=(std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_M_set_length(unsigned
long)@GLIBCXX_3.4.21'
/p/scratch/cpcp0/pcp0151/opt/clang/201910292307/bin/../lib/libomptarget.so:
undefined reference to `std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_Alloc_hider::_Alloc_hider(char*, std::allocator<char>
const&)@GLIBCXX_3.4.21'
clang-10: error: linker command failed with exit code 1 (use -v to see
invocation)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20191030/5322a976/attachment.html>


More information about the Openmp-dev mailing list