[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Building Fortran shared libraries doesn't work

This is an in-case-I-get-hit-by-a-truck-here's-a-brain-dump email.

When trying to build a Fortran shlib, for example blas, we get:

$ f77 -shared -Wl,-soname=libblas.so.2 -o libblas.so.2.2.0 *.o
/usr/lib/gcc-lib/hppa-linux/3.0.1/../../../../hppa-linux/bin/ld: fmt.o: relocation R_PARISC_DPREL21L can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc-lib/hppa-linux/3.0.1/libg2c.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

(I'm doing this on an hppa box; it applies equally to ia64).

Using -v, we see:

$ g77 -v -shared -Wl,-soname=libblas.so.2 -o libblas.so.2.2.0 *.o
g77 version 3.0.1 20010801 (Debian prerelease) (Fortran Frontend version 0.5.26 20010801 (experimental))
Driving: g77 -v -shared -Wl,-soname=libblas.so.2 -o libblas.so.2.2.0 (...) -lg2c -lm

and there we go.  Since there is no libg2c.so, it links in the .a instead
and we're stuffed.  This bug has already been reported:


And seems to be a wont-fix-until-gcc3.1.  Is this acceptable?

The only packages which seem to be failed due to this problem are blas
& pdl.  tela & blitz++ depend on blas, and gimp1.2 depends on pdl.
How much do we want to ship gimp in woody?

Revolutions do not require corporate support.

Reply to: