LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-24-2008, 09:36 AM   #1
SkipHuffman
Member
 
Registered: Mar 2005
Posts: 81

Rep: Reputation: 15
Not finding libraries during configure, make, or install.


I seem to have this problem a lot, so it must be something missing in my understanding.

When I try to ./configure a new or upgraded application it seems to be unable to find certain libraries that I know are on my system. If I go and try to install those libraries, typically from a .rpm, I am told that I already have the libraries installed. Also if I do a find for those libraries, I see them in my system. I must be failing to tell ./configure how to find my libraries.

An example. I am trying to upgrade Kopete today. I download the latest tarball into /home/skip/ttt, then open a cmd window, type cd ttt enter, then tar -jxvf kop.... then cd kop... then ./configure I get this error:
<blockquote>
You're missing libxslt, version 1.0.7 or newer, or the libxslt
development package. Kopete will not be compiled.
If you want to use Kopete, have a look at ftp://xmlsoft.org/ or find
a binary package for your system.
</blockquote>
(among others)

I go to the specified ftp site and find the libxslt rpm, download and run, only to be told that I already have the item installed.

Doublechecking with find gives me this
<blockquote>
[root@bigbox kopete-0.12.2]# find / -iname "libxslt*"
/home/skip/tmp/libxslt-1.1.24-1.src.rpm
/home/skip/tmp/libxslt-1.1.24-1.x86_64.rpm
/home/skip/tmp/libxslt-1.1.24-1.src-1.rpm
find: WARNING: Hard link count is wrong for /proc/1/task: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
/usr/share/doc/libxslt1-1.1.12
/usr/lib/libxslt.so.1
/usr/lib/openoffice/program/libxsltdlg645li.so
/usr/lib/openoffice/program/libxsltfilter645li.so
/usr/lib/dia/libxslt_filter.la
/usr/lib/dia/libxslt_filter.so
/usr/lib/libxslt.so.1.1.12
/usr/local/OpenOffice.org1.1.4/program/libxsltfilter645li.so
/usr/local/OpenOffice.org1.1.4/program/libxsltdlg645li.so
</blockquote>

So it sure looks like I have the library, but ./configure cannot find it. Why? How can I prevent this in the future. (This is not the only install it has happened on. Different libraries, but always the same basic "can't find" errors.)

Thank you.
 
Old 11-24-2008, 09:58 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
If you use libraries provided by a distribution's package manager, you'll find that they usually do not install with the header files needed for compiling. These are generally provided in a separate package with something like -dev or -devel attached to the basename. You'll need to install these before you can compile against that library.

Unfortunately, this little detail is not usually mentioned in the README files, so it tends to throw a lot of newbies off.

The other thing that might affect you would be if your LD_LIBRARY_PATH variable doesn't include the path to the libraries you need.
 
Old 11-24-2008, 10:10 AM   #3
SkipHuffman
Member
 
Registered: Mar 2005
Posts: 81

Original Poster
Rep: Reputation: 15
So just run this: export LD_LIBRARY_PATH=/usr/lib as root or sudo to make all the libraries in /usr/lib available to compilers, right?

And by running export |grep LD and not seeling LD_LIBRARY_PATH listed, means that I don't have anything in that environment variable, right?

Thanks for the advice, I wish I had the excuse of being a newbie, but I have been running linux for most of a decade.
 
Old 11-24-2008, 10:48 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
When running "configure" and a lib is asked for,
( missing e.g. lxslt (l for lib) or libxslt )
the required lib is "always" the lib-something.so
Not so.0 or so.1 etc. etc.

Installing 'libxslt1-devel' or 'libxslt1-dev'
( different names in different Linux's )
will do.
 
Old 11-24-2008, 11:40 AM   #5
SkipHuffman
Member
 
Registered: Mar 2005
Posts: 81

Original Poster
Rep: Reputation: 15
Why would I have the libxslt.so.1.1.12 and libxslt.so.1 (symbolic link to the first) but not the libxslt.so?

Also I notice that those are 2005 dated files. I attempted to install the latest
 
Old 11-24-2008, 12:00 PM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by SkipHuffman View Post
Why would I have the libxslt.so.1.1.12 and libxslt.so.1 (symbolic link to the first) but not the libxslt.so?

Also I notice that those are 2005 dated files. I attempted to install the latest
Symlinks are a convenient and easy way to handle major versions. A given program might need to link against 1.x because of the API. If the APIs are not compatible between major versions, then the program will not be able to compile against 2.x if it was designed for the 1.x version of that lib (I am not talking about xslt here, but in general, so don't pay much attention to the "2.x", it's just an example).

However, it should compile against 1.1.666 or whatever other version that has the same major number. Having a symlink guarantees that the make files doesn't need to check for all the imaginable 1.x versions. Instead it just look for the .so.1 file that should be linked to the right binary file.

I don't know if there's any other reason, but that alone seems a good enough one.
 
Old 11-24-2008, 12:41 PM   #7
SkipHuffman
Member
 
Registered: Mar 2005
Posts: 81

Original Poster
Rep: Reputation: 15
This is slowly becoming more clear. I still am a bit lost on versions and search orders. It MAY be because it looks like libxslt may require libxml.so when the latest version of libxml (from the same developer) compiles to libxml2.so I am compiling a previous version of libxml to see if that does the trick. (2.6.32 rather than 2.7.2)

Edit: No, that was nonsense

Last edited by SkipHuffman; 11-24-2008 at 01:17 PM.
 
Old 11-24-2008, 12:56 PM   #8
SkipHuffman
Member
 
Registered: Mar 2005
Posts: 81

Original Poster
Rep: Reputation: 15
I think I see where my problem is, but not how to solve it.

It seems that when I install a new library it typically goes into /usr/local/lib Older(original to distribution perhaps) are in /usr/lib. It seems that when make goes looking for a library it looks in /usr/lib before /usr/local/lib(if at all) and stops when it finds a library that matches the name it is looking for.

How can I tell Linux to look in /usr/local/lib BEFORE /usr/lib?

Edit: Ok, that is not exactly it. I can move all the libxml* files out of /usr/lib (with mv into /tempttt) yet when I rerun configure it STILL says it is finding 2.6.17 not either 2.6.32 or 2.7.2 both of which I have installed in /usr/local/lib

Last edited by SkipHuffman; 11-24-2008 at 01:06 PM.
 
Old 11-24-2008, 01:55 PM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
The configure script usually has parameters to specify all that stuff. Sometimes just using ./configure --prefix=/usr/local will help. Sometimes you need to set some other parameters. Usually ./configure --help shows all the info.
 
Old 11-24-2008, 02:09 PM   #10
SkipHuffman
Member
 
Registered: Mar 2005
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by i92guboj View Post
The configure script usually has parameters to specify all that stuff. Sometimes just using ./configure --prefix=/usr/local will help. Sometimes you need to set some other parameters. Usually ./configure --help shows all the info.

Naw. prefix specifies where "make install" will put the files after compilation etc.
 
Old 11-24-2008, 03:23 PM   #11
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by SkipHuffman View Post
Naw. prefix specifies where "make install" will put the files after compilation etc.
Right. I got confused there. Still, ./configure --help should shows you the available parameters to change where the configure script should be looking for libs, headers and other resources. This is different depending on what are you compiling, and assumes that the program you want to compile uses autotools.

Other toolsets and custom scripts will have other means to configure your make files. Those range from simple text files to command line options or even directly editing makefiles. It all depends. On most cases the README os INSTALL files should tell you how to proceed. However that's not always true.
 
Old 11-30-2008, 11:59 AM   #12
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Here is, what I believe, a similar problem, but I have some specifics.
Mysql was installed into /usr/local - this was the default. What I installed was a .tar.gz file which - I believe - is a binary install; Anyway the documentation install instructions were followed. Mysql appears to work.

I then tried to install mediatomb; the configure fails - unable to find Mysql!
the actual error from mediatomb is:
Code:
root@abitbox:/home/gary/mediatomb# ./configure --with-mysql-cfg=/usr/local/mysql/bin 
configure: Will search for mysql config in /usr/local/mysql/bin 
configure: You specified /usr/local/mysql/bin for mysql_config 
configure: error: /usr/local/mysql/bin not found
In the string "/usr/local/mysql/bin", '/mysql' is a symbolic link to /usr/local/mysql-5.1.30-linux-i686-glibc23.
Running
Code:
root@abitbox:~# ls -l /usr/local/mysql/bin
produces
Code:
-rwxr-xr-x 1 mysql mysql 28659038 2008-11-15 00:53 mysql_client_test_embedded* 
-rwxr-xr-x 1 mysql mysql 6112 2008-11-15 00:53 mysql_config* 
-rwxr-xr-x 1 mysql mysql 3674 2008-11-15 00:53 mysql_convert_table_format*
This is getting me somewhat frustrated.

I would appreciate any help in understanding what is going on and how to fix it.

Thanks for reading

Gary

(for future reference, would if have been preferable for me to have started a new thread?)

Last edited by garyg007; 11-30-2008 at 12:02 PM.
 
Old 11-30-2008, 12:04 PM   #13
SkipHuffman
Member
 
Registered: Mar 2005
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by garyg007 View Post
Here is, what I believe, a similar problem, but I have some specifics.
Mysql was installed into /usr/local - this was the default. What I installed was a .tar.gz file which - I believe - is a binary install;
What leads you to think it is a binary install? Did you extract the tarball and check the contents?
 
Old 11-30-2008, 12:14 PM   #14
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Quote:
Originally Posted by SkipHuffman View Post
What leads you to think it is a binary install? Did you extract the tarball and check the contents?
yes.

and the install instructions in the documentation stated that it was a binary distribution.
 
Old 11-30-2008, 12:20 PM   #15
SkipHuffman
Member
 
Registered: Mar 2005
Posts: 81

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by garyg007 View Post
yes.

and the install instructions in the documentation stated that it was a binary distribution.
Does Mysql work on its own now? I seem to recall some pretty significant setup with MySQL when I installed it.

If you run mysqld_safe does it start properly?

If you then start mysql does it start properly?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what actually happens under the hood when I type ./configure, make and make install? Unregistered Slackware 12 11-19-2007 04:50 PM
these commands are not working on my server (./configure, make, make install) Anil Kumar K Linux - Software 3 07-02-2007 07:23 AM
./configure not finding KDE libraries MadCowDzz SUSE / openSUSE 3 11-21-2005 06:49 AM
Installed using ./configure, make, make install, how to remove? EnVoy Mandriva 4 03-10-2004 07:05 PM
Can I automate the tar, ./configure, make, and make install of about 50 packages? JoeLinux Linux - General 2 04-13-2002 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:57 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