LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   pkg-config won't find .pc files (https://www.linuxquestions.org/questions/linux-from-scratch-13/pkg-config-wont-find-pc-files-488008/)

achemdion 09-29-2006 10:59 AM

pkg-config won't find .pc files
 
When I run ./configure on libgsf-1.4.1, pkg-config cannot find the .pc files for gobject-2.0, glib-2.0 and xmllib-2.0. I set PKG_CONFIG_PATH to the exact directory of the three .pc files (/usr/lib/pkgconfig) but to no avail what am I to do? I cannot move on without this.
Thanks in advance

druuna 09-29-2006 12:51 PM

Hi,

If you are talking about BLFS 6.1:
- You are not using the version that's in the book (Libgsf-1.12.0). I don't know if you can use 1.4.1 with what's installed on your box (see README or alike file in the sourcetree).
- Maybe you did not install the required (BLFS 6.1) packages (GLib-2.6.4, libxml2-2.6.20 and pkg-config-0.19), you don't mention this.

Looking at the version of libgsf-1.4.1, you are probably not following BLFS 6.1, but an older version.

Please tell us a bit more.

achemdion 09-29-2006 06:02 PM

thanks for the reply..i am actually using the development version (wince) because lfs recommends to use that with lfs 6.2 which I never would have used if i knew that the blfs was still in development. Very sorry just checked and its libgsf 1.14.1. But i think the problem lies with pkg-config 0.20(which i installed earlier). It jus dosent seem to pick up the .pc files. would reinstalling pkgconfig do anything??

just and update as i just saw somthing in your post druuna, the dependancies are installed and the .pc files do exist i have seen and read them in the /usr/lib/pkgconfig directory. I think theres a way around pkgconfig by setting some other environment variables from the .pc file manually but i would like to see this problem fixed as it could lead to inconviences in future installations.

thanks again

druuna 09-29-2006 06:56 PM

Hi,

I've build BLFS 6.1 (the above packages and more) onto LFS 6.2, works fine on my box. But that's not the solution to your problem....

I've scanned the chapters of the development version and don't see anything out of the ordinary. Only thing that comes to mind at this point: What did you do to the PKG_CONFIG_PATH setting? After install both /usr/lib/pkgconfig and /usr/share/pkgconfig should already be there and from your first post I understand that you set it to /usr/lib/pkgconfig only?

Just came to mind: I did have pkg_config_path problems in the past. After changing the order of the path's it worked.

BTW: Did you run the make check step during the pkgconfig build and did that go well?

Not to much to go on, but I hope it gets you going again.

achemdion 09-29-2006 08:13 PM

Weirdly enough pkg_config_path was set to a sole X11 directory. And i knew where the .pc files for those packages were so i just set it to that btw i just saw that i have no usr/share/pkgconfig directory. Thanks for the advice. will mess a bit and post what hapens soon.

achemdion 09-29-2006 09:04 PM

Ok I have just:
- Recompiled and installed pkgconfig (the test suite showed up with no errors).
- Changed /etc/profile.d/X.sh as it seems to replace the PKG_CONFIG_PATH variables with /usr/X11RC6/lib/pkgconfig
- Created /etc/profile.d/pkgconfig.sh:
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/XllRC6/lib/pkgconfig
- Checked that the correct .pc files reside in the above directories
- Checked that the script works with echo PKG_CONFIG_PATH

Results:
- When I enter pkg-config --list-all, many packages including gobject-2.0, glib-2.0 and xmllib-2.0 are listed
- When I run ./configure --prefix=/usr from the libgsf-1.14.1 directory the script runs until the pkgconfig part
and then terminates with:
checking for LIBGSF... configure: error: Package requirements (
gobject-2.0 >= 2.6.0
glib-2.0 >= 2.6.0
libxml-2.0 >= 2.4.16
) were not met:

druuna 09-30-2006 08:32 AM

Hi,

What does the config.log file (after ./configure ...... for libgsf) tell you?

If I run .configure on a box that does not have the required versions I get the following:
Quote:

checking for LIBGSF... Requested 'gobject-2.0 >= 2.6.0' but version of GObject is 2.4.1
configure: error: Package requirements (
gobject-2.0 >= 2.6.0
glib-2.0 >= 2.6.0
libxml-2.0 >= 2.4.16
) were not met:
Same as you have.

If I take a look in the config.log file and search for gobject the following is shown:
Quote:

configure:21357: checking pkg-config is at least version 0.9.0
configure:21360: result: yes
configure:21371: checking for LIBGSF
configure:21379: $PKG_CONFIG --exists --print-errors "$libgsf_reqs"
Requested 'gobject-2.0 >= 2.6.0' but version of GObject is 2.4.1
configure:21382: $? = 1
configure:21397: $PKG_CONFIG --exists --print-errors "$libgsf_reqs"
Requested 'gobject-2.0 >= 2.6.0' but version of GObject is 2.4.1
configure:21400: $? = 1

configure:21438: error: Package requirements (
gobject-2.0 >= 2.6.0
glib-2.0 >= 2.6.0
libxml-2.0 >= 2.4.16
) were not met:
As stated, gobject 2.4.1 is installed (which should be 2.6.X).
If I take a look at /usr/lib/pkgconfig/gobject-2.0.pc it indeed shows that I have 2.4.1 installed:
Quote:

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: GObject
Description: GLib Type, Object, Parameter and Signal Library
Requires: glib-2.0
Version: 2.4.1
Libs: -L${libdir} -lgobject-2.0
Cflags:
It also shows that pkg-config should be 0.9.0 or higher and if that requirement is met.

Maybe it will give you a clue about what is wrong/missing.

I think that you can ignore the message about libxml for now, I do have 2.5.11 installed and it still tells me I need 2.4.16 or better. Guess the previous requirements need to be resolved first.

BTW: The examples shown are from a 5.1 (B)LFS install, so things could be installed in different locations for LFS 6.2.

Hope this gets you going again.


All times are GMT -5. The time now is 02:35 PM.