From: datri@convex.com (Anthony A. Datri)
Subject: Re: X11 include files and libraries on HP-UX
Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
Date: Thu, 16 Apr 1992 03:46:37 GMT
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

>Personally, I think this configuration makes a lot of sense. It keeps the 
>various versions (R4, R5, Motif1.1, Motif1.2) separate and lets you use 
>whichever version you need (or prefer.)

As I understand HP's implementation of shared libraries, a binary has to find
a shared library at the same pathname at compiletime and runtime.  Thus,
if I link some random program (say, xloadimage) against a library in
/usr/lib/X11R4, it'll stop working when I punt R4 and put in R5.  This means
that I have to recompile *everything* when upgrading, or else make a symlink
from /usr/lib/X11R4 to /usr/lib/X11R5, which would be bogus.  Toss in
the potential for hundreds of centrally-managed machines getting these
binaries through rdist (which I had to build myself, alas) and it becomes
a real nightmare.

I like the scheme of having /usr/{lib,bin,include}/X11 point through a
machine-specific symlink to a single directory (wherever it may happen to
be) containing the entire release.  This way I need only move one symlink
to change what a machine sees, and I don't have to spend a lot of time
explaining changing paths to my users, and I don't have all my makefiles
breaking at each release.

Another problem is the Xaw library -- it isn't binary-compatible between
R4 and R5.  This means that an Xaw client (say, xpostit) *must* be
recompiled at exactly the same time as the switch to R5.  This means that
a *lot* of recompilation has to be done before the switch can happen, and
that I have to either jump through hoops with rdist during the transition
or attempt to transition the entire population at once.

Sun's shared library scheme, while not without its own problems, allows
me to handle these problems.  Binaries can find libraries at the compiletime
path, but can also search along a list of directories specified in the
LD_LIBRARY_PATH environment variable.  Although that name is a real pain to
type, it affords me quite a bit of flexibility -- especially when I have to
run normal X clients against Sun's xnews server.  Sun's scheme also lets
me dance around the R4/R5 Xaw problem -- their libraries have explicit,
externally-visible major and minor version numbers.  Their dynamic linker
will run a binary against a shared library with the same major number,
issuing a warning if the library is of a lower minor version than the one
against which the binary was compiled.  A library with a different major
number than the one against which the binary was compiled is effectively
ignored, and cc/ld automagically select the highest-versioned available
library when compiling.  Thus, all I need do to resolve the problem with
existing Xaw binaries is to place the R4 Xaw lib (libXaw.so.4.something)
in the new R5 lib directory along with the R5 library (libXaw.so.5.something).
R4-compiled binaries will find the R4 library; R5-compiled binaries will
find the R5 library, and new compiles will find the R5 library automagically.
All in all, quite a serendipitous arrangement.

Another, disjoint problem is that -- as far as I can tell -- one has to
pay HP for the Motif libraries in order to get the X11R4 include files.
If I do this, and also put some third-party software (like Frame) that
has the @@@#$ libraries statically-linked in on the same machine, I pay
for the same OSF license multiple times.  If I happen to have a Motif
site license, it's even worse.

Another problem still is that -- as far as I can tell -- there's no static
libX11 available as part of the product.  This makes the compilation of
gnumacs difficult, since it seems to insist on linking statically against
everything.



Please don't think that I'm flaming HP here, or that I'm praising Sun.
I'm a fairly-new entrant into the realm of directly supporting modern
HP's, and I'm just expressing concerns and relating experiences.  Our
HP customer-service rep is a prince of a guy, but he hasn't come up with
a scheme yet for me to convey such concerns or explicit bug reports in
a fashion that doesn't involve phone tag.  I'm sure that HP's phone support
people are great guys, but they're busy and I'm busy, and phone tag is
inevitable. 
-- 


======================================================8--<
From: morrell@hpcuhe.cup.hp.com (Michael Morrell)
Date: Thu, 16 Apr 1992 06:29:24 GMT
Subject: Re: Examine core files
Organization: Hewlett Packard, Cupertino