Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: pkgconfig and gtk+ issue

  1. #1

    Default 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


    Why doesn't pkgconfig find the library? What am I missing here?

    Andreas

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: pkgconfig and gtk+ issue

    On 2012-04-19 10:26, AKS42 wrote:

    > Why doesn't pkgconfig find the library? What am I missing here?


    Dunno, but:

    > Perhaps you should add the directory containing `gtk+-2.0.pc'


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  3. #3

    Default Re: pkgconfig and gtk+ issue

    Thanks for your reply!

    Quote Originally Posted by robin_listas View Post
    On 2012-04-19 10:26, AKS42 wrote:
    Dunno, but:

    > Perhaps you should add the directory containing `gtk+-2.0.pc'
    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?

  4. #4
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: pkgconfig and gtk+ issue

    Can you list the module with pkg-config --list-all?
    Like this example
    Code:
    martinh@ganymed:~> pkg-config --list-all | grep gtk
    gtk+-2.0                       GTK+ - GTK+ Graphical UI Library (x11 target)
    gtk-sharp-2.0                  Gtk - Gtk
    gtk+-unix-print-2.0            GTK+ - GTK+ Unix print support
    gtk+-x11-2.0                   GTK+ - GTK+ Graphical UI Library (x11 target)
    gtk-dotnet-2.0                 Gtk.DotNet - .NET Extensions for Gtk

    --
    PC: oS 11.4 x86_64 | Intel Core i7-2600@3.40GHz | 16GB | KDE 4.8.2 |
    GeForce GT 420
    Eee PC 1201n: oS 12.1 x86_64 | Intel Atom 330@1.60GHz | 3GB | KDE 4.8.2
    | nVidia ION
    eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10 |
    xf86-video-geode

  5. #5

    Default Re: pkgconfig and gtk+ issue

    Quote Originally Posted by martin_helm View Post
    Can you list the module with pkg-config --list-all?
    Code:
    trace-cmd> pkg-config --list-all 
    libssl                OpenSSL - Secure Sockets Layer and cryptography libraries
    gmodule-export-2.0    GModule - Dynamic module loader for GLib
    libpcre               libpcre - PCRE - Perl compatible regular expressions C library with 8 bit character support
    libdaemon             libdaemon - a lightweight C library that eases the writing of UNIX daemons
    libpcrecpp            libpcrecpp - PCRECPP - C++ wrapper for PCRE
    gmodule-2.0           GModule - Dynamic module loader for GLib
    gio-unix-2.0          GIO unix specific APIs - unix specific headers for glib I/O library
    openssl               OpenSSL - Secure Sockets Layer and cryptography libraries and tools
    usbutils              usbutils - USB device database
    libffi                libffi - Library supporting Foreign Function Interfaces
    glib-2.0              GLib - C Utility Library
    zlib                  zlib - zlib compression library
    libpcreposix          libpcreposix - PCREPosix - Posix compatible interface to libpcre
    gthread-2.0           GThread - Thread support for GLib
    gobject-2.0           GObject - GLib Type, Object, Parameter and Signal Library
    uuid                  uuid - Universally unique id library
    gmodule-no-export-2.0 GModule - Dynamic module loader for GLib
    libcrypto             OpenSSL-libcrypto - OpenSSL cryptography library
    gio-2.0               GIO - glib I/O library
    libcurl               libcurl - Library to transfer files with ftp, http, etc.
    libusb                libusb - USB access library
    libusb-1.0            libusb-1.0 - C API for USB device access from Linux userspace
    blkid                 blkid - Block device id library
    mount                 mount - mount library
    No gtk in there...

  6. #6
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default 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.

    --
    PC: oS 11.4 x86_64 | Intel Core i7-2600@3.40GHz | 16GB | KDE 4.8.2 |
    GeForce GT 420
    Eee PC 1201n: oS 12.1 x86_64 | Intel Atom 330@1.60GHz | 3GB | KDE 4.8.2
    | nVidia ION
    eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10 |
    xf86-video-geode

  7. #7

    Default Re: pkgconfig and gtk+ issue

    Thank you for your answers!

    Quote Originally Posted by martin_helm View Post
    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.
    Yes, I'm a tcsh user.

    Should I try reinstalling the gtk packages to trigger some pre/postinstall scripts (if there are any)?
    Or is there a way to tell pkg-config to rescan the .pc files?

  8. #8
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default 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.


    --
    PC: oS 11.4 x86_64 | Intel Core i7-2600@3.40GHz | 16GB | KDE 4.8.2 |
    GeForce GT 420
    Eee PC 1201n: oS 12.1 x86_64 | Intel Atom 330@1.60GHz | 3GB | KDE 4.8.2
    | nVidia ION
    eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10 |
    xf86-video-geode

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: pkgconfig and gtk+ issue

    On 2012-04-19 13:46, AKS42 wrote:

    > Yes, I'm a tcsh user.


    Try creating a new user with bash as shell, and try there, to see if it is
    an issue.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  10. #10

    Default Re: pkgconfig and gtk+ issue

    Quote Originally Posted by martin_helm View Post
    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?
    I tried that but it had no effect.

    Quote Originally Posted by martin_helm View Post
    What command is exactly executed in the makefile which does throw this
    error message?
    "remake" is a bit more verbose:
    Code:
    trace-cmd> remake 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
    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
    Package libxml-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libxml-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libxml-2.0' found
      GUI COMPILE            trace-graph-main.o
    /media/5-home/aschallenberg/tmp/3wm-arm/util/trace-cmd/trace-graph-main.c:22:21: fatal error: gtk/gtk.h: Datei oder Verzeichnis nicht gefunden
    compilation terminated.
    /media/5-home/aschallenberg/tmp/3wm-arm/util/trace-cmd/Makefile:460: *** [trace-graph-main.o] Fehler 1
    
    #0  trace-graph-main.o at /media/5-home/aschallenberg/tmp/3wm-arm/util/trace-cmd/Makefile:460
    #1  trace-graph at /media/5-home/aschallenberg/tmp/3wm-arm/util/trace-cmd/Makefile:360
    #2  all_gui at /media/5-home/aschallenberg/tmp/3wm-arm/util/trace-cmd/Makefile:345
    Command-line invocation:
            "remake -f /media/5-home/aschallenberg/tmp/3wm-arm/util/trace-cmd/Makefile BUILDGUI=1 all_gui"
    Makefile:342: *** [gui] Fehler 2
    
    #0  gui at /media/5-home/aschallenberg/tmp/3wm-arm/util/trace-cmd/Makefile:342
    Command-line invocation:
            "remake gui"
    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.


    Quote Originally Posted by martin_helm View Post

    > 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...

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •