Welcome! If this is your first visit, be sure to check out the FAQ. You will have to register before you can post in the forums. (Be aware the forums do not accept user names with a dash "-") Also, logging in lets you avoid the CAPTCHA verification when searching . Select Articles, Forum, or Blog. Posting in the Forums implies acceptance of the Terms and Conditions.

pkgconfig and gtk+ issue

Hello,

I'm trying to compile kernelshark on a openSUSE 11.4 (64 bit) machine.
The problem is explained best in the shell:

trace-cmd> make gui
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
...
trace-cmd> ls /usr/lib64/pkgconfig/gtk*
/usr/lib64/pkgconfig/gtk+-2.0.pc /usr/lib64/pkgconfig/gtkmm-2.4.pc /usr/lib64/pkgconfig/gtk+-x11-2.0.pc
/usr/lib64/pkgconfig/gtk-engines-2.pc /usr/lib64/pkgconfig/gtk+-unix-print-2.0.pc

trace-cmd> setenv PKG_CONFIG_PATH /usr/lib64/pkgconfig
trace-cmd> make gui
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
...
trace-cmd> rpm -q libgtk-2_0-0 gtk2-devel
libgtk-2_0-0-2.22.1-13.15.1.x86_64
gtk2-devel-2.22.1-13.15.1.x86_64

Re: pkgconfig and gtk+ issue

This is what the "setenv" command was for. Is the environment being ignored?

And, why is it necessary in the first place? I would have expected pkgconfig to have that directory already. /usr/lib64/pkgconfig seems to be the place where all the .pc files reside, so why doesn't it look there first?

Re: pkgconfig and gtk+ issue

Am 19.04.2012 13:16, schrieb AKS42:
> No gtk in there...
>
That is strange you have the gtk2-devel and if I am not mislead this is
the one which installs the correct pc file, so it should list gtk-2.0
here (it does it for me both on 11.4 and 12.1).

Another question, why did you use

Code:

setenv PKG_CONFIG_PATH /usr/lib64/pkgconfig

are you not using the bash shell? If not what else, because it is a
c-shell command.

Re: pkgconfig and gtk+ issue

Am 19.04.2012 13:46, schrieb AKS42:
> Yes, I'm a tcsh user.
Just to narrow down the problem, can you try the make command from a
bash to see if there is the same problem or not?

What command is exactly executed in the makefile which does throw this
error message?
>
> Should I try reinstalling the gtk packages to trigger some
> pre/postinstall scripts (if there are any)?
Difficult to say, since it does not do any harm I would just try it.
> Or is there a way to tell pkg-config to rescan the .pc files?
>
That I do not know I cannot see an option for that.

But this failure in line 460 is certainly caused due to the pkg-config problem. If gtk+ devel is not found, the include path is not available and then such an error is the consequence. So line 460 is the symptom, not the root cause.

Originally Posted by martin_helm

> Should I try reinstalling the gtk packages to trigger some
> pre/postinstall scripts (if there are any)?
Difficult to say, since it does not do any harm I would just try it.

This did not help. I even tried reinstalling pkg-config itself.

Where is PKG_CONFIG_PATH defined in the system? If I grep for that variable, there are no hits in /etc.
Perhaps there is a mistake in the pkg-config configuration...