Bug 41601 - GNU Fortran is not working
Summary: GNU Fortran is not working
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-06 13:07 UTC by Chris Hamer-Hodges
Modified: 2009-10-07 10:23 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
config.log error report (7.97 KB, text/plain)
2009-10-06 13:08 UTC, Chris Hamer-Hodges
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hamer-Hodges 2009-10-06 13:07:49 UTC
I have tried several times to compile gcc-4.4.1 from source on my TSL Linux server. *I am not compiling from within the source tree*, and I have made sure that I have mpfr and gmp which I compiled and installed from source without problems.

Each time it fails with:

checking whether the GNU Fortran compiler is working... no

and the first error in the config log seems to be

undefined reference to `shl_load'

As TSL is no longer a supported distro I have no option but to compile all my apps from source (and I don't yet have g++) so any help would be greatly appreciated!

Sorry if I have not filled out all the details correctly. Also I'm not sure how to attach a file here. So I have made my config.log available on my server via http here:

http://chrishh.homeip.net/config.log
Comment 1 Chris Hamer-Hodges 2009-10-06 13:08:58 UTC
Created attachment 18719 [details]
config.log error report

ah now I see the attach option
Comment 2 Andreas Schwab 2009-10-06 13:19:41 UTC
This is the real problem:

/root/gcc-build/./gcc/f951: relocation error: /usr/local/lib/libmpfr.so.1: undefined symbol: __gmp_get_memory_functions

You need to fix your libmpfr installation.
Comment 3 Jerry DeLisle 2009-10-07 01:29:06 UTC
Please let us know if you fix this and/or you are still stuck.
Comment 4 Chris Hamer-Hodges 2009-10-07 10:23:24 UTC
(In reply to comment #3)
> Please let us know if you fix this and/or you are still stuck.
> 

Yes. I've got this fixed now!
gcc now fully compiled. 

Many thanks for the pointer to the __gmp_get_memory_functions
error. I couldn't have done it without this info. http://www.mpfr.org/faq.html#undef_ref1 describes the problem I had and suggests some solutions.

In short I had two GMP libraries. One in /usr/local/lib, which I had compiled from source, and one in /usr/lib, which was there from the distro.

Rather than fiddle about with compiler options and library paths I just updated the gmp symlink in /usr/lib to point to the new library in /usr/local/lib and then everything worked a treat.

Many thanks, once again.