From owner-freebsd-arch@FreeBSD.ORG Sat Apr 11 15:14:23 2015 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A694842E for ; Sat, 11 Apr 2015 15:14:23 +0000 (UTC) Received: from mail-vn0-x22f.google.com (mail-vn0-x22f.google.com [IPv6:2607:f8b0:400c:c0f::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 562CFF27 for ; Sat, 11 Apr 2015 15:14:23 +0000 (UTC) Received: by vnbg7 with SMTP id g7so11643480vnb.10 for ; Sat, 11 Apr 2015 08:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=2jOdJsyhoz2Rn9A68K4HXkU4Aovg/Yy+uhg5S9UYLTI=; b=dPa/5f3XAwewN2AMpLdq19C2p7bMCzNVSQvQHpq//SbB0sPMlb9Pk+NfcLe78RDrWO vxUJSPGpC/+nBHxyiRwEC3wgGLtFN1HynEkPn0gl4ImB3BVqrpJTAafuJoH9I/GK2Dkk UXadsb5H/2nHTIsM13DMJ/vbeeb0wmc2A8Weshu73tdWsKY3zINpv/BFWQk64kLo+iYs tH+avaEhEEz7Lh7PFAKar2vp94tTMVzkqQsWPL4DFaWNWH67oBjw4tP+hgaf3GO33fHc Xm8/bi4eRPBK0vTzpj6Sme72mVClnqaZriog/8EIRoSbTD2Aml0eONQRXzgen48uz3wY V9NQ== X-Received: by 10.52.99.226 with SMTP id et2mr7338470vdb.14.1428765262454; Sat, 11 Apr 2015 08:14:22 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id s2sm392329vdh.8.2015.04.11.08.14.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Apr 2015 08:14:16 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 11 Apr 2015 17:14:12 +0200 From: Baptiste Daroussin To: arch@FreeBSD.org Subject: Re: RFC: Alternative to PRIVATELIB Message-ID: <20150411151412.GF65320@ivaldir.etoilebsd.net> References: <20150411142835.GE65320@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xaMk4Io5JJdpkLEb" Content-Disposition: inline In-Reply-To: <20150411142835.GE65320@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Sat, 11 Apr 2015 15:14:23 -0000 --xaMk4Io5JJdpkLEb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 conveni= ent. >=20 > 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 pr= ivate > where nothing can use it. We do not provide headers for that and we add r= path 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 does = itself > links to a PRIVATELIB cannot anymore statically link to the said applicat= ion. >=20 > 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 i= nto > compat one day. >=20 > It prevents easy linking for 3rd party application using those privatelib= s 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 pre= fer) >=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/pri= vate/${LIB}/ > Each private library headers in a custom place to avoid an application th= at > deliberatly use a given privatelib to find another one >=20 > 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 b= y ports > then we can easily access both documentation. >=20 > 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 a= nd we > can easily isolate them anyway from the ports. >=20 > I plan to start working on this in a week. >=20 > Best regards, > Bapt This patch shows an example with libucl: https://people.freebsd.org/~bapt/private.diff Best regards, Bapt --xaMk4Io5JJdpkLEb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUpOkQACgkQ8kTtMUmk6Exm3QCfayHKSrr5Xmv9SQJP/ev1Kalx s4IAoJSZ6j1IOLDJrnTt7fsueC2tE6cp =ahkd -----END PGP SIGNATURE----- --xaMk4Io5JJdpkLEb--