Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
842 ディスカッション

icpx: error: linker command failed

runchan
ビギナー
9,515件の閲覧回数

I am trying to compile a simple dpc++ program using command "icpx -fsycl" and met this error.

The detailed error report is like this:

"/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../bin/ld: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm/../lib/libsycl.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21'
/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../bin/ld: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm/../lib/libsycl.so: undefined reference to `std::basic_fstream<char, std::char_traits<char> >::basic_fstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)@GLIBCXX_3.4.21'
/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../bin/ld: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm/../lib/libsycl.so: undefined reference to `VTT for std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21'
/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../bin/ld: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm/../lib/libsycl.so: undefined reference to `std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)@GLIBCXX_3.4.21'
/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../bin/ld: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm/../lib/libsycl.so: undefined reference to `std::_V2::error_category::_M_message[abi:cxx11](int) const@GLIBCXX_3.4.21'
/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../bin/ld: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm/../lib/libsycl.so: undefined reference to `std::__exception_ptr::exception_ptr::exception_ptr(void*)@CXXABI_1.3.11'"

(above only list part of the error warning)

How can i resolve this problem? My linux distribution is CentOS7.9. Can you give me some advice?

 

 

 

ラベル(1)
0 件の賞賛
1 解決策
SeshaP_Intel
モデレーター
9,364件の閲覧回数

Hi, 

 

I am not sure whether updating the libstdc++ will work, as CentOS is not supported. I am able to use the icpx compiler without any issues on Ubuntu 22.04(supported OS).

I have run the below commands on Ubuntu machine before installing the Intel oneAPI toolkits, which will install the CMake, pkg-config, and GNU development tools on the system.

sudo apt update
sudo apt -y install cmake pkg-config build-essential

Try running the below command on CentOS if you face the same issues.

sudo yum install libstdc++

As Intel compilers utilize the GNU build toolchains to provide a complete C/C++ development environment.

Please refer to the below link for more details.

https://www.intel.com/content/www/us/en/docs/oneapi-base-toolkit/get-started-guide-linux/2023-1/before-you-begin.html

 

Thanks and Regards,

Pendyala Sesha Srinivas

 

元の投稿で解決策を見る

7 返答(返信)
runchan
ビギナー
9,472件の閲覧回数

I think the above warning may have the same reason with this:

root@master:~# sycl-ls
sycl-ls: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/intel/oneapi/compiler/2023.1.0/linux/lib/libsycl.so.6)
sycl-ls: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /opt/intel/oneapi/compiler/2023.1.0/linux/lib/libsycl.so.6)
sycl-ls: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /opt/intel/oneapi/compiler/2023.1.0/linux/lib/libsycl.so.6)
sycl-ls: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /opt/intel/oneapi/compiler/2023.1.0/linux/lib/libsycl.so.6)

SeshaP_Intel
モデレーター
9,446件の閲覧回数

Hi,

 

Thank you for posting in Intel Communities.

As per the Intel oneAPI DPC++/C++ Compiler 2023.1 system requirements, CentOS 7.9 is not supported. For more details please refer to the following link.

https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-dpcpp-system-requirements.html

 

Please try to run on the supported Operating System and let us know if you face any issues.

 

Thanks and Regards,

Pendyala Sesha Srinivas

 

runchan
ビギナー
9,435件の閲覧回数

Hi, thanks for your reply,

I wonder whether updating my libstdc++ will work, because i may have some difficulty updating my operating system.

 

SeshaP_Intel
モデレーター
9,365件の閲覧回数

Hi, 

 

I am not sure whether updating the libstdc++ will work, as CentOS is not supported. I am able to use the icpx compiler without any issues on Ubuntu 22.04(supported OS).

I have run the below commands on Ubuntu machine before installing the Intel oneAPI toolkits, which will install the CMake, pkg-config, and GNU development tools on the system.

sudo apt update
sudo apt -y install cmake pkg-config build-essential

Try running the below command on CentOS if you face the same issues.

sudo yum install libstdc++

As Intel compilers utilize the GNU build toolchains to provide a complete C/C++ development environment.

Please refer to the below link for more details.

https://www.intel.com/content/www/us/en/docs/oneapi-base-toolkit/get-started-guide-linux/2023-1/before-you-begin.html

 

Thanks and Regards,

Pendyala Sesha Srinivas

 

SeshaP_Intel
モデレーター
9,299件の閲覧回数

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks and Regards,

Pendyala Sesha Srinivas


SeshaP_Intel
モデレーター
9,240件の閲覧回数

Hi,


I have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.


Thanks and Regards,

Pendyala Sesha Srinivas


runchan
ビギナー
9,112件の閲覧回数

Sorry, i forgot to turn on email notification when someone reply.

Thank you for your advice! We are changing our OS to Ubuntu now!

 

Thanks and Regards

返信