From owner-freebsd-ports@FreeBSD.ORG Fri May 5 20:40:55 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A28B816A404 for ; Fri, 5 May 2006 20:40:55 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C1FC43D46 for ; Fri, 5 May 2006 20:40:55 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.13.6/8.13.6) with ESMTP id k45KesIr043828 for ; Fri, 5 May 2006 13:40:55 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.6/8.13.6/Submit) id k45Kesrm043827 for freebsd-ports@freebsd.org; Fri, 5 May 2006 13:40:54 -0700 (PDT) (envelope-from sgk) Date: Fri, 5 May 2006 13:40:54 -0700 From: Steve Kargl To: freebsd-ports@freebsd.org Message-ID: <20060505204054.GA43479@troutmask.apl.washington.edu> References: <20060505194941.GA20542@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060505194941.GA20542@troutmask.apl.washington.edu> User-Agent: Mutt/1.4.2.1i Subject: Re: loader problem X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2006 20:40:55 -0000 (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