Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2007 00:16:01 +0100
From:      Roland Smith <rsmith@xs4all.nl>
To:        Steve Franks <stevefranks@ieee.org>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: arbitrary build can't find libs - right way to do this?
Message-ID:  <20071120231601.GB1161@slackbox.xs4all.nl>
In-Reply-To: <539c60b90711201434s361ec72co898fad601f35535a@mail.gmail.com>
References:  <539c60b90711201434s361ec72co898fad601f35535a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071120231601.GB1161>