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 11-07-2007, 04:49 PM   #1
moo-cow
Member
 
Registered: Mar 2006
Distribution: Debian
Posts: 105

Rep: Reputation: 26
How to specify a library path when compiling?


Hi all,

I'm trying to compile gtkhtml-3.16.1 from source. To meet its dependencies, I have compiled the newest GTK+ and installed it to /usr/local/lib. I tried to make configure aware of the new library by calling it like this:

Code:
./configure LDFLAGS='-L/usr/local/lib' LD_LIBRARY_PATH='/usr/local/lib' GTKHTML_LIBS='-L/usr/local/lib'
To be honest, I do not exactly know what these variables mean, but at least "-L/usr/local/lib" pops up in the make output when I use them. I think this is a step into the right direction, but on the same output line I always find the wrong reference "/usr/lib/libgtk-x11-2.0.so"! That is, make uses my old installation of GTK+ in /usr/lib and throws an error due to it being old. How do I tell configure and/or make to use my new installation of GTK+ in /usr/local/lib instead of the old one in /usr/lib?

Thanks,
moo-cow
 
Old 11-07-2007, 10:56 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by moo-cow View Post
Hi all,

I'm trying to compile gtkhtml-3.16.1 from source. To meet its dependencies, I have compiled the newest GTK+ and installed it to /usr/local/lib. I tried to make configure aware of the new library by calling it like this:

Code:
./configure LDFLAGS='-L/usr/local/lib' LD_LIBRARY_PATH='/usr/local/lib' GTKHTML_LIBS='-L/usr/local/lib'
To be honest, I do not exactly know what these variables mean, but at least "-L/usr/local/lib" pops up in the make output when I use them. I think this is a step into the right direction, but on the same output line I always find the wrong reference "/usr/lib/libgtk-x11-2.0.so"! That is, make uses my old installation of GTK+ in /usr/lib and throws an error due to it being old. How do I tell configure and/or make to use my new installation of GTK+ in /usr/local/lib instead of the old one in /usr/lib?

Thanks,
moo-cow
While I've never compiled this package specifically, I can tell you that "./configure" being part of the typical automake suite means that it gets its variables and options from "--with-package=/some/path".

To find the correct options, do a "./configure --help"
.. which may spit out a lot of crap, if it does and you can't read it all (one of the problems of automake), do a "./configure --help >& some_file.txt" and then open the file in a text editor.
 
Old 11-08-2007, 01:12 AM   #3
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 16
If that doesn't work out, you might consider trying to tinker with /etc/ld.so.conf (and running ldconfig afterwards). But make sure you make a backup of it before you do, as breaking it too much might potentially do nasty things to your system...

Personally, I'd try adding the /usr/local/lib path at the top of the file and seeing if you can make it take precedence that way...
 
Old 11-10-2007, 06:59 AM   #4
moo-cow
Member
 
Registered: Mar 2006
Distribution: Debian
Posts: 105

Original Poster
Rep: Reputation: 26
Thanks for your helpful suggestions! Unfortunately, they did not work, as well as all my other attempts. I therefore suspect that there might be a bug in the compilation scripts. I wrote an email to the authors of the library, perhaps they can solve this.
 
Old 11-10-2007, 12:56 PM   #5
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 77
Quote:
Originally Posted by moo-cow View Post
Unfortunately, they did not work, as well as all my other attempts.
Well, what exactly did you try (e.g., what options did you pass to configure or how did you modify your /etc/ld.so.conf)?
 
Old 11-10-2007, 10:10 PM   #6
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,539

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
See if this helps:

Code:
LDFLAGS='-L/usr/local/lib' LD_LIBRARY_PATH='/usr/local/lib' GTKHTML_LIBS='-L/usr/local/lib' ./configure
Note that ./configure is specified last.
 
  


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
Compiling library files into another library file. knobby67 Programming 3 04-10-2007 03:07 PM
library path Scott7 Debian 1 10-19-2005 08:25 AM
library path variable vrdhananjay Linux - Software 2 09-03-2005 07:31 PM
GD Library path? kinkybullet Linux - Newbie 1 02-11-2004 10:15 PM
Cannot find path for library Baran Linux - Newbie 5 09-03-2003 05:46 AM

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

All times are GMT -5. The time now is 10:04 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration