gcc-3.1 Fortran linking

Steve Edwards edwardss@whl.co.uk
Fri May 17 10:59:00 GMT 2002


I encountered a slight difficulty linking fortran code with g77 from
gcc-3.1. It fails with cannot find -lfrtbegin. After a brief search I
found this in /usr/local/lib/gcc-lib/i686-pc-linux-gnu as a static
library. Manually adding this path with -L works fine (this directory
also contains libg2c as well).

I tried g77 -print-search-dirs and got:

install: /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/
programs:
=/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/:/usr/lib/gcc/i686-pc-linux-gnu/3.1/:/usr/lib/gcc/i686-pc-linux-gnu/:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../../i686-pc-linux-gnu/bin/i686-pc-linux-gnu/3.1/:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../../i686-pc-linux-gnu/bin/
libraries:
=/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/:/usr/lib/gcc/i686-pc-linux-gnu/3.1/:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.1/:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../../i686-pc-linux-gnu/lib/:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../i686-pc-linux-gnu/3.1/:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../:/lib/i686-pc-linux-gnu/3.1/:/lib/:/usr/lib/i686-pc-linux-gnu/3.1/:/usr/lib/

which doesn't appear to be looking for libraries in
/usr/local/lib/gcc-lib/i686-pc-linux-gnu

Back-checking against 3.0.4 showed that the search paths were similar,
however in 3.0.4 libfrtbegin doesn't appear to exist and libg2c is a
static library in the /usr/local/lib/i686-pc-linux-gnu/3.0.4 directory
and not /usr/local/lib/i686-pc-linux-gnu

I haven't tried any other platforms yet with 3.1, so I don't know if
this is only specific to ix86.

Is this an install problem or have I missed something blatently obvious?

Steve
-- 
----------------------------------------------------------
Yow! of the hour:
They couldn't hit an elephant at this dist
----------------------------------------------------------



More information about the Gcc-help mailing list