guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect guile pkg-config --libs and --cflags


From: Daniel Hartwig
Subject: Re: Incorrect guile pkg-config --libs and --cflags
Date: Mon, 15 Apr 2013 19:58:34 +0800

On 15 April 2013 16:26, Jan Synacek <address@hidden> 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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]