Shared lib versions of X11, Xt, Xmu, etc?

Thomas Roell roell at informatik.tu-muenchen.de
Tue Feb 12 03:35:44 AEST 1991


>Is there any particular reason why Interactive doesn't have shared versions
>of the X libraries?  We've been trying to roll our own from the MIT source,
>but keep bumping into one problem after another (maybe ISC has, too!).
>Programs link okay, but give various mysterious errors at run time
>(e.g. inheritance problems, sometime just core dumps)

Yes, there is for a commercial vendor a BIG reason why not to use shared libs:
They are very incompatible. If you change only a little bit in the sources, there
might be big changes in the shared lib. You can avoid this using the branch-tab
for functions, but data-items that are exported are *very* problematik.

Also without SPECIAL programs that aid developing of a shared lib, I think it's
impossible to make a good (compatible, working ...) one. But these tools are not
part of SVR3. It took me about 2 months to develope such a beast.

>The reason this is cross-posted to comp.windows.x is to ask if there's
>anything inherent in the Xlib or Xt code which would preclude them from
>easily being made into shared libraries?

Xlib: trivial
Xt:   needs some changes to avoi exported data in the shared lib.

>When you're running several copies of a program which is over 1 Mb in memory,
>you start wishing for the promised land of shared libraries.

That's true. I use often the XView 2.0 toolkit. The target shared lib of this
toolkit is over 600k big. A client linked without shared lib is over 1MB. 
But keep in mind that only the text-section is shared; ever process has the
data-section private. Therfore some X-clients use MORE physical memory when using
shared libs. But on the other hand are the clients much faster, cause the all
use the SAME shared libs, and the chances that these executable sections are in
core are much higher (thus reducing paging).

BTW, there is a sample implementation of shared X-Windows libs freely available.
Its part of a package called X386.

- Thomas

--
_______________________________________________________________________________
E-Mail (domain):	 roell at lan.informatik.tu-muenchen.de
UUCP (if above fails):   roell at tumult.{uucp | informatik.tu-muenchen.de}
famous last words: "diskspace - the final frontier..."



More information about the Comp.unix.sysv386 mailing list