From owner-freebsd-arch@FreeBSD.ORG Mon Apr 13 16:11:48 2015 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A28C44AB; Mon, 13 Apr 2015 16:11:48 +0000 (UTC) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0B9FCD; Mon, 13 Apr 2015 16:11:48 +0000 (UTC) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id CB0855A9F27; Mon, 13 Apr 2015 16:11:41 +0000 (UTC) Date: Mon, 13 Apr 2015 16:11:41 +0000 From: Brooks Davis To: Baptiste Daroussin Subject: Re: RFC: Alternative to PRIVATELIB Message-ID: <20150413161141.GA61857@spindle.one-eyed-alien.net> References: <20150411142835.GE65320@ivaldir.etoilebsd.net> <20150411151412.GF65320@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <20150411151412.GF65320@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2015 16:11:48 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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, > >=20 > > I would like to propose to replace PRIVATELIB with something more conve= nient. > >=20 > > First what is PRIVATELIB is trying to solve: > > We are maintaining stable ABI over branches but some third parties sour= ces > > 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. > >=20 > > What is the issues of PRIVATELIB: > > any application linking to a library from base (a regular one) that doe= s itself > > links to a PRIVATELIB cannot anymore statically link to the said applic= ation. > >=20 > > The is no mechanism to handle PRIVATELIBS in compat*x ports which can b= e a > > problem if one of our regular lib is linked to a privatelib and ends up= into > > compat one day. > >=20 > > It prevents easy linking for 3rd party application using those privatel= ibs on > > purpose (aka with the knowledge abi can break) like libbsdstat. > >=20 > > What I would like to propose is the following: > >=20 > > Create in bsd.lib.mk support for PRIVATE knobs (what ever name you do p= refer) > >=20 > > It will just prefix the name of the library with "private" but install = it in the > > regular place > >=20 > > It will automatically decide to install the headers into /usr/include/p= rivate/${LIB}/ > > Each private library headers in a custom place to avoid an application = that > > deliberatly use a given privatelib to find another one > >=20 > > Prefix all manpage with private_ so that we can provide the documentati= on for > > the said libs for the version we ship but if another version is shipped= by ports > > then we can easily access both documentation. > >=20 > > As a result bsd.lib.mk will be simpler, we could again static link agai= nst > > everything we ship in base, we can provide documentation for those libs= and we > > can easily isolate them anyway from the ports. > >=20 > > I plan to start working on this in a week. >=20 > This patch shows an example with libucl: > https://people.freebsd.org/~bapt/private.diff This seems good to me. -- Brooks --/04w6evG8XlLl3ft Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUr6rsACgkQXY6L6fI4GtShFgCdE+OA9dsweQwoy2PpVbl4i1Pl pjEAoIpvxyAywZsl5f5+dRMWEt29YJYK =hZcd -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--