Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcc unable to find shared library libisl.so

Tags:

gcc

isl

I installed gcc version 5.1 locally on a cluster having OS as CentOS where I dont have root access (so i cant use any commands like 'sudo'). (The global gcc version installed is 4.4). I also modified the path variable to include the path to my local version at the beginning of the path variable. Before, when I was trying to install boost using the global version, it worked fine. But now, when I try to install boost, it shows the following error:

/users/home/head/cmp/soft/sft/gcc/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/cc1: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory

Any ideas on how to fix this will be highly appreciated.

like image 578
Python_user Avatar asked Nov 16 '15 11:11

Python_user


2 Answers

Follow the instructions at https://gcc.gnu.org/wiki/InstallingGCC

Specifically, don't install ISL manually in some non-standard path, because GCC needs to find its shared libraries at run-time.

The simplest solution is to use the download_prerequisites script to add the GMP, MPFR, MPC and ISL source code to the GCC source tree, which will cause GCC to build them for you automatically, and link to them statically.

like image 190
Jonathan Wakely Avatar answered Oct 19 '22 15:10

Jonathan Wakely


I have the same issue. I solved it as follows:

  1. Download the source code of isl available here

  2. Unzip and install: ./configure && make && make install

  3. cp /usr/local/lib/libisl* /usr/lib

    • Note: a symlink also works:

      $ cd /usr/lib

      $ ln -s /usr/local/lib/libisl.so.10 libisl.so.10

  4. You can do the same in Debian distros:

    apt-get install libisl-dev

  5. Adjust the references of shared libs:

    $ cp /usr/local/lib/libisl* /usr/lib

    • Note: a symlink also works:

      $ cd /usr/lib

      $ ln -s /usr/local/lib/libisl.so.10 libisl.so.10

like image 3
outrosdiasvirao Avatar answered Oct 19 '22 15:10

outrosdiasvirao