LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-21-2016, 11:20 PM   #1
coltson
Member
 
Registered: Oct 2010
Posts: 102

Rep: Reputation: 2
Passing two pkgconfig directories to configure gegl


Hi, I am currently trying to compile gegl. However it depends on two software artifacts that I installed in non standard directories: Glib and Babl. When I tried to compile I received
Quote:
checking for BABL... configure: error: Package requirements (babl >= 0.0.22) were not met:
Then instead of using a "normal" configure I used
Quote:
/configure PKG_CONFIG_PATH="/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig/"
which worked for Babl, but now I am getting:
Quote:
checking for GLIB - version >= 2.16.1... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error:
*** GLIB 2.16.1 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/.
So I would like to know if there is a way to pass the directories of the two programs to configure something like
Quote:
/configure PKG_CONFIG_PATH="/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig/" /media/34GB/Arquivos-de-Programas-Linux/Glib-2.17.0/lib/pkgconfig/
but I don't know the correct syntax.

Thanks for your attention.
 
Old 12-22-2016, 12:36 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,871

Rep: Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872
Hi,

You can use the following syntax:
Code:
PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig:/media/34GB/Arquivos-de-Programas-Linux/Glib-2.17.0/lib/pkgconfig:$PKG_CONFIG_PATH ./configure ..
.
Regards
 
Old 12-23-2016, 02:11 AM   #3
coltson
Member
 
Registered: Oct 2010
Posts: 102

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bathory View Post
Hi,

You can use the following syntax:
Code:
PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig:/media/34GB/Arquivos-de-Programas-Linux/Glib-2.17.0/lib/pkgconfig:$PKG_CONFIG_PATH ./configure ..
.
Regards
Thanks. I did a copy & paste on your command and received:
Code:
checking build system type... Invalid configuration `..': machine `..' not recognized
configure: error: /bin/bash ./config.sub .. failed
If I remove the final two points, I receive
Code:
checking for GLIB - version >= 2.16.1... 
*** 'pkg-config --modversion glib-2.0' returned 2.17.0, but GLIB (2.24.1)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
configure: error:
*** GLIB 2.16.1 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/.
Then I did a
Code:
find /usr -name *libglib*
and found
Code:
/usr/lib/cli/glib-sharp-2.0/libglibsharpglue-2.so
/usr/lib/libglibmm-2.4.so.1
/usr/lib/libglibmm-2.4.so.1.3.0
/usr/lib/compiz/libglib.so
/usr/lib/libglibmm_generate_extra_defs-2.4.so.1.3.0
/usr/lib/libglibmm_generate_extra_defs-2.4.so.1
/usr/share/doc/libglibmm-2.4-1c2a
/usr/share/doc/libglib2.0-0
/usr/share/doc/libglib-perl
/usr/share/doc/libglib2.0-data
/usr/share/doc/libglib2.0-cil
/usr/share/cli-common/packages.d/libglib2.0-cil.mono
/usr/share/cli-common/packages.d/libglib2.0-cil.installcligac
/usr/share/cli-common/policies.d/libglib2.0-ci
So my doubt now it is..... since GLib is in
Code:
/usr/lib
which is a standard directory to search libraries, why he is not finding Glib? Should I put
Code:
/usr/lib
in ld.so.conf? I think it's useless because it's a standard directory that should be searched by default. So how I should modify LD_LIBRARY_PATH to solve the question? Is there another way to do it?
Thanks.
 
Old 12-23-2016, 07:20 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,871

Rep: Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872
Quote:
If I remove the final two points, I receive
checking for GLIB - version >= 2.16.1...
I put the 2 dots there, to show you that you may add other options after the ./configure if you like


Quote:
checking for GLIB - version >= 2.16.1...
*** 'pkg-config --modversion glib-2.0' returned 2.17.0, but GLIB (2.24.1)
You didn't say your distro, but since you have glib-2.24.1 installed, why do you want to downgrade to 2.16.1?


Quote:
why he is not finding Glib? Should I put
/usr/lib
So how I should modify LD_LIBRARY_PATH to solve the question? Is there another way to do it?
It's finding 2 different glib2 versions. If you omit the 2nd entry from PKG_CONFIG_PATH, it'll stop complaining.
Anyway, if you want to set LD_LIBRARY_PATH to something else, you can also prepend it to ./configure as you did with PKG_CONFIG_PATH
 
Old 12-23-2016, 06:49 PM   #5
coltson
Member
 
Registered: Oct 2010
Posts: 102

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bathory View Post
You didn't say your distro, but since you have glib-2.24.1 installed, why do you want to downgrade to 2.16.1?
I don't. I didn't know I had it installed.


Quote:
It's finding 2 different glib2 versions. If you omit the 2nd entry from PKG_CONFIG_PATH, it'll stop complaining.
No, it doesn't. I issued a
Code:
PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig:$PKG_CONFIG_PATH ./configure
and received:
Code:
configure: error:
*** GLIB 2.16.1 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/.
and is more than that. Trying to install another program, when I issue a
Code:
./configure
I receive a
Code:
checking for sdl-config... no
checking for SDL - version >= 1.2.0... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: SDL >= 1.2.0 is required
However I do have:
Code:
/usr/lib/libSDL-1.2.so.0
/usr/lib/libSDL-1.2.so.0.11.3
/usr/lib/libSDL.so
I solved this problem with installing SDL into a different dir and then issuing a
Code:
 ./configure --with-sdl-prefix=/media/34GB/Arquivos-de-Programas-Linux/SDL-1.2.15/ --with-sdl-exec-prefix=/media/34GB/Arquivos-de-Programas-Linux/SDL-1.2.15/
but then I received
Code:
configure: error: zlib >= 1.2.3 is required
installed zlib and issued a
Code:
./configure --with-sdl-prefix=/media/34GB/Arquivos-de-Programas-Linux/SDL-1.2.15/ --with-sdl-exec-prefix=/media/34GB/Arquivos-de-Programas-Linux/SDL-1.2.15/  --with-zlib-prefix=/media/34GB/Arquivos-de-Programas-Linux/Zlib-1.2.8/
but keep receiving the
Code:
configure: error: zlib >= 1.2.3 is required
message



So my system is with a serious library detection problem and I have no idea of how to solve it

Last edited by coltson; 12-23-2016 at 07:04 PM.
 
Old 12-24-2016, 02:55 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,871

Rep: Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872
Quote:
However I do have:
/usr/lib/libSDL-1.2.so.0
/usr/lib/libSDL-1.2.so.0.11.3
/usr/lib/libSDL.so
<-snip->
So my system is with a serious library detection problem and I have no idea of how to solve it
You're still didn't say what your distro is, so we could be of better assistance..

Anyway, all these libraries exist in your system, but if you want to compile some software against them, you'll also need their development packages installed too.
So fire up your distro's package manager and install the development packages. Mind that they are usually end with -dev or -devel (e.g. zlib-devel for RHEL based distros, or zlib1g-dev for Debian based and so on)
 
Old 12-26-2016, 11:16 PM   #7
coltson
Member
 
Registered: Oct 2010
Posts: 102

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bathory View Post
You're still didn't say what your distro is, so we could be of better assistance..

Anyway, all these libraries exist in your system, but if you want to compile some software against them, you'll also need their development packages installed too.
So fire up your distro's package manager and install the development packages. Mind that they are usually end with -dev or -devel (e.g. zlib-devel for RHEL based distros, or zlib1g-dev for Debian based and so on)
I want to this from source, anyway, even if I wished, the support for my distro is long gone.
 
Old 12-28-2016, 11:23 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,871

Rep: Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872
Quote:
Originally Posted by coltson View Post
I want to this from source, anyway, even if I wished, the support for my distro is long gone.
What is your distro anyway?

If you want to compile S/W from source, you need to define PKG_CONFIG_PATH and LD_LIBRARY_PATH, since you install the needed libraries in non standard places
 
Old 12-29-2016, 02:31 AM   #9
coltson
Member
 
Registered: Oct 2010
Posts: 102

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bathory View Post
What is your distro anyway?

If you want to compile S/W from source, you need to define PKG_CONFIG_PATH and LD_LIBRARY_PATH, since you install the needed libraries in non standard places
How should I set LD_LIBRARY_PATH to try to solve the Glib 2.24 detection matter, since when I indicate the path to the version 2.17 it complains about the 2.24 being available, but when I ommit it in PKG_CONFIG_PATH, it will complain about Glib libraries not being present, even with their existance in /usr/lib? (and why configure doesn't detect them)?
 
Old 12-29-2016, 08:17 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,871

Rep: Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872
Quote:
Originally Posted by coltson View Post
How should I set LD_LIBRARY_PATH to try to solve the Glib 2.24 detection matter, since when I indicate the path to the version 2.17 it complains about the 2.24 being available, but when I ommit it in PKG_CONFIG_PATH, it will complain about Glib libraries not being present, even with their existance in /usr/lib? (and why configure doesn't detect them)?
Most of these libraries (glib2, zlib etc) should be already installed by your system under /usr/lib (or /usr/lib64 if running a 64bit distro). Check /etc/ld.so.conf for these directory among others.

If glib2-2.24 isn't installed in a standard location (i.e. not listed in /etc/ld.so.conf), find where it's installed and use that path in the following way:
Code:
export LD_LIBRARY_PATH=/path/toglib2-2.24:/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=path/to/glib2-2.24/pkgconfig:/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig:$PKG_CONFIG_PATH
./configure
 
Old 01-01-2017, 09:21 PM   #11
coltson
Member
 
Registered: Oct 2010
Posts: 102

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bathory View Post
Most of these libraries (glib2, zlib etc) should be already installed by your system under /usr/lib (or /usr/lib64 if running a 64bit distro). Check /etc/ld.so.conf for these directory among others.

If glib2-2.24 isn't installed in a standard location (i.e. not listed in /etc/ld.so.conf), find where it's installed and use that path in the following way:
Code:
export LD_LIBRARY_PATH=/path/toglib2-2.24:/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=path/to/glib2-2.24/pkgconfig:/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig:$PKG_CONFIG_PATH
./configure
I did the first export, only then I read the second export and so realised that it won't work because there isn't a glib2-2.24 dir (or anything like that). The libraries are scaterred in /usr/lib. So there isn't a pkgconfig for glib either.

I am thinking in removing all the glib libraries from /usr/lib temporarily, then run the configure and then put them back there. What do you think?
 
Old 01-02-2017, 03:10 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,871

Rep: Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872
Quote:
I did the first export, only then I read the second export and so realised that it won't work because there isn't a glib2-2.24 dir (or anything like that). The libraries are scaterred in /usr/lib. So there isn't a pkgconfig for glib either.
These are just examples to show you how to define the 2 env. variables (LD_LIBRARY_PATH and PKG_CONFIG_PATH) before compiling.

You still don't say your distro, or how you've installed glib2 and finished with "libraries scattered in /usr/lib".
As a dirty workaround, if you're sure you have only version 2.24.1 installed, you can manually edit /usr/lib/pkgconfig/glib-2.0.pc and change the version number.
Afterwards, to verify run the following command:
Code:
pkg-config --modversion glib-2.0

Quote:
I am thinking in removing all the glib libraries from /usr/lib temporarily, then run the configure and then put them back there. What do you think?
It won't work as glib2 is a dependency of the S/W you're trying to compile.
 
Old 01-05-2017, 02:04 AM   #13
coltson
Member
 
Registered: Oct 2010
Posts: 102

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bathory View Post
These are just examples to show you how to define the 2 env. variables (LD_LIBRARY_PATH and PKG_CONFIG_PATH) before compiling.

You still don't say your distro, or how you've installed glib2 and finished with "libraries scattered in /usr/lib".
As a dirty workaround, if you're sure you have only version 2.24.1 installed, you can manually edit /usr/lib/pkgconfig/glib-2.0.pc and change the version number.
Afterwards, to verify run the following command:
Code:
pkg-config --modversion glib-2.0
It won't work as glib2 is a dependency of the S/W you're trying to compile.
Sorry, I was going to tell my distro in the two last posts, but forgot. It is ubuntu 10.04. I didn't install glib2, it came with the system. There isn't /usr/lib/pkg-config, so I will need to do something else.
 
Old 01-05-2017, 04:24 AM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,871

Rep: Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872Reputation: 1872
Quote:
Sorry, I was going to tell my distro in the two last posts, but forgot. It is ubuntu 10.04.
It's way too old and of course unsupported (2012 EOL)!
You should upgrade ASAP to a newer distro first of all for security reasons and then because new S/W won't compile in ancient distros.


Quote:
I didn't install glib2, it came with the system. There isn't /usr/lib/pkg-config, so I will need to do
Mind that it's /usr/lib/pkgconfig (no dash "-" between "pkg" and "config").
 
Old 01-11-2017, 09:13 PM   #15
coltson
Member
 
Registered: Oct 2010
Posts: 102

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bathory View Post
It's way too old and of course unsupported (2012 EOL)!
You should upgrade ASAP to a newer distro first of all for security reasons and then because new S/W won't compile in ancient distros.


Mind that it's /usr/lib/pkgconfig (no dash "-" between "pkg" and "config").
I don't want to upgrade to a newer distro, since I like this one. Even If I wanted, while I can't solve this issue, I won't be able to do it (and even if I do solve it, I am still not sure if I could upgrade)
Frankly, security reasons are meaningless IMO and I already compiled some new software as long as I don't have a problem like this one.

Anyway, there isn't /usr/lib/pkgconfig. Need to find a way to tell pkg-config to not look at /usr/lib. Do you now a way
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rakarrack not passing configure headly21 Linux - Software 2 09-27-2009 06:54 PM
pkgconfig, configure scripts and PKG_CONFIG_PATH shevegen Linux From Scratch 1 08-06-2006 08:20 AM
Help!!! Can't install glib 2.4.7, because the configure script can't find pkgconfig RJARRRPCGP Linux - Newbie 3 11-22-2004 12:20 AM
Help!!! Can't install glib, because configure can't find pkgconfig RJARRRPCGP Linux - Newbie 1 11-20-2004 09:43 PM
[pkgconfig] Error in ./configure; bad directory (where I'm Installing from) sitmex Linux - Software 1 05-20-2004 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration