LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-02-2009, 06:31 PM   #1
furryfreak
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
[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.

Last edited by furryfreak; 04-02-2009 at 07:14 PM. Reason: FIXED
 
Old 04-03-2009, 02:58 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,753
Blog Entries: 1

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by furryfreak View Post
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.
 
Old 04-03-2009, 04:39 AM   #3
furryfreak
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
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

Last edited by furryfreak; 04-03-2009 at 05:28 AM. Reason: typo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 06:47 AM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file PaulyWally Debian 2 10-18-2008 06:59 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 06:10 PM
cannot open shared object file barells Linux - Software 2 07-16-2005 08:53 AM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM


All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration