Date: Tue, 28 May 2002 16:23:39 -0400 From: Antoine Beaupre <anarcat@anarcat.ath.cx> To: Terry Lambert <tlambert2@mindspring.com> Cc: "Greg 'groggy' Lehey" <grog@FreeBSD.org>, FreeBSD-arch@FreeBSD.org Subject: Re: Why don't we search /usr/local/lib and /usr/local/include by default? Message-ID: <CBBD7FE7-7278-11D6-93A2-0050E4A0BB3F@anarcat.ath.cx> In-Reply-To: <3CF3DAFB.7C9C5108@mindspring.com>
index | next in thread | previous in thread | raw e-mail
Le mardi 28 mai 2002, à 03:31 PM, Terry Lambert a écrit :
> Antoine Beaupre wrote:
>> We could still make the ports system try to use libraries in
>> /usr/local/lib too by default since most third party apps have
>> dependencies on other third-party apps.
>>
>> The way I usually do it is:
>>
>> CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
>> LDFLAGS="-L${LOCALBASE}/lib" \
>> CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \
>> CXXFLAGS="-I${LOCALBASE}/include ${CXXFLAGS}"
>>
>> or something like that. I think a lot of ports have something like that
>> in there somewhere.
>
> The resulting binaries still do not work, unless LD_LIBRARY_PATH
> is set, or there is an intervening run of "ldconfig". They fail
> to find shared libraries at runtime, installed after boot but
> before link (the libraries are found at link time, just not at
> runtime).
Well right now this does work because (I think) ldconfig *is* ran by
pkg_add (or make install) when installing the port, if it contains
shared libs.
I'm not sure I agree that searching /usr/local by default is violating
PREFIX anymore, since /usr/local is usually our default prefix
(exception made of X) for ports.
The initial problem is that we have 4 PREFIXes in common installs: /,
/usr, /usr/local and /usr/X11R6. How is a port supposed to find a
dependent package in there? How can it pretend to be PREFIX-independant
when the ports depending on it can be installed in one of these 4
different PREFIXes?
/usr/local is an interesting abstraction. It allows us to distinguish
base from ports, but it's basically a hack. We have "ports" (sendmail,
openssh) in base, which blurs this line (and creates periodic threads on
various mailing lists). Ideally, we should be able to have all of our
software cleanly packaged, base would only be "software packages written
and/or maintained by FreeBSD", and would be a simple flag in the package.
Ideally, /usr/local should go away. Packages should install in /usr by
default. But the ports system would need a bigger fence around it to
expose /usr this way, IMHO.
Unfortunatly, we're stuck with /usr/local, and I think that as soon as a
port depends on another *port* its linking search path should be hacked
to include the prefix of that dependent port.
No, I don't have any patches. ;)
A.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CBBD7FE7-7278-11D6-93A2-0050E4A0BB3F>
