From owner-cvs-ports@FreeBSD.ORG Fri Mar 10 08:58:07 2006 Return-Path: X-Original-To: cvs-ports@FreeBSD.org Delivered-To: cvs-ports@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A66D16A420; Fri, 10 Mar 2006 08:58:07 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EFBD43D46; Fri, 10 Mar 2006 08:58:06 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id E9FB020A6; Fri, 10 Mar 2006 09:58:00 +0100 (CET) X-Spam-Tests: AWL,BAYES_00,FORGED_RCVD_HELO X-Spam-Learn: ham X-Spam-Score: -2.4/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id BD3F020A5; Fri, 10 Mar 2006 09:58:00 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id A182933C31; Fri, 10 Mar 2006 09:58:00 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Ade Lovett References: <200602231043.k1NAhYlr080084@repoman.freebsd.org> <86irqpwy35.fsf@xps.des.no> Date: Fri, 10 Mar 2006 09:58:00 +0100 In-Reply-To: (Ade Lovett's message of "Thu, 9 Mar 2006 07:39:32 -0800") Message-ID: <86lkvi8ynb.fsf@xps.des.no> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/Mk bsd.autotools.mk X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2006 08:58:07 -0000 Ade Lovett writes: > On Mar 07, 2006, at 16:59 , Dag-Erling Sm=F8rgrav wrote: > > .la files are useless on an ELF system > Cite, please? Given that around 35% of our libtool-using ports > already installed .la files prior to this change, as well as > extensive use of them in Linux and NetBSD's pkgsrc (both of which > run on ELF-based systems, last time I checked), I'm sure any such > critical problems would have been found by now. The purpose of .la files is to record dependencies between libraries. The ELF format stores these dependencies in the libraries themselves, so the .la files serve no purpose, and it's actually harmful in some cases because it hardcodes the path to the .so file, preventing relocation of the library. To be specific, let's say you build library A with --prefix=3D/usr/local and install it with DESTDIR=3D/tmp/cross-build (so it ends up in /tmp/cross-build/usr/local/lib/libA.{so,la}). Next, you build library B, which depends on library A, also with --prefix=3D/usr/local, and with LD_LIBRARY_PATH set to /tmp/cross-build/usr/local/lib. Libtool will find the .la file, but that file has libdir set to /usr/local/lib, so libtool will run ld with -l/usr/local/lib/libA.so, which won't work. If you remove the .la file, libtool will run ld with -lA instead; ld will obey your LD_LIBRARY_PATH, and everything will be fine. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no