WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: gfortran missing libisl.so.13  (Read 2127 times)

Offline andrechalella

  • Newbie
  • *
  • Posts: 4
gfortran missing libisl.so.13
« on: October 21, 2019, 06:32:50 PM »
When I try to compile anything with gfortran (regardless of flags) I get this rather long line:

Code: [Select]
/usr/local/lib/gcc/i486-pc-linux-gnu/5.2.0/f951: error while loading shared libraries: libisl.so.13: cannot open shared object file: No such file or directory
There's a 2 years old related but incomplete thread about the same error with gcc in Corepure64 (link below), but gcc actually works for me. I was able to compile a Hello World in C with no problems at all.

http://forum.tinycorelinux.net/index.php/topic,21130.msg131991.html

Since I didn't find any libisl.so in the repo (much less version 13), I'm looking online for a replacement, but can't seem to find it anywhere (Debian jumps from 12 to 18 for example). Maybe I'll try to compile it, but I can't guarantee anything.

Offline andrechalella

  • Newbie
  • *
  • Posts: 4
Re: gfortran missing libisl.so.13
« Reply #1 on: October 22, 2019, 11:08:21 PM »
I was able to easily satisfy the libisl.so.13 dependency:

Code: [Select]
curl -O http://isl.gforge.inria.fr/isl-0.13.tar.xz
tar x -J -f isl-0.13.tar.xz
cd isl-0.13
tce-load -i gmp-dev
./configure && make && sudo make install
sudo ldconfig

Then I ran into a new dependency error (libmpfr.so.4):

Code: [Select]
/usr/local/lib/gcc/i486-pc-linux-gnu/5.2.0/f951: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
I found I had mpfr.tcz installed, but for some reason it contains libmpfr.so.6 instead of .4 -- funny because the package description claims it is version 4! Anyway, this was solved by:

Code: [Select]
sudo ln -s /usr/local/lib/libmpfr.so /usr/local/lib/libmpfr.so.4
sudo ldconfig

... maybe this will cause unintended consequences in the future, though.

Anyway, the REAL dead-end was liblto_plugin.so:

Code: [Select]
gfortran: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
I found I do have this file:

Code: [Select]
$ sudo find / -name liblto_plugin.so
/tmp/tcloop/gcc/usr/local/lib/bfd-plugins/liblto_plugin.so
/tmp/tcloop/gcc/usr/local/lib/gcc/i486-pc-linux-gnu/8.2.0/liblto_plugin.so
/usr/local/lib/gcc/i486-pc-linux-gnu/8.2.0/liblto_plugin.so
/usr/local/lib/bfd-plugins/liblto_plugin.so

However, no combination of copying that file everywhere or setting LD_LIBRARY_PATH, LIBRARY_PATH, LDLIBS, LDFLAGS was able to even slightly change that error line.

Except for -fno-use-linker-plugin, but it didn't help much either:

Code: [Select]
ld: cannot find crtbegin.o: No such file or directory
ld: cannot find -lgcc

I don't know if this entire post belongs here. I just wanted to write this before I got some sleep.

Any help is greatly appreciated.

PS: gfortran.tcz is a bit outdated -- 5.2.0 (2015) while gcc.tcz is 8.2.0 (2018)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: gfortran missing libisl.so.13
« Reply #2 on: October 22, 2019, 11:23:54 PM »
The latest version of gfortran was compiled in tc-7.x using gcc-5.2.0.

Since that time various dependencies have been updated, which explains why it does not work in tc-10.x with gcc-8.2.0.

I'll take a look, but it might not be for a couple of weeks.

Offline andrechalella

  • Newbie
  • *
  • Posts: 4
Re: gfortran missing libisl.so.13
« Reply #3 on: October 22, 2019, 11:25:01 PM »
Success!

Turns out it really had to do with version mismatch between gcc and gfortran (see PS of the previous message).

The files existed in 8.2.0 (GCC version) dir:

/usr/local/lib/gcc/i486-pc-linux-gnu/8.2.0/

But they ought to be in 5.2.0 (GFortran version) dir:

/usr/local/lib/gcc/i486-pc-linux-gnu/5.2.0/

Fix:

Code: [Select]
missing='liblto_plugin.so crtbegin.o libgcc.a crtend.o'
dir1=/usr/local/lib/gcc/i486-pc-linux-gnu/8.2.0
dir2=/usr/local/lib/gcc/i486-pc-linux-gnu/5.2.0
for x in $missing; do sudo ln -s $dir1/$x $dir2/; done

Now gfortran is able to successfully compile my (rather simple) Fortran programs.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: gfortran missing libisl.so.13
« Reply #4 on: October 23, 2019, 05:13:52 AM »
updated version posted, but not tested