From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: guile-2.0.pc misses a few dependency libraries Date: Mon, 30 Jan 2012 12:02:29 -0500 Message-ID: <871uqhi0nu.fsf@netris.org> References: <83mx98xedm.fsf@gnu.org> <87mx96m703.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327943034 14650 80.91.229.3 (30 Jan 2012 17:03:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2012 17:03:54 +0000 (UTC) Cc: guile-user@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jan 30 18:03:52 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rrudz-0003dZ-5t for guile-user@m.gmane.org; Mon, 30 Jan 2012 18:03:51 +0100 Original-Received: from localhost ([::1]:54092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrudv-0001zr-EK for guile-user@m.gmane.org; Mon, 30 Jan 2012 12:03:47 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:41001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrudm-0001zK-VB for guile-user@gnu.org; Mon, 30 Jan 2012 12:03:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rrudl-0005Uw-NO for guile-user@gnu.org; Mon, 30 Jan 2012 12:03:38 -0500 Original-Received: from world.peace.net ([96.39.62.75]:49592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrudl-0005UO-Kv; Mon, 30 Jan 2012 12:03:37 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Rrudf-0008G7-RH; Mon, 30 Jan 2012 12:03:32 -0500 In-Reply-To: <87mx96m703.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 30 Jan 2012 00:19:40 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9219 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Eli Zaretskii skribis: > >> When statically linking programs against libguile-2.0.a, I get >> unresolved externals. This is on MS-Windows, but I don't think this >> is related to the problem. >> >> I finally traced that to the contents of guile-2.0.pc file: >> >> Libs: -L${libdir} -lguile-2.0 -Ld:/usr/lib -lgc=20=20 >> Libs.private: d:/usr/lib/libgmp.dll.a -Ld:/usr/lib >> d:/usr/lib/libltdl.dll.a -Ld:/usr/lib -lffi -lregex -lcrypt -lws2_32 >> -lm >> >> However, libguile-2.0.la shows more dependency libraries: >> >> dependency_libs=3D' -lgc -lffi -lunistring -liconv -lregex -lintl >> -liconv -lgmp -ltdl -lregex -lintl -lwsock32 -lole32 -luuid >> -lmsvcp60 -lcrypt -lws2_32' >> >> As you see, quite a few libraries are missing from guile-2.0.pc, and >> also a several libraries need to appear more than once in the link >> command line. > > Commit 58f86505d658359508732c8f187bc37d010074d0 (see below) should solve > most of that, but not all, since I don=E2=80=99t know where -lole32, and = -lregex > come from, for example. It seems to me that adding a fixed list of indirect dependencies to guile-2.0.pc.in is the wrong approach, because the indirect dependencies may depend on the platform, as well as the specific versions/variants of any of the direct or indirect dependencies. How do other programs that use 'pkg-config' deal with this issue? Are they all broken in this way? If we really need the full list of indirect dependencies, maybe we should somehow extract it from the generated .la file? Thanks, Mark > commit 58f86505d658359508732c8f187bc37d010074d0 (HEAD, refs/remotes/origi= n/stable-2.0, refs/heads/stable-2.0) > Author: Ludovic Court=C3=A8s > Date: Mon Jan 30 00:17:34 2012 +0100 > > Augment `Libs.private' with for non-GNU platforms. >=20=20=20=20=20 > Reported by Eli Zaretskii . >=20=20=20=20=20 > * meta/guile-2.0.pc.in (Libs.private): Add all the optional libraries > that may be pulled via Gnulib on non-GNU platforms. > > Modified meta/guile-2.0.pc.in > diff --git a/meta/guile-2.0.pc.in b/meta/guile-2.0.pc.in > index ecca778..1bda734 100644 > --- a/meta/guile-2.0.pc.in > +++ b/meta/guile-2.0.pc.in > @@ -15,5 +15,8 @@ Name: GNU Guile > Description: GNU's Ubiquitous Intelligent Language for Extension > Version: @GUILE_VERSION@ > Libs: -L${libdir} -lguile-@GUILE_EFFECTIVE_VERSION@ @BDW_GC_LIBS@ > -Libs.private: @LIB_CLOCK_GETTIME@ @LIBGMP@ @LIBLTDL@ @LIBFFI_LIBS@ @GUIL= E_LIBS@ > +Libs.private: @LIB_CLOCK_GETTIME@ @LIBGMP@ @LIBLTDL@ @LIBFFI_LIBS@ \ > + @LIBUNISTRING@ @GUILE_LIBS@ @LIBICONV@ @LIBINTL@ @LIBSOCKET@ \ > + @SERVENT_LIB@ @HOSTENT_LIB@ @GETADDRINFO_LIB@ @INET_NTOP_LIB@ \ > + @INET_PTON_LIB@ > Cflags: -I${pkgincludedir}/@GUILE_EFFECTIVE_VERSION@ @GUILE_CFLAGS@ @BDW= _GC_CFLAGS@