Date: Mon, 13 Apr 2015 16:11:41 +0000 From: Brooks Davis <brooks@freebsd.org> To: Baptiste Daroussin <bapt@FreeBSD.org> Cc: arch@FreeBSD.org Subject: Re: RFC: Alternative to PRIVATELIB Message-ID: <20150413161141.GA61857@spindle.one-eyed-alien.net> In-Reply-To: <20150411151412.GF65320@ivaldir.etoilebsd.net> References: <20150411142835.GE65320@ivaldir.etoilebsd.net> <20150411151412.GF65320@ivaldir.etoilebsd.net>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Sat, Apr 11, 2015 at 05:14:12PM +0200, Baptiste Daroussin wrote:
> On Sat, Apr 11, 2015 at 04:28:35PM +0200, Baptiste Daroussin wrote:
> > Hi,
> >
> > I would like to propose to replace PRIVATELIB with something more convenient.
> >
> > First what is PRIVATELIB is trying to solve:
> > We are maintaining stable ABI over branches but some third parties sources
> > are not really good at maintaining stable ABI, so we do hide them into private
> > where nothing can use it. We do not provide headers for that and we add rpath to
> > every binaries that needs to link to those.
> >
> > What is the issues of PRIVATELIB:
> > any application linking to a library from base (a regular one) that does itself
> > links to a PRIVATELIB cannot anymore statically link to the said application.
> >
> > The is no mechanism to handle PRIVATELIBS in compat*x ports which can be a
> > problem if one of our regular lib is linked to a privatelib and ends up into
> > compat one day.
> >
> > It prevents easy linking for 3rd party application using those privatelibs on
> > purpose (aka with the knowledge abi can break) like libbsdstat.
> >
> > What I would like to propose is the following:
> >
> > Create in bsd.lib.mk support for PRIVATE knobs (what ever name you do prefer)
> >
> > It will just prefix the name of the library with "private" but install it in the
> > regular place
> >
> > It will automatically decide to install the headers into /usr/include/private/${LIB}/
> > Each private library headers in a custom place to avoid an application that
> > deliberatly use a given privatelib to find another one
> >
> > Prefix all manpage with private_ so that we can provide the documentation for
> > the said libs for the version we ship but if another version is shipped by ports
> > then we can easily access both documentation.
> >
> > As a result bsd.lib.mk will be simpler, we could again static link against
> > everything we ship in base, we can provide documentation for those libs and we
> > can easily isolate them anyway from the ports.
> >
> > I plan to start working on this in a week.
>
> This patch shows an example with libucl:
> https://people.freebsd.org/~bapt/private.diff
This seems good to me.
-- Brooks
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlUr6rsACgkQXY6L6fI4GtShFgCdE+OA9dsweQwoy2PpVbl4i1Pl
pjEAoIpvxyAywZsl5f5+dRMWEt29YJYK
=hZcd
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150413161141.GA61857>
