LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PKG_CONFIG_PATH problems (https://www.linuxquestions.org/questions/linux-software-2/pkg_config_path-problems-300992/)

Vindane 03-13-2005 12:41 AM

PKG_CONFIG_PATH problems during "./configure"
 
Hi I'm installing gtkhtml-3.6.0 and in "./configure" I'm getting this error.

Quote:

configure: error: Library requirements (gtk+-2.0 >= 2.2.0 libgnomeui-2.0 >= 1.112.1 libgnomeprint-2.2 >= 2.8.0 libgnomeprintui-2.2 >= 2.2.1 libglade-2.0 >= 2.0.0) 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 know that these packages are installed.

I'm not too familiar with playing around with the different configure variables so I was wondering if someone might shed some light on this for me please.

Thanks!

__J 03-13-2005 03:32 AM

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

note that the last directory must be a pkgconfig directory ( for example, dont do this:

export PKG_CONFIG_PATH=/usr/local/lib/:$PKG_CONFIG_PATH - this seems to be a common misconception).

bioagentice 03-13-2005 03:35 AM

google libtar and install, see if that helps

rylan76 03-13-2005 03:53 AM

I had a similar problem geting K3B to compile - I had the library but configure would refuse to "find" it. I fixed it by

K3B will give a compile error that it cannot find libart_lgpl_2.a.

Fix by changing dir into:

/usr/lib

and doing

ln -s libart_lgpl_2.so.2.3.11 libart_lgpl_2.a

after making sure the libart RPM is installed.

Also edit /etc/ld.so.conf and add

/usr/lib

at the bottom and run /sbin/ldconfig.

I. e. I symlinked the filename it was looking for to the dynamic library file that I did find I had - maybe you can try this too?

bioagentice 03-13-2005 03:57 AM

wow, i am semi linux savi and you lost ME on that one, the thread started isnt too good at compiling, so im almost sure you lost them too...... hehehehehehe, but after further reading, i think he is right my man, best follow this and see what happens, it will either work, or crash the program again, what have you got to loose eh?

Vindane 03-13-2005 02:05 PM

Nope, I just tried that. That didn't work either. Isn't there some way to use the PKG_CONFIG_PATH variable to get it to point to my libraries? For instance, my GTK 2.0 is in /usr/lib. There you'll find the folder "GTK 2.0".

__J 03-13-2005 03:25 PM

pkg-config doesn't (technically) deal with libraries. there are other env. variables you can use to force the linker to pick up libraries, as well as compiler flags, but that is not your problem here.

First thing's first, what is the exact error? your error message below is only part of the error, the configure script will single out which pkg-config file it cannot find. The reason you cannot point to specific libraries is the configure script isn't looking for libraries, it's looking for the pkg-config files ( all your newer gnome libs use this system, as well as some other packages). This is why you need to adjust PKG_CONFIG_PATH accordingly.


Also, where are you installing these libraries to?

Vindane 03-15-2005 07:31 AM

The package I'm trying to install is "gtkhtml-3.6.0". My complete configure output is as follows...
Quote:

./configure
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for intltool >= 0.30... 0.31 found
checking for perl... /usr/bin/perl
checking for XML::Parser... ok
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking build system type... i686-pc-linux
checking host system type... i686-pc-linux
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/i486-slackware-linux/bin/ld
checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes
checking for /usr/i486-slackware-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/i486-slackware-linux/bin/ld
checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking what warning flags to pass to the C compiler... -Wall -Wmissing-prototypes
checking what language compliance flags to pass to the C compiler...
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for dgettext in libc... yes
checking for bind_textdomain_codeset... yes
checking for msgfmt... /usr/bin/msgfmt
checking for dcgettext... yes
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for catalogs to be installed... am ar az be bg bn ca cs da de el en_CA en_GB es et eu fi fr ga gl gu he hi hr hu it ja ko lt lv ms nb nl nn no pa pl pt pt_BR ru sk sl sq sr sr@Latn sv ta tr uk vi zh_CN zh_TW
checking for pkg-config... /usr/bin/pkg-config
checking for gail >= 0.13... yes
checking GAIL_CFLAGS... -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gail-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libart-2.0
checking GAIL_LIBS... -Wl,--export-dynamic -lgailutil -lgnomecanvas-2 -lart_lgpl_2 -lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
checking for gtk+-2.0 >= 2.2.0 libgnomeui-2.0 >= 1.112.1 libgnomeprint-2.2 >= 2.8.0 libgnomeprintui-2.2 >= 2.2.1 libglade-2.0 >= 2.0.0... Requested 'libgnomeprint-2.2 >= 2.8.0' but version of libgnomeprint-2.2 is 2.6.1

configure: error: Library requirements (gtk+-2.0 >= 2.2.0 libgnomeui-2.0 >= 1.112.1 libgnomeprint-2.2 >= 2.8.0 libgnomeprintui-2.2 >= 2.2.1 libglade-2.0 >= 2.0.0) 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've installed all libraries to the default locations.

__J 03-15-2005 03:05 PM

here's your problem:

you are installing to the default location when the same ( but lower version) libraries already exist on your system. This is not good unless you are doing this intentionally and know exactly how to manipulate the environment to ignore one set of libraries and pick up another set ( your PATH will probably have to be altered also). Once you get all of this compiled, you are going to have a runtime problem with libraries.

check /usr/local/lib/pkgconfig for libgnomeprint-2.x.pc, if it's there ( it should be, unless that package is not installed):

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

will force pkg-config to look in /usr/local/lib/pkgconfig before /usr/lib/pkgconfig and pick up the right lib to compile against. again, it will not work once you get it compiled unless you manually manipulate the runtime library linker.

Electro 03-15-2005 03:59 PM

What I like to do is setup a symbolic link that points to /usr/lib/pkconfig from /usr/local/lib/pkconfig. This is the lazy mans or womans way and it does work. If there is any *.pc files in /usr/local/lib/pkconfig, make sure you move them to /usr/lib/pkconfig before making the symbolic link or else you have to start from the beginning.

The packages may be installed but are they the correct version. It seems that you installed the old versions. Its best to remove the old packages to make sure you do not have any problems with the new packages.

It is required that you run ldconfig every time you installed a library. Also make sure all library directories is listed in /etc/ld.so.conf.


All times are GMT -5. The time now is 05:26 AM.