[NTLUG:Discuss] apt-get, rpm and library versioning

Burton Strauss Burton_Strauss at comcast.net
Mon Jun 27 07:37:17 CDT 2005


 

-----Original Message-----
From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org] On Behalf
Of Kevin Brannen
Sent: Sunday, June 26, 2005 10:16 PM
To: NTLUG Discussion List
Subject: Re: [NTLUG:Discuss] apt-get, rpm and library versioning

Burton Strauss wrote:

>Yes, but the reality of the gnu tools makes statics very difficult.

If you can explain that, I'd love to know more.  I know of no reason why it
should be difficult, at least technically.  Now they may be made bad
architecture decisions in the way they put their libs together so it's not
possible to create a sequential order for the libs to be listed (i.e. they
have circular dependencies), but static linking in and of itself is quite
easy, especially on Linux.

B3: Alright, call it counter intuitive.  If I list libxxxx.a on my link
line, I sort of expect that to be honored.  But it's not - if there is a
libxxxx.so out there.  Unless - as you point out - you give the -static
option.  But, that's an all or non option.  From man ld:

       -Bstatic
       -dn
       -non_shared
       -static
           Do  not  link  against  shared  libraries.  This is only
meaningful on platforms for which shared
           libraries are supported.  The different variants of this option
are for compatibility with  vari-
           ous  systems.   You  may  use  this option multiple times on the
command line: it affects library
           searching  for  -l  options  which  follow  it.   This  option
also  implies   --unresolved-sym-
           bols=report-all.


So I can't - without some really ugly gyrations - link in statically only
the library that I have versioning problems with and dynamically link the
rest of them...

This isn't an abstract problem, we've had versioning problems with two
libraries, but let's not muddy waters pointing fingers.

<snip />

-----Burton





More information about the Discuss mailing list