LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-22-2003, 11:20 PM   #1
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
How to link to soname?


How do I prevent linking "directly" to a shared library name? I have this problem with some shared libs like openssl when I try to link to the soname but still end up linking to the shared lib name. eg

I have in /usr/lib...
libssl.so -> libssl.so.0
libssl.so.0 -> libssl.so.0.9.6
libssl.so.0.9.6

And when I try to link to libssl.so...
gcc foo.c -lssl -o foo

I would expect 'ldd foo' to give...
libssl.so.0 => /usr/lib/libssl.so.0.9.6 (0x40016000)
...
blah blah

But what I end up with is...
libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x40016000)
^^^^^^^^^
...
blah blah

How do I prevent this? Also some software seem to link to a
specific version of libc. So when I upgrade my libc, things start
breaking.

I've been on Linux for abt a year and I like everything abt it...
except the dependency hell . It's really annoying to have to rebuild packages whenever system packages change. In general, how do most ppl manage these dependencies issues or are rebuilds regarded as a way of life in the Linux world?
 
Old 01-23-2003, 05:35 AM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
apt-get takes care of upgrading packages and dependencies for me
 
Old 01-23-2003, 06:17 AM   #3
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Original Poster
Rep: Reputation: 30
Re: How to link to soname?

Quote:
Originally posted by ugenn
How do I prevent linking "directly" to a shared library name? I have this problem with some shared libs like openssl when I try to link to the soname but still end up linking to the shared lib name. eg

I have in /usr/lib...
libssl.so -> libssl.so.0
libssl.so.0 -> libssl.so.0.9.6
libssl.so.0.9.6

And when I try to link to libssl.so...
gcc foo.c -lssl -o foo

I would expect 'ldd foo' to give...
libssl.so.0 => /usr/lib/libssl.so.0.9.6 (0x40016000)
...
blah blah

But what I end up with is...
libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x40016000)
^^^^^^^^^
...
blah blah

How do I prevent this? Also some software seem to link to a
specific version of libc. So when I upgrade my libc, things start
breaking.

I've been on Linux for abt a year and I like everything abt it...
except the dependency hell . It's really annoying to have to rebuild packages whenever system packages change. In general, how do most ppl manage these dependencies issues or are rebuilds regarded as a way of life in the Linux world?
is that specific to any particular distro? would it work for
oddball distros? i'm using a highly mutated RH system
(basically using only their kernel and libc, everything else
built from src tarball).
 
Old 01-23-2003, 06:19 AM   #4
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by iceman47
apt-get takes care of upgrading packages and dependencies for me
is that specific to any particular distro? would it work for
oddball distros? i'm using a highly mutated RH system
(basically using only their kernel and libc, everything else
built from src tarball).
 
Old 01-23-2003, 06:26 AM   #5
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
Well, apt was created for Debian, but I think you can use it for RedHat's rpm's too. I don't know if it'll work for sources.
RedHat 8.0 has up2date now that updates certain things and Mandrake has something like that too.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Broadcom BCM4401 NIC: Link is Down, Link is up mr.wobble Linux - Hardware 6 08-31-2007 10:48 AM
same soname but different type acidjuice Slackware 11 05-12-2005 03:41 AM
OpenBSD 3.6 install D-Link 300T / D-Link DFE 528TX lesleyb *BSD 2 04-01-2005 06:29 PM
Wake on Lan - Link on b4 power up, No Link light after shutdown? Mark007 Linux - Networking 0 11-20-2004 08:16 PM
eth1... failed; no link present. Check Link? illegalien Linux - Networking 3 11-03-2002 10:46 PM

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

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