Page 1 of 1

libisl.so.15 not found building a cross-compiler

Posted: Sun Dec 02, 2018 2:31 pm
by mihe
Hello cloud of wisdom,

I am having a bumpy ride preparing a cross-compiler for i686-elf target.

I am using Ubuntu, compiling using GCC 8.2, binutils 2.3.1 and the target builds are the same versions. I was able to build the binutils sucesfully but gcc failed, because some incompatibility with the library ISL.

For libisl-dev, first I installed the one in the apt-get cache (0.20), but apparently this one is not supported to build GCC 8.2, so I removed it using apt-get remove. I downloaded, build and installed the 0.18 version, which for what I have read, is the one working to build Gcc 8.2. To do this, I downloaded the tar, extracted, make and make install, using a terminal as root. After this, I ran again the "configure" and "make all-gcc", but apparently it cannot find the library libisl.so.15.

I am not really familiar with linux, so I do not know if i have to do anything else to have the 0.18 library available (I assume the make install copies it to the appropiate bin folder, but I might be wrong here). Also, does that .15 in the filename means that it is looking for the version 0.15?

Any comment, suggestion or tip will be very welcomed !! Thanks in advance

This is an screenshot of the error:

Image

EDIT1: I have also found that file in the usr/local/lib. Still I do not know the meaning of that .15 and whether or not this is the lib I installed (that one was the isl-0.18)

Image

Re: libisl.so.15 not found building a cross-compiler

Posted: Sun Dec 02, 2018 3:09 pm
by mihe
I reply to myself, as it seems I fixed the issue:

I added the /usr/local/lib path to the LD_LIBRARY_PATH using the export command and now it seems to work !!

Re: libisl.so.15 not found building a cross-compiler

Posted: Sun Dec 02, 2018 4:43 pm
by Octocontrabass
GCC includes scripts to automatically download and build the required GMP/MPFR/MPC/ISL versions. Rather than manually installing ISL and pointing the build system at it (which works, but is a bit of a pain), you could use those scripts instead.

The only change to a normal build process is running the download script first:

Code: Select all

~/src/gcc-8.2.0$ ./contrib/download_prerequisites
After that, the configure/make scripts will detect the downloaded libraries and use them.

(For anyone else following along at home, these instructions assume Linux or BSD or one of the other common Unix-like OSes. This won't work if you're on Windows or trying to build GCC under your own OS.)


Unrelated, but you probably shouldn't be doing all of this in a root shell.

Re: libisl.so.15 not found building a cross-compiler

Posted: Sun Dec 02, 2018 5:06 pm
by mihe
Thanks for the tip Octocontrabass !, nice to see there is an script to automate the dependencies, because I have spent the whole day preparing the cross-compiler, but I am happy I eventually made it work.

Regarding the root, you are right, especially considering how clumsy I am around Linux :D