- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any idea why I cannot compile with dpcpp in centos 7?
$ dpcpp -std=c++17 -O3 -fsycl code.cpp
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /tmp/user/code-3c6697.o: in function `main':
mardyn_cpu.cpp:(.text+0x2): undefined reference to `omp_get_thread_num'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `VTT for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
...
$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ld --version
GNU ld version 2.27-43.base.el7_8.1
Copyright (C) 2016 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ ldd /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so
/opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so)
/opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so)
/opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libsycl.so)
linux-vdso.so.1 => (0x00007fff5846b000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f69f16d0000)
libOpenCL.so.1 => /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libOpenCL.so.1 (0x00007f69f1d4a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f69f14b4000)
libsvml.so => /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libsvml.so (0x00007f69ef9b7000)
libirng.so => /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libirng.so (0x00007f69ef64d000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f69ef346000)
libimf.so => /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libimf.so (0x00007f69eecbe000)
libm.so.6 => /lib64/libm.so.6 (0x00007f69ee9bc000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f69ee7a6000)
libintlc.so.5 => /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libintlc.so.5 (0x00007f69ee52e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f69ee160000)
/lib64/ld-linux-x86-64.so.2 (0x00007f69f1b42000)
linux-vdso.so.1 => (0x00007fff5846b000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f69f16d0000)
libOpenCL.so.1 => /opt/intel/oneapi/compiler/2021.1.1/linux/lib/libOpenCL.so.1 (0x00007f69f1d4a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f69f14b4000)
libsvml.so => /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libsvml.so (0x00007f69ef9b7000)
libirng.so => /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libirng.so (0x00007f69ef64d000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f69ef346000)
libimf.so => /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libimf.so (0x00007f69eecbe000)
libm.so.6 => /lib64/libm.so.6 (0x00007f69ee9bc000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f69ee7a6000)
libintlc.so.5 => /opt/intel/oneapi/compiler/2021.1.1/linux/compiler/lib/intel64_lin/libintlc.so.5 (0x00007f69ee52e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f69ee160000)
/lib64/ld-linux-x86-64.so.2 (0x00007f69f1b42000)
I tried also using LD_LIBRARY_PATH to a different compiler version:
$ LD_LIBRARY_PATH=/home/user/gcc/gcc_install_dir/lib64 ldd /opt/intel/oneapi/compiler/2021.1.1/linu
x/lib/libsycl.so
linux-vdso.so.1 => (0x00007fff819ab000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fab67a01000)
libOpenCL.so.1 => /opt/amdgpu-pro/lib64/libOpenCL.so.1 (0x00007fab6807a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fab677e5000)
libsvml.so => not found
libirng.so => not found
libstdc++.so.6 => /home/user/gcc/gcc_install_dir/lib64/libstdc++.so.6 (0x00007fab67464000)
libimf.so => not found
libm.so.6 => /lib64/libm.so.6 (0x00007fab67162000)
libgcc_s.so.1 => /home/user/gcc/gcc_install_dir/lib64/libgcc_s.so.1 (0x00007fab66f4b000)
libintlc.so.5 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007fab66b7d000)
/lib64/ld-linux-x86-64.so.2 (0x00007fab67e73000)
$ ~/gcc/gcc_install_dir/bin/gcc --version
gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ LD_LIBRARY_PATH=/home/user/gcc/gcc_install_dir/lib64:/usr/local/lib:/usr/lib:/usr/local/lib64:/us
r/lib64:$LD_LIBRARY_PATH dpcpp -std=c++17 -O3 -fsycl code.cpp
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /tmp/user/mardyn_cpu-da40aa.o: in function `main':
mardyn_cpu.cpp:(.text+0x2): undefined reference to `omp_get_thread_num'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `VTT for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/../../../../bin/ld: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/../lib/libsycl.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.
The code itself it is just a test. I know I will have to use `-fopenmp`, etc. But currently it does not compile even the simplest hello-world.
#include <omp.h>
#include <cstdio>
int main(int argc, char* argv[]) {
#pragma omp parallel
{
printf("thread id %d\n", omp_get_thread_num());
}
return 0;
}
This compiles in another system with ubuntu, but not with centos.
Tested also with `scl enable devtoolset-9 -- bash` and it emits the same error (undefined... GLIBCXX_3.4.21/20/22). Gcc 9.3.1
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Raul,
Thanks for the detailed information.
Unfortunately, DPC++ does not support CentOS 7 as of now. For more details please refer to the following link:
CentOS 8.x is supported as of now for CPU as a host/target. Please check the above link for more details regarding supported OS for the DPC++ compiler.
Warm Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please give us an update on the provided details.
Warm Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As we haven't heard back from you, we are considering that your issue has been resolved.
We will no longer monitor this thread. If you require any additional assistance from Intel, please post a new thread.
Any further interaction in this thread will be considered community only.
Warm Regards,
Abhishek

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page