From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E58861382C5 for ; Wed, 6 Jan 2021 22:47:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6DD90E0953; Wed, 6 Jan 2021 22:47:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2EDE5E0930 for ; Wed, 6 Jan 2021 22:47:35 +0000 (UTC) Date: Wed, 6 Jan 2021 22:47:11 +0000 From: James Le Cuirot To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] systemd.eclass: remove SYSROOT from pkg-config output Message-ID: <20210106224711.70b8b8e5@symphony.aura-online.co.uk> In-Reply-To: References: <20210103010904.1158863-1-floppym@gentoo.org> <20210103125208.0694a788@symphony.aura-online.co.uk> <20210104231826.3781d650@symphony.aura-online.co.uk> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/LsDZZCdn37EUifAPqu.jNrK"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Archives-Salt: 9e4a45a1-bbf5-4af5-94ac-cc92f7de4815 X-Archives-Hash: c2eef0463abfa68a9ca6ea610a26cdaf --Sig_/LsDZZCdn37EUifAPqu.jNrK Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 4 Jan 2021 19:28:37 -0500 Mike Gilbert wrote: > On Mon, Jan 4, 2021 at 6:45 PM Mike Gilbert wrote: > > > > On Mon, Jan 4, 2021 at 6:18 PM James Le Cuirot wrote= : =20 > > > $ PKG_CONFIG_SYSROOT_DIR=3D/foo pkg-config --variable=3Dudevdir udev > > > /lib/udev > > > > > > The udevdir variable is not affected by PKG_CONFIG_SYSROOT_DIR at all. > > > And why would it be? The man page says that this variable is only > > > applied to -I and -L flags. I don't know for sure but I suspect that > > > pkg-config just sees this as some arbitrary variable with no special > > > path handling at all. I wonder what led you to think that this fix was > > > necessary? =20 > > > > Interesting! > > > > pkg-config behaves differently on my system: > > > > % PKG_CONFIG_SYSROOT_DIR=3D/foo pkg-config --variable=3Dudevdir udev > > /foo/lib/udev > > > > This appears to be a difference in behavior between dev-util/pkgconfig > > and dev-util/pkgconf. I am using pkgconf, and I would guess you are > > using pkgconfig. > > > > I guess I will ask pkgconf upstream for help on this; it seems like > > this is probably an unintended behavior. =20 >=20 > It seems that the pkgconf behavior is intentional. >=20 > https://github.com/pkgconf/pkgconf/issues/69 >=20 > I opened an issue to see if we can get some kind of opt-out. >=20 > https://github.com/pkgconf/pkgconf/issues/205 Hmmm. At this point, I'm thinking maybe we should just address this in cross-pkg-config. It seems unfair to ask upstream to accommodate this when the tool is just doing what we asked it to. Perhaps it could respect PKG_CONFIG_SYSROOT_DIR if it is already set, even when empty. It wouldn't allow to you set this differently for the build host but you shouldn't ever have to. I think I'd prefer this over adding yet another confusing variable. The same could be applied to PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSTEM_LIBRARY_PATH for consistency. What do you think? On a side note, I think that what cross-pkg-config does should be part of Portage or something rather than part of crossdev because there's nothing really cross-compile-specific about it. You can set SYSROOT when building natively, although that tends to run into even more issues than you get with cross. --=20 James Le Cuirot (chewi) Gentoo Linux Developer --Sig_/LsDZZCdn37EUifAPqu.jNrK Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPxcZ3tkwcedKm2a8EiZBXQDdMTcFAl/2Pe8ACgkQEiZBXQDd MTfbCw/+L4TEhIYSbwJZWEkdswBHJBhQJ/Tm3bK81N4lC2vs8x5+P/N1DSzUpV+h kqtb9geA1Z2JD+mgdwewulJqKZrBiMzufAgpEiqsmW7G74VYascH50RD5mEyvNb+ 8QENZMvlLmfo8U793hsdItDBZqDPWSj7dENv6rRIgwaMJ/z/XdOwgygnhOTeqWt5 wnZmJrdKUO9S9u8JLZLXKC0eyrhRJSDYc8WbUx0W5NIPMhHy1dKwqAheqye2Kd/i +RljywhyEs/5faedz85SlKlcWT3434U9eelY5cjugHGvI00Uthjlgab91lrYKlcj jvV+MePu6+Q2kZBk8mIf4ZPr35qlPlxv3b+jlrE+RKZwzztWwWUrrHZzZGB4ugjH 6mAnfSA6g0GY6WE4CX/C/2skhaV0vJDJbH6+bCIWexYqA5rASEYF5wSwstboEgPF wQZ1VubVR7MQvVdbBJx8huUAMndyY9fvMVxvSntnKkVmaFGpyrDA1tZ8a7dk4fDP CLAe6uG57DxxNlKGfjO4UVXQThhIhkXl2dklNEys8IVg7h5sP4vV4M3/k3Wd7an4 SY96uSvfb1cdYcpqeejxZADOIE8yLBqMRcOKQqeJd+eUXwWpksnYcjiHGnkYHOzD 23jhL7PG0KljA+VsYVwNrAvy56mfARbiY4WVfN9V9wps/MLUtdQ= =DPjG -----END PGP SIGNATURE----- --Sig_/LsDZZCdn37EUifAPqu.jNrK--