Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need to compile program linked to earlier version of a lib
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
sadrok
n00b
n00b


Joined: 21 Feb 2003
Posts: 21
Location: Infront of this stupid PC

PostPosted: Sat May 31, 2003 5:56 pm    Post subject: Need to compile program linked to earlier version of a lib Reply with quote

I wish to compile a program used for CGI
Currently it links to libpng-1.2.5-r4 (/usr/lib/libpng.so.3)
But I want it to run on a webhost that only has (/usr/lib/libpng.so.2)
How can this be done?
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Sat May 31, 2003 6:41 pm    Post subject: Reply with quote

I'm assuming you don't have root access on that system, so you can't upgrade?

You could compile the new libpng you need and keep it in your home directory and point to that version (libpng-1.2.5-r4) in the CGI program's Makefile.
Back to top
View user's profile Send private message
sadrok
n00b
n00b


Joined: 21 Feb 2003
Posts: 21
Location: Infront of this stupid PC

PostPosted: Sun Jun 01, 2003 4:40 am    Post subject: Reply with quote

Pythonhead wrote:
I'm assuming you don't have root access on that system, so you can't upgrade?


Unfortunately, you're correct.

Quote:

You could compile the new libpng you need and keep it in your home directory and point to that version (libpng-1.2.5-r4) in the CGI program's Makefile.


I would like to know how? This could help me a whole lot. I'm using gcc-3 but I couldn't find out how to point to a library that's not in the usual locations.
Back to top
View user's profile Send private message
Pythonhead
Developer
Developer


Joined: 16 Dec 2002
Posts: 1801
Location: Redondo Beach, Republic of Calif.

PostPosted: Sun Jun 01, 2003 7:53 am    Post subject: Reply with quote

Compile libpng.so.3 but don't do 'make install', unless you've already configured your Makefile to install it in your home directory somewhere.

Go to your CGI program's Makefile and look for a line that has something like:

LIBS = -L/usr/lib -llibpng etc.

You'll want to add the directory where your new copy of libpng.so.3 is then compile it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum