From owner-freebsd-questions@FreeBSD.ORG Tue Nov 20 23:16:04 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E27916A47F for ; Tue, 20 Nov 2007 23:16:04 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr10.xs4all.nl (smtp-vbr10.xs4all.nl [194.109.24.30]) by mx1.freebsd.org (Postfix) with ESMTP id 2BFA413C468 for ; Tue, 20 Nov 2007 23:16:03 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr10.xs4all.nl (8.13.8/8.13.8) with ESMTP id lAKNG2db073395; Wed, 21 Nov 2007 00:16:02 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id AE192B8F8; Wed, 21 Nov 2007 00:16:01 +0100 (CET) Date: Wed, 21 Nov 2007 00:16:01 +0100 From: Roland Smith To: Steve Franks Message-ID: <20071120231601.GB1161@slackbox.xs4all.nl> Mail-Followup-To: Steve Franks , User Questions References: <539c60b90711201434s361ec72co898fad601f35535a@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tsOsTdHNUZQcU9Ye" Content-Disposition: inline In-Reply-To: <539c60b90711201434s361ec72co898fad601f35535a@mail.gmail.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: User Questions Subject: Re: arbitrary build can't find libs - right way to do this? 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, 20 Nov 2007 23:16:04 -0000 --tsOsTdHNUZQcU9Ye Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 20, 2007 at 03:34:29PM -0700, Steve Franks wrote: > I'm trying to compile a non-port application for the first time ever. > The associated library built and installed just fine - I can see them > right in /usr/local/lib and usr/local/include/libnamefoo.h However, > when I run ./configure for the application, it clearly can't find the > libs. So my question is, should I be changing my path, is there a > standard variable I need to export, or what? Obviously for ports this > just works, so I've never had to do it. I'm sure there's a standard > way, so I thought I'd get in the habit of doing that right from the > start... The best way would be to write a port makefile and submit it. That way you only have to figure it out once. Especially if the app needs patches to work correctly on FreeBSD. And in case of a free software app, others can use it as well, _and_ help you with bugfixing. :-) For closed source stuff submitting a port would probably be useless. Usually configure scripts have options that allow you to tell it where to look for header files and libraries. You can also use the environment variables CPATH (for include files) and LIBRARY_PATH that tell gcc where to look. After installing a shared library, you need to run ldconfig so the system can find it at runtime. Usually this is done by make install, but it can't hurt to make sure. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --tsOsTdHNUZQcU9Ye Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHQ2qxEnfvsMMhpyURAiPVAJ9c179YbsELZpXGz5QBQ5z95aQDoACfUZSZ U17ouU01RcTYWR1tmiwQ7i8= =h+pw -----END PGP SIGNATURE----- --tsOsTdHNUZQcU9Ye--