From owner-freebsd-questions@FreeBSD.ORG Tue May 9 18:59:35 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1807516A4A6 for ; Tue, 9 May 2006 18:59:35 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from drone1.qsi.net.nz (drone1-svc-skyt.qsi.net.nz [202.89.128.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E219343D45 for ; Tue, 9 May 2006 18:59:33 +0000 (GMT) (envelope-from jonc@chen.org.nz) Received: (qmail 4612 invoked by uid 0); 9 May 2006 18:59:28 -0000 Received: from unknown (HELO chen.org.nz) ([202.89.146.5]) (envelope-sender ) by 0 (qmail-ldap-1.03) with SMTP for ; 9 May 2006 18:59:28 -0000 Received: by chen.org.nz (Postfix, from userid 1000) id 8744C5643F; Wed, 10 May 2006 06:59:27 +1200 (NZST) Date: Wed, 10 May 2006 06:59:27 +1200 From: Jonathan Chen To: soralx@cydem.org Message-ID: <20060509185927.GB5327@osiris.chen.org.nz> References: <200605090416.24346.soralx@cydem.org> <44607B4C.8060801@mac.com> <200605090441.57320.soralx@cydem.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200605090441.57320.soralx@cydem.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-questions@freebsd.org Subject: Re: linker wiredness? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2006 18:59:35 -0000 On Tue, May 09, 2006 at 04:41:57AM -0700, soralx@cydem.org wrote: > > > soralx@cydem.org wrote: > > > [root@soralx /geda-gschem-20060123]# rm ./conftest > > > [root@soralx /geda-gschem-20060123]# cc -o conftest -g -O2 conftest.c -lstroke > > > /usr/bin/ld: cannot find -lstroke > > > > > >>>> ^^^^^^^^^^^^^^^^^^^^ -- why??? <<< > > >>>> > > > [root@soralx /geda-gschem-20060123]# ldconfig -r|grep stroke > > > 441:-lstroke.0 => /usr/local/lib/libstroke.so.0 > > > 442:-lgstroke.0 => /usr/local/lib/libgstroke.so.0 > > > [root@soralx /geda-gschem-20060123]# cc -o conftest -g -O2 conftest.c -L/usr/local/lib -lstroke > > > [root@soralx /geda-gschem-20060123]# ll ./conftest > > > -rwxr-xr-x 1 root 1000 5594 May 9 04:06 ./conftest* > > > > > > Am I missing something here? > > > > FreeBSD's linker doesn't add /usr/local/lib to the search path by > > default, unlike some other operating systems. The "-L/usr/local/lib" > > flag is therefore required... > > but ldconfig already found the library (line 441)!? ld(1) doesn't consult ldconfig(8). -- Jonathan Chen ---------------------------------------------------------------------- "A person should be able to do a small bit of everything, specialisation is for insects"