From owner-freebsd-questions Fri Jan 3 20:38: 3 2003 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 8A28B37B401 for ; Fri, 3 Jan 2003 20:38:00 -0800 (PST) Received: from spry.com (spry.com [66.228.209.63]) by mx1.FreeBSD.org (Postfix) with SMTP id 17C9243F08 for ; Fri, 3 Jan 2003 20:38:00 -0800 (PST) (envelope-from jhopper@spry.com) Received: (qmail 38424 invoked from network); 4 Jan 2003 04:33:29 -0000 Received: from spry.com (HELO 12-229-197-18.client.attbi.com) (jhopper@spry.com@66.228.209.63) by spry.com with SMTP; 4 Jan 2003 04:33:29 -0000 Subject: Re: Mysterious problem with ldconfig and ld From: Justin Hopper To: Matthew Emmerton Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: <004001c2b3a6$b3c4fe10$1200a8c0@gsicomp.on.ca> References: <1041652526.27245.29.camel@home.gusalmighty.com> <004001c2b3a6$b3c4fe10$1200a8c0@gsicomp.on.ca> Content-Type: multipart/mixed; boundary="=-sA4HFO2L5L9Tiro52BTc" Organization: Message-Id: <1041654912.27258.36.camel@home.gusalmighty.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 03 Jan 2003 20:35:13 -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-sA4HFO2L5L9Tiro52BTc Content-Type: text/plain Content-Transfer-Encoding: 7bit Hmmm, I guess I just assumed that since ldconfig had cached the absolute path to the library, ld would not need to know the library path as well, but for some reason it did. What ultimately fixed the problem was hardcoding the -L /usr/local/lib in the configure script, since it refused to pick up that directory any other way. Thanks for your help. As a point of curiosity, I'd still like to know why ld would still need the -L /usr/local/lib if the full path to the library is already in the cache? -- Justin Hopper jhopper@spry.com UNIX Systems Engineer http://www.spry.com --=-sA4HFO2L5L9Tiro52BTc Content-Disposition: inline Content-Description: Forwarded message - Re: Mysterious problem with ldconfig and ld Content-Type: message/rfc822 Return-Path: Delivered-To: jhopper@spry.com Received: (qmail 13533 invoked from network); 4 Jan 2003 04:02:22 -0000 Received: from tomts21-srv.bellnexxia.net (209.226.175.183) by spry.com with SMTP; 4 Jan 2003 04:02:22 -0000 Received: from gabby.gsicomp.on.ca ([65.95.187.110]) by tomts21-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20030104040642.GXZT7873.tomts21-srv.bellnexxia.net@gabby.gsicomp.on.ca>; Fri, 3 Jan 2003 23:06:42 -0500 Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (8.12.6/8.12.6) with SMTP id h0444wk5056314; Fri, 3 Jan 2003 23:04:58 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <004001c2b3a6$b3c4fe10$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Justin Hopper" , References: <1041652526.27245.29.camel@home.gusalmighty.com> Subject: Re: Mysterious problem with ldconfig and ld Date: Fri, 3 Jan 2003 23:06:47 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Content-Transfer-Encoding: 7bit > This may be a very simple fix, but so far I've found no solution. Just > installed expat-1.95.5 in a FreeBSD 4.4 machine. The install went fine, > and I verified that ldconfig had picked up the library: > > host# ldconfig -r | grep expat > 73:-lexpat.4 => /usr/local/lib/libexpat.so.4 > > However, I need to install other packages that require the expat > library, and the configuration fails stating that the expat library > cannot be found. In fact, just a simple test fails: > > host# ld -lexpat > /usr/libexec/elf/ld: cannot find -lexpat How about ld -L/usr/local/lib -lexpat? Works fine here: gabby# ld -L /usr/local/lib -lexpat /usr/libexec/elf/ld: warning: cannot find entry symbol _start; not setting start address /usr/local/lib/libexpat.so: undefined reference to `memmove' /usr/local/lib/libexpat.so: undefined reference to `memcpy' /usr/local/lib/libexpat.so: undefined reference to `malloc' /usr/local/lib/libexpat.so: undefined reference to `realloc' /usr/local/lib/libexpat.so: undefined reference to `memset' /usr/local/lib/libexpat.so: undefined reference to `free' gabby# If some programs can't find it, it's probably because /usr/local/lib isn't in their search path. -- Matt Emmerton --=-sA4HFO2L5L9Tiro52BTc-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message