From owner-freebsd-stable@FreeBSD.ORG Thu Dec 16 07:13:23 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 632E516A4CE for ; Thu, 16 Dec 2004 07:13:23 +0000 (GMT) Received: from mars.siad.net (h-69-3-214-122.lsanca54.covad.net [69.3.214.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26AD443D2D for ; Thu, 16 Dec 2004 07:13:23 +0000 (GMT) (envelope-from don@siad.net) Received: from siad.net (h-69-3-214-124.lsanca54.covad.net [69.3.214.124]) by mars.siad.net (8.12.11/8.12.11) with ESMTP id iBG7GDjG073260 for ; Wed, 15 Dec 2004 23:16:13 -0800 (PST) (envelope-from don@siad.net) Message-ID: <41C1358E.1020305@siad.net> Date: Thu, 16 Dec 2004 02:13:18 -0500 From: "Don L. Belcher" User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en, fr MIME-Version: 1.0 To: freebsd-stable Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.70j Subject: [Fwd: Cannot find libraries in /usr/local/lib even though they are in hints files] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2004 07:13:23 -0000 FreeBSD satellite.siad.net 4.10-STABLE FreeBSD 4.10-STABLE #0: Mon Jul 19 00:39:31 PDT 2004 Cannot find libraries in /usr/local/lib even thought they are in the hints file. Is there something else I need to do? satellite% ld -o hello -lmpeg hello.o /usr/libexec/elf/ld: cannot find -lmpeg satellite% ldconfig -r | grep mpeg 464:-lmpeg.1 => /usr/local/lib/libmpeg.so.1 satellite% ldconfig -r | more /var/run/ld-elf.so.hints: search directories: /usr/lib:/usr/lib/compat:/usr/X11R6/lib:/usr/local/lib:/usr/local/lib/compat:/usr/local/lib/mysql:/usr/local/lib/ compat/pkg:/usr/local/lib/pth:/usr/local/lib/wine:/usr/local/lib/kde3 satellite% ll /usr/local/lib/libmpeg.a -r--r--r-- 1 root wheel 132902 Apr 11 2001 /usr/local/lib/libmpeg.a Using a library in /usr/lib works: satellite% ld -o hello -lpam hello.o /usr/libexec/elf/ld: warning: cannot find entry symbol _start; defaulting to 080481c0 hello.o: In function `main': hello.o(.text+0x25): undefined reference to `puts' It also works if I manually add the library path satellite% ld -o hello -lmpeg -L/usr/local/lib hello.o /usr/libexec/elf/ld: warning: cannot find entry symbol _start; defaulting to 080481c8 hello.o: In function `main':