Consultor Eletrônico



Kbase 8181: Building Progress/X w/ OpenWindows: can't find library
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Building Progress/X w/ OpenWindows: can't find library

910821-elp02
There are two problems with building an X Windows
version of Progress on
Sun platforms that perhaps should be explained
in the technical notes.
They both are caused by using OpenWindows to
build Progress, as opposed
to using Motif or vanilla libraries from MIT.

Problem One
-----------
This problem is a result of Sun not shipping a
statically loadable X library (libX11.a) with
OpenWindows on Sparc 2 workstations.

Some customers will try to build an
X Windows version of Progress
using the OpenWindows libraries
that Sun ships on every Sparc 2.
Because Sun does not ship a statically
loadable X library, customers
will not be able to link X statically
(which is our default).

Therefore, $PROLOAD/eucapp/buildenv must
be changed to load dynamically
when on a Sparc 2 loading with OpenWindows.

before:
LDOPT="-Bstatic"

after
LDOPT="-Bdynamic"

Problem Two
-----------
This problem is a result of Sun not
installing X libraries in /usr/lib.

When linking any generic executable,
the Sun linker will search the
standard directories /usr/lib and
/usr/local/lib when looking
for shared libraries to load.
The environment variable LD_LIBRARY_PATH
can be used to add additional libraries to
search for shared libraries.
Should X not be installed in /usr/lib,
LD_LIBRARY_PATH can be employed
to force the linker to look elsewhere.

When running the executable, LD_LIBRARY_PATH
is used again to find the
shared libraries to dynamically link.
As before, should X not be installed
in /usr/lib, LD_LIBRARY_PATH can be employed.

Unfortunately, if the executable starts up
as root (as Progress does),
LD_LIBRARY_PATH is ignored
when the executable is run. Consequently,
if the X libraries are not stored in /usr/lib,
the libraries will not be found,
and the executable cannot be run.

To get around this problem, load scripts
on Sun platforms will reference
an environment variable XLIBPATH.
Should the X libraries not be in
/usr/lib (Sun ships them in /usr/openwin/lib),
this variable can be
set to the actual location of the X libraries.

XLIBPATH="-L/usr/openwin/lib"

This should be done in $PROLOAD/eucapp/buildenv.

Using this method, the executable will
contain the full path name of the
shared library, and the executable can be run on that host.

This is a relatively new addition planned for 6.3,
therefore most customers do
not have this variable in their load scripts.
In that case, customers
can manually modify the script using
vi after it has been generated by
probuild to add the -L explicitly.

before:
-lX11
after:
-L/usr/openwin/lib -lX11
Progress Software Technical Support Note # 8181