oneAPI Registration, Download, Licensing and Installation
Support for Getting Started questions related to download, Installation and licensing for Intel oneAPI Toolkits and software development tools.
1281 Discussions

After removing intel toolkit, g++ looking for intel math library and complain error

BenTanison12
Beginner
429 Views

This is centos system. I have installed intel HPC toolkit(toolkit before intel OneAPI, including intel C++/c/fortan/MKL...). Then after I remove the intel toolkit, my g++ didn't work (so does my gcc, same error). It seems the g++ is looking for intel math library. Since I removed the intel toolkit, it can not find the intel math library and complain error.

How can I tell g++ do not to find intel math library? And how can I know what library g++ are looking for?

Thank you for your help!

The c++ example

#include<iostream> #include<cmath>
int main(){
int a = 1<<31;
std::cout<<"a is "<< a <<std::endl;
int b = std::abs(a);
std::cout<<"b is "<< b <<std::endl;
return 0;
}


the command I used to compile the c++ example

g++ a.cpp
the error it complain

/usr/local/gcc/10.1.0/libexec/gcc/x86_64-pc-linux-gnu/10.1.0/cc1plus: error while loading shared libraries: libsvml.so: cannot open shared object file: No such file or directory
LDD result: for my gcc

(base) [Js@XiaoXin13pro ~]$ ldd /usr/local/gcc/10.1.0/libexec/gcc/x86_64-pc-linux-gnu/10.1.0/cc1plus
linux-vdso.so.1 => (0x00007fffffad5000)
libisl.so.15 => /usr/local/lib/libisl.so.15 (0x00007f111d980000)
libmpc.so.3 => /usr/local/lib/libmpc.so.3 (0x00007f111d760000)
libmpfr.so.4 => /usr/local/lib/libmpfr.so.4 (0x00007f111d4f0000)
libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x00007f111d260000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f111d040000)
libm.so.6 => /lib64/libm.so.6 (0x00007f111cd30000)
libc.so.6 => /lib64/libc.so.6 (0x00007f111c960000)
/lib64/ld-linux-x86-64.so.2 (0x00007f111de00000)
libimf.so => /lib64/libimf.so (0x00007f111c490000)
libsvml.so => not found
libirng.so => not found
libgcc_s.so.1 => /usr/local/gcc/10.1.0/lib64/libgcc_s.so.1 (0x00007f111c260000)
libintlc.so.5 => not found
libsvml.so => not found
libirng.so => not found
libintlc.so.5 => not found
libsvml.so => not found
libirng.so => not found
libintlc.so.5 => not found
libsvml.so => not found
libirng.so => not found
libintlc.so.5 => not found
libintlc.so.5 => not found
LDD result: for system gcc

(base) [Js@XiaoXin13pro ~]$ ldd /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/cc1plus
linux-vdso.so.1 => (0x00007fffea241000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f225a4e0000)
libmpc.so.3 => /usr/local/lib/libmpc.so.3 (0x00007f225a2c0000)
libmpfr.so.4 => /usr/local/lib/libmpfr.so.4 (0x00007f225a050000)
libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x00007f2259dc0000)
libz.so.1 => /lib64/libz.so.1 (0x00007f2259b90000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2259880000)
libc.so.6 => /lib64/libc.so.6 (0x00007f22594b0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f225a800000)
libimf.so => /lib64/libimf.so (0x00007f2258fe0000)
libsvml.so => not found
libirng.so => not found
libgcc_s.so.1 => /usr/local/gcc/10.1.0/lib64/libgcc_s.so.1 (0x00007f2258db0000)
libintlc.so.5 => not found
libsvml.so => not found
libirng.so => not found
libintlc.so.5 => not found
libsvml.so => not found
libirng.so => not found
libintlc.so.5 => not found
libintlc.so.5 => not found


update gcc using scl:

sudo yum install centos-release-scl
sudo yum install devtoolset-8-gcc*
scl enable devtoolset-8 bash

check gcc

(base) [Js@XiaoXin13pro ~]$ which gcc
/opt/rh/devtoolset-8/root/usr/bin/gcc
(base) [Js@XiaoXin13pro ~]$ gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 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.


and still complain

(base) [Js@XiaoXin13pro ~]$ g++ a.cpp
/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/cc1plus: error while loading shared libraries: libsvml.so: cannot open shared object file: No such file or directory


and ldd result

(base) [Js@XiaoXin13pro ~]$ ldd /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/cc1plus
linux-vdso.so.1 => (0x00007ffff5a56000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fe19add0000)
libmpc.so.3 => /usr/local/lib/libmpc.so.3 (0x00007fe19abb0000)
libmpfr.so.4 => /usr/local/lib/libmpfr.so.4 (0x00007fe19a940000)
libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x00007fe19a6b0000)
libz.so.1 => /lib64/libz.so.1 (0x00007fe19a480000)
libm.so.6 => /lib64/libm.so.6 (0x00007fe19a170000)
libc.so.6 => /lib64/libc.so.6 (0x00007fe199da0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe19b000000)
libimf.so => /lib64/libimf.so (0x00007fe1998d0000)
libsvml.so => not found
libirng.so => not found
libgcc_s.so.1 => /usr/local/gcc/10.1.0/lib64/libgcc_s.so.1 (0x00007fe1996a0000)
libintlc.so.5 => not found
libsvml.so => not found
libirng.so => not found
libintlc.so.5 => not found
libsvml.so => not found
libirng.so => not found
libintlc.so.5 => not found
libintlc.so.5 => not found

 

0 Kudos
2 Replies
ArpanB_Intel
Moderator
418 Views

Hi Ben, Intel® oneAPI HPC Toolkit has internal dependencies on Intel® oneAPI Base Toolkit. Thus, we suggest our users to install the Intel® oneAPI Base Toolkit first followed by Intel® oneAPI HPC Toolkit. Intel® oneAPI HPC Toolkit requires the Base Toolkit for optimum performance.


Thus, we suggest you to re-install the Intel® oneAPI Base Toolkit.


0 Kudos
ArpanB_Intel
Moderator
402 Views

Ben, unfortunately we were unable to hear back from you.


If you have any further queries, please post a new question as this thread will no longer be monitored by Intel®.


0 Kudos
Reply