Re: Shared library inter-dependencies

2003-09-06 Thread Matthieu Herrb
I wrote (in a message from Friday 5)

  inter-dependencies are both good and bad. 
  It's a good thing to list them at build time, It helps finding some
  kind of conflicts. 
  OTOH, one should not rely on them to prune the list of libraries used
  to link an executable. First, this will break on static only build
  (yes there are still systems without shared libs these days), and then
  it can cause weird failures at run-time if the linker does not walk
  the full dependencies. 
  
  So the *Lib.tmpl should be fixed to describe correct dependencies (on
  Darwin it's strictly required) and Imakefiles should list the full
  dependencies too. 
  

Hmm I forgot one point: sometimes you don't want to specify full
dependencies for a library since there can be 2 differents libs
capable to satisfy the dependency and you want to chose at application
link time. 

The most current exemple is -lc_r vs -lc (or -lXThrstubs vs
-lpthreads) on some systems for threaded vs non-threaded applications.

Matthieu
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Shared library inter-dependencies

2003-09-06 Thread Kean Johnston
The most current exemple is -lc_r vs -lc (or -lXThrstubs vs
-lpthreads) on some systems for threaded vs non-threaded applications.
I'm talking about inter-X11 dependencies. Xext *always* depends on X11.
SM *always* depends on ICE. That kind of thing. Its a simple matter of 
ELF shared object inter-dependencies. Dont forget, any RTLD worth its 
salts wont even load the symbols from the dependent library until it 
needs to, unless the user has explicitly told it to bind all symbols.

Kean

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Shared library inter-dependencies

2003-09-05 Thread Kean Johnston
Hi,

I asked this once before but unfortunately I lost the reply when I moved 
to Mozilla for my mail reader, so I'd like to ask the question again, or 
open up the debate.

I would very VERY much like to see the XFree86 build correctly set up 
its dependencies for shared libraries. For example, make sure that Xext 
always has X11.so.6 as a dependency. This makes life a lot easier for 
folks, and obviates the need for linking with the same library many 
times (not all systems are thus flawed, but many are).

Ideally, each library should be build with -z text, so that it has no 
unresolved relocations. I believe that Darwin actually requires this (if 
I remember the previous reply to this question correctly), so there is 
at least some precedent in the build for handling this. If this is true, 
and these inter-dependencies are already addressed for Darwin, then it 
will most probably be a simple matter of adjusting the required 
*Lib.rules files to link against the dependent libraries.

Comments? Suggestions?

Kean

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel