LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Error with GCC: while loading shared libraries: libisl.so.22: cannot open shared object file: No such file or directory (https://www.linuxquestions.org/questions/slackware-14/error-with-gcc-while-loading-shared-libraries-libisl-so-22-cannot-open-shared-object-file-no-such-file-or-directory-4175675628/)

juju 05-21-2020 12:26 AM

Error with GCC: while loading shared libraries: libisl.so.22: cannot open shared object file: No such file or directory
 
Hello,

I'm tooling around on my Slackware 14.2 machine tonight, trying some beginner C programming. I encountered the following error when trying to compile my first program:

/usr/libexec/gcc/x86_64-slackware-linux/9.3.0/cc1: error while loading shared libraries: libisl.so.22: cannot open shared object file: No such file or directory

I imagine this is a fairly standard error. The library, libisl.so.22 is located at /usr/lib. I added this directory to my ld.so.conf file and ran ldconfig. This didn't help.

Running ldconfig -p shows the library in the appropriate directory.

I should note this is a 64-bit machine. It's been a while since I set it up, so I've forgotten the finer points of the system.

I'm fairly sure the answer is found in this multilib setup.

Thanks in advance...

Here is the output of the command gcc -v:

Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/9.3.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/9.3.0/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../gcc-9.3.0/configure --prefix=/usr
--libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info
--enable-shared --enable-bootstrap
--enable-languages=ada,brig,c,c++,d,fortran,go,lto,objc,obj-c++
--enable-threads=posix --enable-checking=release --enable-objc-gc
--with-system-zlib --enable-libstdcxx-dual-abi
--with-default-libstdcxx-abi=new --disable-libstdcxx-pch
--disable-libunwind-exceptions --enable-__cxa_atexit --disable-libssp
--enable-gnu-unique-object --enable-plugin --enable-lto
--disable-install-libiberty --enable-gnu-indirect-function
--with-linker-hash-style=gnu --with-gnu-ld --with-isl --verbose
--with-arch-directory=amd64 --disable-gtktest --disable-werror
--enable-clocale=gnu --enable-multilib --target=x86_64-slackware-linux
--build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
gcc version 9.3.0 (GCC)

willysr 05-21-2020 12:33 AM

14.2 doesn't use gcc 9.3.0
Did you installed gcc from current into stable?

juju 05-21-2020 12:44 AM

I don't remember. It's been a while since I set up the machine. I did add multilib capability as described on this page: http://docs.slackware.com/slackware:multilib

willysr 05-21-2020 12:46 AM

Probably you mixed up your system with Slackware-Current
check your mirror setting in /etc/slackpkg/mirrors

juju 05-21-2020 01:00 AM

These are the relevant lines from my mirrors file:

# Slackware64-14.2

# USE MIRRORS.SLACKWARE.COM (DO NOT USE FTP - ONLY HTTP FINDS A NEARBY MIRROR)
http://mirrors.slackware.com/slackwa...ckware64-14.2/

http://hpc-mirror.usc.edu/pub/linux/...ckware64-14.2/

It would seem I uncommented 2 lines. I don't know if this will make much difference, but it is mentioned in the file notes. I will comment out the mirror from usc.edu

Alien Bob 05-21-2020 04:50 AM

This looks like you downloaded the gcc multilib packages for Slackware-current and installed those packages.

ehartman 05-21-2020 06:02 AM

Quote:

Originally Posted by juju (Post 6125557)
I imagine this is a fairly standard error. The library, libisl.so.22 is located at /usr/lib. I added this directory to my ld.so.conf file and ran ldconfig. This didn't help.

I should note this is a 64-bit machine.

The /usr/lib/libisl.so.22 should be a 32-bit library.
Do you have got a /usr/lib64/libisl.so.22 too?

Furthermore both gcc 9.3 and isl-22.1 are packages for -current, not for 14.2

PS: -current is often referred to as 14.2+ (note the PLUS) but is at the moment closer to the "to be released" 15.0 version then the almost 4 year old 14.2 one of Slackware.
Packages for -current are not compatible with 14.2 anymore.

juju 05-21-2020 04:10 PM

All of the mirrors under Slackware64-current in my slackpkg mirrors file are commented out. I've been using the Slackware64-14.2 mirrors for a while. I have set it to a single mirror, from texas.edu.

This would seem to contradict my downloading Slackware-current packages. It is possible I used the "current" mirror during initial set up.

I don't have /usr/lib64/libisl.so.22.

I.G.O.R 05-21-2020 04:20 PM

Quote:

Originally Posted by juju (Post 6125557)
Hello,

I'm tooling around on my Slackware 14.2 machine tonight, trying some beginner C programming. I encountered the following error when trying to compile my first program:

/usr/libexec/gcc/x86_64-slackware-linux/9.3.0/cc1: error while loading shared libraries: libisl.so.22: cannot open shared object file: No such file or directory

I imagine this is a fairly standard error. The library, libisl.so.22 is located at /usr/lib. I added this directory to my ld.so.conf file and ran ldconfig. This didn't help.

Running ldconfig -p shows the library in the appropriate directory.

I should note this is a 64-bit machine. It's been a while since I set it up, so I've forgotten the finer points of the system.

I'm fairly sure the answer is found in this multilib setup.

Thanks in advance...

Here is the output of the command gcc -v:

Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/9.3.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/9.3.0/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../gcc-9.3.0/configure --prefix=/usr
--libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info
--enable-shared --enable-bootstrap
--enable-languages=ada,brig,c,c++,d,fortran,go,lto,objc,obj-c++
--enable-threads=posix --enable-checking=release --enable-objc-gc
--with-system-zlib --enable-libstdcxx-dual-abi
--with-default-libstdcxx-abi=new --disable-libstdcxx-pch
--disable-libunwind-exceptions --enable-__cxa_atexit --disable-libssp
--enable-gnu-unique-object --enable-plugin --enable-lto
--disable-install-libiberty --enable-gnu-indirect-function
--with-linker-hash-style=gnu --with-gnu-ld --with-isl --verbose
--with-arch-directory=amd64 --disable-gtktest --disable-werror
--enable-clocale=gnu --enable-multilib --target=x86_64-slackware-linux
--build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
gcc version 9.3.0 (GCC)

I'm old enough to remember that summer Slackware 14.2 was released. Cc1 didn't have dependancy on isl. You messed up the system with newer gcc from -current.

bassmadrigal 05-21-2020 04:24 PM

libisl should be provided by the isl package in the l/ series on -current. gcc is looking for the 0.22.1 version of isl, which is version in -current right now. That means the gcc you're using is from -current (or multilib for -current).

If you're running a 14.2 install, isl is not included (it was added to -current in Sep 2019).

So, there's 3 different things it could be (in the order I believe to be the most likely to the least likely).

1. You're running 14.2 but installed the multilib packages for -current (which is what Alien Bob suggested above).
2. You're running an incomplete version of -current and missing the isl package.
3. You're running an partially out-of-date version of -current and have the older 0.21 version of isl.

To figure this out, can you provide us the output of the following command?

Code:

ls -l /var/log/packages/{aaa,gcc}*

juju 05-21-2020 04:39 PM

This is the output from: % slackpkg search gcc

slackpkg search gcc

Looking for gcc in package list. Please wait... DONE

The list below shows all packages with name matching "gcc".

[ Status ] [ Repository ] [ Package]
installed multilib gcc-9.3.0_multilib-x86_64-2alien
installed multilib gcc-brig-9.3.0_multilib-x86_64-2alien
installed multilib gcc-g++-9.3.0_multilib-x86_64-2alien
installed multilib gcc-gdc-9.3.0_multilib-x86_64-2alien
installed multilib gcc-gfortran-9.3.0_multilib-x86_64-2alien
installed multilib gcc-gnat-9.3.0_multilib-x86_64-2alien
installed multilib gcc-go-9.3.0_multilib-x86_64-2alien
installed multilib gcc-objc-9.3.0_multilib-x86_64-2alien
uninstalled patches gcc-java-5.5.0-x86_64-1_slack14.2
uninstalled slackware64 gccmakedep-1.0.3-noarch-1
uninstalled(masked) patches gcc-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-g++-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-gfortran-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-gnat-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-go-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-objc-5.5.0-x86_64-1_slack14.2
uninstalled(masked) slackware64 gcc-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-g++-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-gfortran-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-gnat-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-go-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-java-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-objc-5.3.0-x86_64-3

What would happen if I simply used % slackpkg remove gcc ?

juju 05-21-2020 04:43 PM

Here is the output from % ls -l /var/log/packages/{aaa,gcc}*

-rw-r--r-- 1 root root 2249 Jan 9 2017 /var/log/packages/aaa_base-14.2-x86_64-2
-rw-r--r-- 1 root root 2704 Jan 9 2017 /var/log/packages/aaa_elflibs-14.2-x86_64-23
-rw-r--r-- 1 root root 3545 May 20 18:47 /var/log/packages/aaa_elflibs-compat32-15.0-x86_64-23compat32
-rw-r--r-- 1 root root 13009 Jan 9 2017 /var/log/packages/aaa_terminfo-5.9-x86_64-1
-rw-r--r-- 1 root root 49124 Apr 7 20:02 /var/log/packages/gcc-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 1256 Apr 7 20:02 /var/log/packages/gcc-brig-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 45955 Apr 7 20:02 /var/log/packages/gcc-g++-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 53253 Apr 7 20:02 /var/log/packages/gcc-gdc-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 2503 Apr 7 20:02 /var/log/packages/gcc-gfortran-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 258610 Apr 7 20:02 /var/log/packages/gcc-gnat-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 20831 Apr 7 20:03 /var/log/packages/gcc-go-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 2318 Apr 7 20:03 /var/log/packages/gcc-objc-9.3.0_multilib-x86_64-2alien

I.G.O.R 05-21-2020 04:48 PM

Quote:

Originally Posted by juju (Post 6125843)
This is the output from: % slackpkg search gcc

slackpkg search gcc

Looking for gcc in package list. Please wait... DONE

The list below shows all packages with name matching "gcc".

[ Status ] [ Repository ] [ Package]
installed multilib gcc-9.3.0_multilib-x86_64-2alien
installed multilib gcc-brig-9.3.0_multilib-x86_64-2alien
installed multilib gcc-g++-9.3.0_multilib-x86_64-2alien
installed multilib gcc-gdc-9.3.0_multilib-x86_64-2alien
installed multilib gcc-gfortran-9.3.0_multilib-x86_64-2alien
installed multilib gcc-gnat-9.3.0_multilib-x86_64-2alien
installed multilib gcc-go-9.3.0_multilib-x86_64-2alien
installed multilib gcc-objc-9.3.0_multilib-x86_64-2alien
uninstalled patches gcc-java-5.5.0-x86_64-1_slack14.2
uninstalled slackware64 gccmakedep-1.0.3-noarch-1
uninstalled(masked) patches gcc-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-g++-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-gfortran-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-gnat-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-go-5.5.0-x86_64-1_slack14.2
uninstalled(masked) patches gcc-objc-5.5.0-x86_64-1_slack14.2
uninstalled(masked) slackware64 gcc-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-g++-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-gfortran-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-gnat-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-go-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-java-5.3.0-x86_64-3
uninstalled(masked) slackware64 gcc-objc-5.3.0-x86_64-3

What would happen if I simply used % slackpkg remove gcc ?

14.2 had gcc-5.5, not 9.3

drumz 05-21-2020 04:50 PM

Quote:

Originally Posted by juju (Post 6125835)
I've been using the Slackware64-14.2 mirrors for a while.

Please define "for a while." Did you used to be on -current, and then try to switch back to 14.2? That's ... fraught with danger.

Despite your claim of running 14.2, you have the -current multilib gcc. Get the correct multilib files from here:

http://bear.alienbase.nl/mirrors/peo...multilib/14.2/

And simply use upgradepkg to switch to the correct version.

I'll refrain from giving slackpkg advice as I don't use it.

Please don't mix -current and 14.2 packages!

drumz 05-21-2020 05:10 PM

Quote:

Originally Posted by juju (Post 6125844)
Here is the output from % ls -l /var/log/packages/{aaa,gcc}*

-rw-r--r-- 1 root root 2249 Jan 9 2017 /var/log/packages/aaa_base-14.2-x86_64-2
-rw-r--r-- 1 root root 2704 Jan 9 2017 /var/log/packages/aaa_elflibs-14.2-x86_64-23
-rw-r--r-- 1 root root 3545 May 20 18:47 /var/log/packages/aaa_elflibs-compat32-15.0-x86_64-23compat32
-rw-r--r-- 1 root root 13009 Jan 9 2017 /var/log/packages/aaa_terminfo-5.9-x86_64-1
-rw-r--r-- 1 root root 49124 Apr 7 20:02 /var/log/packages/gcc-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 1256 Apr 7 20:02 /var/log/packages/gcc-brig-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 45955 Apr 7 20:02 /var/log/packages/gcc-g++-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 53253 Apr 7 20:02 /var/log/packages/gcc-gdc-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 2503 Apr 7 20:02 /var/log/packages/gcc-gfortran-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 258610 Apr 7 20:02 /var/log/packages/gcc-gnat-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 20831 Apr 7 20:03 /var/log/packages/gcc-go-9.3.0_multilib-x86_64-2alien
-rw-r--r-- 1 root root 2318 Apr 7 20:03 /var/log/packages/gcc-objc-9.3.0_multilib-x86_64-2alien

Hi juju,

This is what I have:

Code:

# ls -l /var/log/packages/{aaa,gcc}*
-rw-r--r-- 1 root root  2249 Jan  3  2017 /var/log/packages/aaa_base-14.2-x86_64-2
-rw-r--r-- 1 root root  2704 Jan  3  2017 /var/log/packages/aaa_elflibs-14.2-x86_64-23
-rw-r--r-- 1 root root  2733 Jan  4  2017 /var/log/packages/aaa_elflibs-compat32-14.2-x86_64-23compat32
-rw-r--r-- 1 root root  13009 Jan  3  2017 /var/log/packages/aaa_terminfo-5.9-x86_64-1
-rw-r--r-- 1 root root  44804 Feb  7  2018 /var/log/packages/gcc-5.5.0_multilib-x86_64-1alien
-rw-r--r-- 1 root root  42000 Feb  7  2018 /var/log/packages/gcc-g++-5.5.0_multilib-x86_64-1alien
-rw-r--r-- 1 root root  2762 Feb  7  2018 /var/log/packages/gcc-gfortran-5.5.0_multilib-x86_64-1alien
-rw-r--r-- 1 root root 251675 Feb  7  2018 /var/log/packages/gcc-gnat-5.5.0_multilib-x86_64-1alien
-rw-r--r-- 1 root root  20355 Feb  7  2018 /var/log/packages/gcc-go-5.5.0_multilib-x86_64-1alien
-rw-r--r-- 1 root root 236582 Feb  7  2018 /var/log/packages/gcc-java-5.5.0_multilib-x86_64-1alien
-rw-r--r-- 1 root root  2232 Feb  7  2018 /var/log/packages/gcc-objc-5.5.0_multilib-x86_64-1alien
-rw-r--r-- 1 root root    798 Jan  3  2017 /var/log/packages/gccmakedep-1.0.3-noarch-1


juju 05-21-2020 05:15 PM

I don't remember. I said "for a while", because I know it has been some time (maybe a year) since I've done any kind of lengthy configuration on my machine. I do update monthly with slackpkg.

A little unclear about using upgradepkg. Should I use the aforementioned link and download a pkg and then use it as follows:

Code:

% upgradepkg gcc-5.5.0_multilib-x86_64-1alien.txz

bassmadrigal 05-21-2020 06:06 PM

It looks like your slackpkg mirror is set to 14.2, but your slackpkg+ mirror for multilib is set to -current.

Find the following line in your /etc/slackpkg/slackpkgplus.conf file and change "current" to "14.2" and then update the system.

Code:

MIRRORPLUS['multilib']=http://bear.alienbase.nl/mirrors/people/alien/multilib/current/
I would probably recommend the following to make sure you have the right stuff installed. The first will uninstall all 32bit compatibility layer packages to make sure you don't have stragglers from -current that shouldn't be on 14.2. The second will make sure slackpkg has the latest info for the repos. The third will "upgrade" your gcc and glibc packages to the correct 14.2 versions. The fourth will install all missing multilib packages.

Code:

removepkg /var/log/packages/*compat32*
slackpkg update
slackpkg upgrade multilib
slackpkg install multilib

After this, you should be good to go.

juju 05-21-2020 06:34 PM

That took a while, but it seems to work.

Many thanks for the assistance!

npkuin 04-30-2021 05:25 PM

perhaps this helps
 
I have been configuring a virtual machine, and choose an old OS, scientific linux, but needed a more recent gcc compiler, so downloaded all the required stuff, and then started gcc, of course using the online recipe, having had some 'experience' building gcc twenty years ago. All went well, until during a check, the same error, that cc1 cannot find the libisl lib, so was stuck. It seems to be, - from scouring the net - happening quite alot, so what was wrong? It had to be something in the environment, but what? After cheking this and that, I finally defined LD_LIBRARY_PATH=/lib (where a soft link to the lib was) and Hallo! It worked. Make is happily chugging away further and so, this may help in other cases.


All times are GMT -5. The time now is 09:22 PM.