From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: pkg-config "Requires" fields and propagated inputs Date: Wed, 25 Mar 2015 17:56:05 +0100 Message-ID: <87y4mlrp7e.fsf@gnu.org> References: <87d2444stf.fsf@taylan.uni.cx> <87twxayuz6.fsf@gnu.org> <877fu62el9.fsf@taylan.uni.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaobF-0001WF-Q9 for guix-devel@gnu.org; Wed, 25 Mar 2015 12:56:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yaob9-0003EJ-Vp for guix-devel@gnu.org; Wed, 25 Mar 2015 12:56:13 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yaob9-0003EE-Oo for guix-devel@gnu.org; Wed, 25 Mar 2015 12:56:07 -0400 In-Reply-To: <877fu62el9.fsf@taylan.uni.cx> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Tue, 24 Mar 2015 23:52:18 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Taylan Ulrich =?utf-8?Q?=22Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer=22?= Cc: guix-devel@gnu.org taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Do you have an example of a package that uses Requires.private? > > libxrandr is a good test case. Indeed I patched it a few days ago > because some libraries in its Requires.private weren't propagated, which > fixed my issue. > >>> However, pkg-config isn't aware of compile-time/run-time dependency >>> differences; it's considered an error if a Requires.private of libfoo >>> isn't found, >> >> Really, even without --static? >> >>> because as far as pkg-config is concerned, it means libfoo is >>> dysfunctional. So we *do* need to propagate Requires.private, for the >>> sake of pkg-config. (The problem mainly manifests in the form of >>> ./configure scripts claiming libfoo isn't found when it's only libbar >>> that's missing, because in that case pkg-config returns an error to >>> the ./configure script when inquired about libfoo.) >> >> Do you have an example of that? > > I hit the issue with libxrandr while packaging mpv. It has x11 under > its Requires.private, and: [...] > So while e.g. --libs actually works, --exists reports failure, and > --print-errors explains why. > > One could say this is partially a bug, because if libxrandr statically > linked against libx11, then libx11 needn't exist at build nor run time. OK. Thanks for digging. > It might be nice to have build-only propagated inputs. On the other > hand, someone installing libxrandr in their profile will expect > pkg-config on libxrandr to work without errors. More generally, they > will expect any build operation to work; i.e. a user might want to use > Guix-installed libraries for Guix-external development, and build-only > propagated inputs would mean annoying such users because they now have > to install them manually. Unless we provide a special "install for > development" operation that is. But the complexity grows. :-) Heh. Another option would be to have per-output propagated inputs. That is, if a package has =E2=80=9Cout=E2=80=9D and =E2=80=9Clib=E2=80=9D o= utputs, you=E2=80=99d want the propagated inputs to apply only to =E2=80=9Clib=E2=80=9D since this is wher= e the .pc is. (This has been in =E2=80=98TODO=E2=80=99 for a couple of years.) Thoughts? Thanks, Ludo=E2=80=99.