Configure can't find Pkg: libgnomeprint-2.2

  • don

    don - 2004-11-06

    In my Mac OS 10.3.5, the configure script yields the following error:
    checking for libgnomeprint-2.2 >= 2.2... Package libgnomeprint-2.2 was not found in the pkg-config search path.

    Perhaps you should add the directory containing `libgnomeprint-2.2.pc'
    to the PKG_CONFIG_PATH environment variable

    No package 'libgnomeprint-2.2' found

    configure: error: Library requirements (libgnomeprint-2.2 >= 2.2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
    I had installed libgnomeprint2.2 version 2.4.2-5 with Fink.  I believe this puts it in /sw/lib.  I pointed Configure there with

    $ PKG_CONFIG_PATH=/sw/lib
    $  ./configure CFLAGS=-L/sw/include LDFLAGS=-L/sw/lib

    but still get the error.  It looks to me that Configure is looking for a file called libgnomeprint-2.2.pc, but no such file exits on my system!

    I COULD compile and install libgnomeprint independently from source, but i wouldn't know where to put it.

    I'd appreciate any advice on how to resolve this, but know little about this stuff, so i need explicit instructions.
    thanks, don

    • John Coppens

      John Coppens - 2004-11-06

      Hi Don.

      Since the advent of GTK+ 2.xx the way programs can detect the presence of libraries through the .pc files. A program that wants to know if a lib or program is present, calls pkg-config with its name, and can get a lot of info about the library.

      These pc files are normally located somewhere in a lib directory, in a special directory called pkgconfig. If libgnomeprint is installed in /sw/lib, the pc file should be in /sw/lib/pkconfig. It's really a necessity, as all programs that need libgnomeprint, will first look for the .pc file.

      If you (re)compile from zero, you'd better install it where you installed the previous one, so as not to confuse the linker later on. You'll probably have to compile libgnomeprint with:

      ./configure --prefix=/sw
      make install

      That is, if MacOS behaves the same as my linux ;-)
      This will install the .pc file too.
      Of course, then PKG_CONFIG_PATH environment variable must include the path to the lib. You can de something like:

      export PKG_CONFIG_PATH=/sw/lib/pkgconfig

      before trying to compile linsmith. (It's probably good to define the path in a more definitive way to avoid future problems with other programs - such as in the /etc/profile file or something similar)

      Hope this helps. Keep me posted of your progress.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks