pkg-config --cflags glib-2.0 gives wrong -I dir
Dan Nelson
dnelson at allantgroup.com
Sun Jun 26 00:46:11 UTC 2011
In the last episode (Jun 25), Matthias Apitz said:
> Why gives
>
> $ pkg-config --cflags glib-2.0
> -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
>
> $ ls -ld /usr/local/include/glib-2.0 /usr/local/lib/glib-2.0/include
> ls: /usr/local/lib/glib-2.0/include: No such file or directory
> drwxr-xr-x 5 root wheel 512 May 28 19:01 /usr/local/include/glib-2.0
>
> a non existing -I directory? This concrete example is with a 9-CURRENT
> and glib-2.0 from the ports as glib-2.26.1_1, but I see this as well in
> some older 8.x systems;
Checking Solaris and SUSE Linux, I see a similar pair of directories:
solaris$ pkg-config --cflags glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
linux$ pkg-config --cflags glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
The /usr/lib* directory on each system contains a single file: glibconfig.h.
On FreeBSD, this file is in /usr/local/include/glib-2.0/ along with all the
other headers (headers don't belong in /lib/ anyway).
Try putting the attached patch into the files directory of the glib20 port.
--
Dan Nelson
dnelson at allantgroup.com
-------------- next part --------------
No headers are installed into ${libdir}/glib-2.0/include, so remove it from
CFLAGS
--- glib-2.26.1/glib-2.0.pc.in 2009-03-31 18:04:20.000000000 -0500
+++ glib-2.26.1/glib-2.0.pc.in 2011-06-25 19:14:23.580424986 -0500
@@ -12,4 +12,4 @@
Version: @VERSION@
Libs: -L${libdir} -lglib-2.0 @INTLLIBS@
Libs.private: @ICONV_LIBS@
-Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include @GLIB_EXTRA_CFLAGS@
+Cflags: -I${includedir}/glib-2.0 @GLIB_EXTRA_CFLAGS@
More information about the freebsd-questions
mailing list