loader problem

Steve Kargl sgk at troutmask.apl.washington.edu
Fri May 5 20:40:55 UTC 2006


(Redirected to freebsd-ports)

On Fri, May 05, 2006 at 12:49:41PM -0700, Steve Kargl wrote:
> I have set WITHOUT_FORTRAN in /etc/make.conf and rebuilt/installed
> a new world.  I've removed all Fortran files related to the base
> system f77 (aka g77) from my system.
> 
> I've install gfortran as a Fortran compiler in /usr/local.
> 
> As root, I do
> % cd /usr/ports/math/lapack
> % setenv FC gfortran
> % make
> 
> gfortran   -O2 -pipe -c lsame.f
> cc -O2 -fno-strict-aliasing -pipe -march=opteron -march=opteron  -c etime_.c
> gfortran   -O2 -pipe -c slamch.f
> gfortran   -O2 -pipe -c second.f
> gfortran   -O2 -pipe -c dlamch.f
> gfortran   -O2 -pipe -c dsecnd.f
> building static lapack library
> ranlib liblapack.a
> gfortran -fpic -DPIC -O2 -pipe -o lsame.So -c lsame.f
> cc -fpic -DPIC -O2 -fno-strict-aliasing -pipe -march=opteron -march=opteron  -c etime_.c -o etime_.So
> gfortran -fpic -DPIC -O2 -pipe -o slamch.So -c slamch.f
> gfortran -fpic -DPIC -O2 -pipe -o second.So -c second.f
> gfortran -fpic -DPIC -O2 -pipe -o dlamch.So -c dlamch.f
> gfortran -fpic -DPIC -O2 -pipe -o dsecnd.So -c dsecnd.f
> building shared library liblapack.so.3
> /usr/bin/ld: cannot find -lg2c
> *** Error code 1
> 
> Stop in /usr/ports/math/lapack/work/LAPACK/SRC.
> *** Error code 1
> 
> Why is /usr/bin/ld looking for libg2c, which was removed?
> libg2c is f77's (aka g77's) runtime library.  How do I tell
> ld to not include -lg2c?
> 

The math/lapack is broken due to the unconditional use of
the f77 runtime.  Using a non base system compiler should
work.

troutmask:root[243] pwd
/usr/ports/math/lapack
troutmask:root[244] find . -type f | xargs grep LDADD
./scripts/configure:LDADD=      -l${LIBG2C}
./work/LAPACK/SRC/Makefile:LDADD=       -lg2c

The script is fubar.

-- 
Steve


More information about the freebsd-ports mailing list