From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.devel Subject: Re: Incorrect guile pkg-config --libs and --cflags Date: Mon, 15 Apr 2013 19:58:34 +0800 Message-ID: References: <516BB9A4.8080708@redhat.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1366027119 31161 80.91.229.3 (15 Apr 2013 11:58:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Apr 2013 11:58:39 +0000 (UTC) Cc: guile-devel@gnu.org To: Jan Synacek Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 15 13:58:41 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1URi3V-0004Z6-Os for guile-devel@m.gmane.org; Mon, 15 Apr 2013 13:58:41 +0200 Original-Received: from localhost ([::1]:48688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URi3V-0003wE-ES for guile-devel@m.gmane.org; Mon, 15 Apr 2013 07:58:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URi3S-0003w9-5w for guile-devel@gnu.org; Mon, 15 Apr 2013 07:58:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URi3P-0003Xn-ML for guile-devel@gnu.org; Mon, 15 Apr 2013 07:58:38 -0400 Original-Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]:44501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URi3P-0003XU-HB for guile-devel@gnu.org; Mon, 15 Apr 2013 07:58:35 -0400 Original-Received: by mail-ie0-f173.google.com with SMTP id k13so2649596iea.4 for ; Mon, 15 Apr 2013 04:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Ul07yzecw9hFGyJKs4ilHbkxBrowmmPQJZb6vzofWTI=; b=XafUk2G8Nll9DjGXiNQBEobZ0OthlJqYiAWNmotZyZwvDCxXzUt2NWTh+548rngDwi QKZjsOgqDkacETKA6MoRxGklNA2v6+UkafMPoETxMp2RCw1holE3TWgPo3Z91Rh22Aa4 yPZ7PfHLYTSFQq5jIyo1h5rWHoUTFUHrSwr2ysM07qxrDanlu7AryXvk/PghqfXhHYEF syrbEbuc3w/m4aXTreSyHMrjonZCweKRp6NB7lCGeeZkDOuYeMVnQS+ERS/HxOr6wY4B HLHVgN/tIev2GUai/VVx6MNCMY0RcWzynZHMDC8BTfd8Xjgd2lYvRAEGMjU2n6JvvWjy FjSQ== X-Received: by 10.50.195.134 with SMTP id ie6mr4968998igc.6.1366027114354; Mon, 15 Apr 2013 04:58:34 -0700 (PDT) Original-Received: by 10.64.26.168 with HTTP; Mon, 15 Apr 2013 04:58:34 -0700 (PDT) In-Reply-To: <516BB9A4.8080708@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::22d X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16247 Archived-At: On 15 April 2013 16:26, Jan Synacek wrote: > Hello list, > > This part of guile-2.0.pc is quite confusing and I think it's wrong: > > ... > Libs: -L${libdir} -lguile-2.0 -lgc > ... > Cflags: -I${pkgincludedir}/2.0 -pthread > > Shouldn't the '-pthread' be in Libs, instead of Cflags? -pthread is for the preprocessor and linker, so it is appropriate in CFLAGS. It is not required in LIBS due to libguile-2.0 already linked against libpthread. > Compilation can fail > when relying on pkg-config [1] (the bug mentions guile-1.8, but it's the same > with the latest stable guile). > Have never seen this to be a problem (debian sid), even using exact same arguments as in [1]: $ pkg-config --cflags guile-2.0 -pthread -I/usr/local/include/guile/2.0 $ pkg-config --libs guile-2.0 -L/usr/local/lib -lguile-2.0 -lgc $ ldd /usr/local/lib/libguile-2.0.so | grep pthread libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7372000) $ gcc -std=c11 -O3 -g -c -Wall test.c -o test.o $(pkg-config --cflags guile-2.0) $ gcc -std=c11 -O3 -g -Wall test.o -o test $(pkg-config --libs guile-2.0) $ gcc --version | sed 1q gcc (Debian 4.7.2-5) 4.7.2 $ ld --version | sed 1q GNU ld (GNU Binutils for Debian) 2.22 Something related to this error perhaps (never seen it): /lib64/libpthread.so.0: could not read symbols: Invalid operation or peculiar to the linker, libguile on your system, other?