# faulty pkg-config --variable breaks gobject-introspection port



## yapphdorlw (Jul 30, 2012)

Hello World,
I recently made a new *FreeBSD* installation on my notebook. Unfortunately I am unable to compile the _xorg_ server due to an error in devel/gobject-introspection.
I receive this Error when trying to compile it:

```
#make install
===>  Building for gobject-introspection-0.10.8_2
gmake  all-recursive
gmake[1]: Entering directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.10.8'
Making all in .
gmake[2]: Entering directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.10.8'
gmake[2]: *** Keine Regel vorhanden, um das Target [U]Â»/usr/local/include/usr/local/include/usr/local/include/usr/local/include/gio-unix-2.0/gio/*.hÂ«[/U],
  benÃ¶tigt von Â»Gio-2.0.girÂ«, zu erstellen.  Schluss.
gmake[2]: Leaving directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.10.8'
gmake[1]: *** [all-recursive] Fehler 1
gmake[1]: Leaving directory `/usr/ports/devel/gobject-introspection/work/gobject-introspection-0.10.8'
gmake: *** [all] Fehler 2
*** Error code 1

Stop in /usr/ports/devel/gobject-introspection.
```

I guess that the problem is this:
[CMD=]Target Â»/usr/local/include/usr/local/include/usr/local/include/usr/local/include/gio-unix-2.0/gio/*.hÂ«,[/CMD]
After reading various files I found in /usr/ports/devel/gobject-introspection/work/gobject-introspection-0.10.8/Makefile
[CMD=]GIO_UNIX_HDRS = $(shell pkg-config --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h[/CMD]
`$ pkg-config --variable=includedir gio-unix-2.0
/usr/local/include/usr/local/include/usr/local/include/usr/local/include`
So obviously this variable has a wrong value. But I have no idea _why and how_ I could possibly change it because I do not understand what I found by using google and due to this:
`$ man pkg-config
No manual entry for pkg-config`


Some additional information
[CMD=]$FreeBSD: ports/devel/gobject-introspection/Makefile,v 1.20 2012/03/19 13:36:06 kwm Exp $[/CMD]
`$ uname -a
FreeBSD MyStdIO 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012     [email]root@amd64-builder.daemonology.net[/email]:/usr/obj/usr/src/sys/GENERIC  amd64`

I hope someone could help me with fixing this problem.
Thanks in advance,
Yapph Dorlw


----------



## yapphdorlw (Jul 30, 2012)

I guess I just figured the problem out.

For those who are interested:
Neiter gobject nor a wrong configuration file is the problem. It was devel/pkgconf that had a bug (until recently, 3h ago).

The configuration file had the correct setting /usr/local/include. But the bug made pkg-config to repeat this string multiple times. This of course gives me an invalid path.

Some interesting lecture: Guide to pkg-config
The pkgconfig configuration files are stored in /usr/local/libdata/pkgconfig
The command _pkg-config --variable=<name> <lib>_ opens the file _<lib>.pc_ and returns the value of _<name>_ (if exsisting).

I was able to compile devel/gobject-introspection and hopefully I will have a working xserver soon.


----------



## yapphdorlw (Jul 31, 2012)

Everything works as expected now.
Since I am unable to edit my post: Could an admin/moderator please mark this thread solved?


----------



## DeepInside (Aug 5, 2012)

Yeah, but how do you fixed that bug? I cant install neither devel/gobject-introspection nor devel/glib20 :/


----------



## yapphdorlw (Aug 14, 2012)

I solved it by updating the portstree with `# portsnap fetch update` and then recompiling devel/pkgconf.
Hopefully this will solve your problem.


----------

