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>
next in thread | previous in thread | raw e-mail | index | archive | help
Le mardi 28 mai 2002, =E0 03:31 PM, Terry Lambert a =E9crit : > 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+=3D CPPFLAGS=3D"-I${LOCALBASE}/include" \ >> LDFLAGS=3D"-L${LOCALBASE}/lib" \ >> CFLAGS=3D"-I${LOCALBASE}/include ${CFLAGS}" \ >> CXXFLAGS=3D"-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=20 pkg_add (or make install) when installing the port, if it contains=20 shared libs. I'm not sure I agree that searching /usr/local by default is violating=20= PREFIX anymore, since /usr/local is usually our default prefix=20 (exception made of X) for ports. The initial problem is that we have 4 PREFIXes in common installs: /,=20 /usr, /usr/local and /usr/X11R6. How is a port supposed to find a=20 dependent package in there? How can it pretend to be PREFIX-independant=20= when the ports depending on it can be installed in one of these 4=20 different PREFIXes? /usr/local is an interesting abstraction. It allows us to distinguish=20 base from ports, but it's basically a hack. We have "ports" (sendmail,=20= openssh) in base, which blurs this line (and creates periodic threads on=20= various mailing lists). Ideally, we should be able to have all of our=20 software cleanly packaged, base would only be "software packages written=20= 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=20= default. But the ports system would need a bigger fence around it to=20 expose /usr this way, IMHO. Unfortunatly, we're stuck with /usr/local, and I think that as soon as a=20= port depends on another *port* its linking search path should be hacked=20= 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CBBD7FE7-7278-11D6-93A2-0050E4A0BB3F>