LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   custom gcc build wont work (libmpfr.so.1: cannot open shared object file) (https://www.linuxquestions.org/questions/linux-software-2/custom-gcc-build-wont-work-libmpfr-so-1-cannot-open-shared-object-file-716439/)

furryfreak 04-02-2009 05:31 PM

[FIXED] custom gcc build wont work (libmpfr.so.1: cannot open shared object file)
 
I've just installed Arch Linux with just the bare minimum packages and a custom kernel build. So far, I've been compiling everything in Ubuntu installing it to the mounted Arch partition which has all gone smoothly so far. After doing the same for gcc, running it in Arch for the first time gave me the following output:

# gcc-stable -o test test.c
/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.3/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory

After getting that error I installed libmpfr and gmplib. The strange thing is that I still get the error message, even when I specify the library path on the command line (`gcc-stable -L/usr/local/lib -o test test.c`).

Heres how I configured gcc:

# ./configure --prefix="/mnt/arch/usr/local" \ Install to Arch's /usr/local
# --program-suffix="-stable" \ add the '-stable' suffix because I plan to mainly use svn build
# --disable-multilib Without this build fails (no 'stubs-32.h')

libmpfr and gmplib were both configured the same but without the --program-suffix, and with CFLAGS="-mtune=k8 -msse2 -O2".

Any help would be greatly appreciated.

EDIT:
Fixed it by adding a couple of symlinks in /usr/bin.

weibullguy 04-03-2009 01:58 AM

Quote:

Originally Posted by furryfreak (Post 3496576)
Fixed it by adding a couple of symlinks in /usr/bin.

Might be helpful for the next guy with this problem to know WHAT symlinks you created.

furryfreak 04-03-2009 03:39 AM

linked '/usr/local/lib/libmpfr.so.1' and '/usr/local/lib/libgmp.so.3' to the '/usr/lib' directory.
Though that was a very dirty fix, so after doing that I removed gcc and those libraries, and reconfigured them to use /usr as the install prefix rather than /usr/local


All times are GMT -5. The time now is 04:56 PM.