From owner-freebsd-questions@FreeBSD.ORG Wed Mar 2 22:04:13 2005 Return-Path: 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 BF6FD16A4CE for ; Wed, 2 Mar 2005 22:04:13 +0000 (GMT) Received: from pernis.its.uu.se (pernis.its.UU.SE [130.238.4.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27E3643D1D for ; Wed, 2 Mar 2005 22:04:12 +0000 (GMT) (envelope-from ante@Update.UU.SE) Received: by pernis.its.uu.se (Postfix, from userid 205) id 6B385DF; Wed, 2 Mar 2005 23:04:11 +0100 (MEZ) Received: from pernis.its.uu.se(127.0.0.1) by pernis.its.uu.se via virus-scan id s339; Wed, 2 Mar 05 23:04:03 +0100 Received: from Psilocybe.Update.UU.SE (Psilocybe.Update.UU.SE [130.238.19.25]) by pernis.its.uu.se (Postfix) with ESMTP id 8D15FDF; Wed, 2 Mar 2005 23:04:03 +0100 (MEZ) Received: by Psilocybe.Update.UU.SE (Postfix, from userid 30086) id 82EAA38012; Wed, 2 Mar 2005 23:04:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by Psilocybe.Update.UU.SE (Postfix) with ESMTP id 787345C002; Wed, 2 Mar 2005 23:04:03 +0100 (CET) Date: Wed, 2 Mar 2005 23:04:03 +0100 (CET) From: Andreas Davour To: Dan Nelson In-Reply-To: <20050302205530.GB77052@dan.emsphone.com> Message-ID: References: <20050302205530.GB77052@dan.emsphone.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-questions@freebsd.org Subject: Re: Where do the linker look for shared libraries? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2005 22:04:13 -0000 On Wed, 2 Mar 2005, Dan Nelson wrote: >>>> and the errors I get looks like this: >>>> >>>> /usr/local/lib//liballeg.so: undefined reference to `_poly_zbuf_atex_trans8' >>>> /usr/local/lib//liballeg.so: undefined reference to `_poly_scanline_atex_mask_lit32' >>> >>> This is the linker saying "there are symbols in liballeg.so that I >>> cannot find anywhere". Maybe you need to specify another library >>> along with liballeg? Are you using the allegro port? >> >> I have grep'ed for those symbols and they come from liballeg.so, no >> place else. That's one of the very confusing things with those errors. > > A web search on "undefined reference _poly_zbuf_atex_trans8" comes up > with a couple hits, including a post that says you need to use the > allegro-config command to determine the correct flags and libraries to > link allegro. What does "allegro-config --libs" print? The demo > programs built by the allegro port must work, so you could always build > the port again and determine what flags it used. Allegro have indeed changed since I looked at it last. I think it's time to check the pkg-plist. I didn't even think about Google! That did indeed fix the problems. I wasn't far off, but it had to link with a file with the unfriendly name "unsharable". >> I'm using the allegro port. BTW, there is a linux-allegro port as well. >> Why is this needed if Allegro is a platform independant API? > > For linux programs that might need the library (same API, different > ABI). I assume there's at least one in the ports tree somewhere. OK. Sounds strange, but I guess it makes sense. I still wonder if there's a way to have ld not go looking for ar archives by deafault... /Andreas -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?