From owner-svn-ports-head@FreeBSD.ORG Sun Jul 20 22:18:16 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F153DC7; Sun, 20 Jul 2014 22:18:15 +0000 (UTC) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAE4C224F; Sun, 20 Jul 2014 22:18:14 +0000 (UTC) Received: by mail-we0-f175.google.com with SMTP id t60so6766197wes.34 for ; Sun, 20 Jul 2014 15:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=k5pkZQ4j34U/VkwtvrM2iHl2Bk84tXSwc5x8mlLe53s=; b=m7uz6NmeRRbwzj4k9VyofhGieEDbk93hVHGjOynZzpxkUlJn/70EVbTSJcwv+ate9F zk2QxFVy0gald8+nqFU0IRTdiwcMWG48JEFd1IS3UVJbQ57cRlI4JpZWgqHctjXvtROm iu0n7fYrzdgGb1Bc9hrd3M7LS3w9rHhN6hWtlC/4pIW+UuYXLlbJSToARkumqb/F3ywv i1lbfSpIjLP6fdCU4S9LN/nI1mQEFMw2Ho5xbYWOa4yZumBnYeCiHzytEfNWXPT7Ylhw Sn63hNd14OMwihKlFr+hwX2TFlNg9WkegJZpXjwXwpK26mfO+UnvF5p2hQeruluBxn8S uu7Q== X-Received: by 10.180.21.235 with SMTP id y11mr26986617wie.75.1405894693017; Sun, 20 Jul 2014 15:18:13 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id a13sm32777829wjs.12.2014.07.20.15.18.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Jul 2014 15:18:11 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 21 Jul 2014 00:18:09 +0200 From: Baptiste Daroussin To: marino@freebsd.org Subject: Re: svn commit: r362304 - head/x11-toolkits/pango Message-ID: <20140720221809.GA51456@ivaldir.etoilebsd.net> References: <201407200815.s6K8FG8b003096@svn.freebsd.org> <20140720132259.156d687e@kalimero.tijl.coosemans.org> <53CBA770.2010409@marino.st> <20140720113124.GD26778@ivaldir.etoilebsd.net> <20140720165256.1f4d5d07@kalimero.tijl.coosemans.org> <53CBF2D7.4070005@marino.st> <20140720220612.GH26778@ivaldir.etoilebsd.net> <53CC3EB8.6070802@marino.st> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: <53CC3EB8.6070802@marino.st> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-ports-head@freebsd.org, kwm@FreeBSD.org, Tijl Coosemans , svn-ports-all@freebsd.org, ports-committers@freebsd.org X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2014 22:18:16 -0000 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2014 at 12:12:08AM +0200, John Marino wrote: > On 7/21/2014 00:06, Baptiste Daroussin wrote: > > On Sun, Jul 20, 2014 at 06:48:23PM +0200, John Marino wrote: > >> > >> > >> On 7/20/2014 16:52, Tijl Coosemans wrote: > >>> On Sun, 20 Jul 2014 13:31:24 +0200 Baptiste Daroussin wrote: > >>>> On Sun, Jul 20, 2014 at 01:26:40PM +0200, John Marino wrote: > >>>>> On 7/20/2014 13:22, Tijl Coosemans wrote: > >>>>>> On Sun, 20 Jul 2014 08:15:16 +0000 (UTC) John Marino wrote: > >>>>>>> Author: marino > >>>>>>> Date: Sun Jul 20 08:15:16 2014 > >>>>>>> New Revision: 362304 > >>>>>>> URL: http://svnweb.freebsd.org/changeset/ports/362304 > >>>>>>> QAT: https://qat.redports.org/buildarchive/r362304/ > >>>>>>> > >>>>>>> Log: > >>>>>>> x11-toolkits/pango: require explicit linking > >>>>>>> =20 > >>>>>>> This new configure argument will list all required libraries in= the > >>>>>>> generated pkgconf files. Before any library indirectly pulled = in, such > >>>>>>> as libm, was not listed. > >>>>>>> =20 > >>>>>>> This fixes numerous regression in dports and it's more correct = anyway. > >>>>>> > >>>>>> No, this is wrong. Each port should link to the libraries it need= s on > >>>>>> its own. No port should rely on other ports to pull in libraries = for > >>>>>> them. > >>>>> > >>>>> Then I guess we really don't need pkgconfig .pc files at all then? > >>>>> (This is the point of .pc files, it tells how to link. libm is dir= ectly > >>>>> used by pango) > >>>>> > >>>>> so no, it is not wrong. The generated pc file was wrong, now it's = not. > >>>>> This is why the configuration argument exists. > >>> > >>> A .pc file normally has 1 library in the Libs field (the library the = =2Epc > >>> file is created for) and 0 items in the Requires field. Dependencies= go > >>> in the Libs.private or Requires.private fields. The only reason to a= dd > >>> dependencies to Libs or Requires is if the headers of the library exp= ose > >>> the API of those dependencies (e.g. the library headers define macros= or > >>> inline functions that expand to calls to functions in a dependency (s= uch > >>> as Gtk macros that expand to Glib function calls)). > >>> > >>> The pango headers don't even include math.h or complex.h so they cann= ot > >>> expose its API. The generated .pc file was correct, now it is wrong. > >>> > >>> The reason the configure argument exists is probably because this is = an > >>> old .pc file from before the .private fields existed. > >> > >> Again, linking libpango without -libm is an error when explicit linking > >> is required (as has been the default on binutils for the last 3 > >> versions). The previous pc did not consider -lm, so it's wrong. > >> > >> The proof is in the pudding. When enabling the explicit linking > >> configure option, it fixed all the explict linking errors seen by ports > >> depending on pango. > >> > >> The is not the only port that sets the explicit-depends configure opti= on > >> either. > >> > >> What is the concern here? Linkers that don't require explicitly > >> specified libraries still link with those libraries through recursive > >> searching. The end result is the same, so I'm not understanding the > >> motivation for this discussion, especially since gnome@ (the maintaine= r) > >> approved the change. > >> > >> John > >> > > Checking on some linux they seems to not have the problem with -lm are = you sure > > that there is no problem with binutils on dragonfly? because checking a= t pango > > headers I cannot see why it would leaking things from libm. > >=20 >=20 > Don't bother with headers. >=20 > > readelf -d /usr/local/lib/libpango-1.0.so >=20 > libm is listed as a required shared library, plain as day. > for non-explicit linking the linker will pick all those up. For > explicit linking, they have to be passed to the linker. Anything linking to libpango will not have to link with libm because of tha= t, that just mean that libpango itself needs to load the libm.so when being lo= aded final binary linking to libpango only needs explicit link to libm only if p= ango headers make the binary to use directly libm symbols which is not the case = here. regards, Bapt --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlPMQCEACgkQ8kTtMUmk6EzGmACgqnG0L0gzKZymCJBL8Co9ujEv 4cgAnR0HjpaSneLYjmDHFU32k4v5tRlh =MzZJ -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o--