Summary: Installed location of X11R5/Motif on Sun's Solaris2.

From: Antonio Freixas (tonyf@ims.com)
Date: Mon Nov 29 1993 - 16:17:11 CST


A while back, I posted the following message:

  We have a problem which I believe other Motif products will run into.

  We ship X11R5/Motif1.2 products for Suns. On Solaris1, we link all X11
  and Motif files dynamically, since we neither X11R5 nor Motif1.2 is
  present on our customers systems. Starting with Solaris2.3, we can
  consider the option of dynamically linking the X11 libraries.

  If we continue to statically link these files (say, because Sun has
  tinkered with the files or fallen behind on their patches), we run
  into the problem that our X11 libraries will have certain locations
  hardcoded into them. Some of these are:

      the location of the XKeysymDB file
      the location of the app-defaults directory
      the location of the nls directory (for Xsi support)

  The question is: for those system administrators building and
  installing X11R5 on Solaris2 machines, do you build X11R5 to reside
  in:

      /usr/bin/X11, /usr/lib/X11, etc.?
      /opt/X11R5?
      /usr/openwin?
      Somewhere else?

  Even if we allow for dynamically linking the X11 libraries, the Motif
  library also has a hard-wired location: the Xm/bindings directory.
  Until Solaris2 supports the COSE environment, we won't be able to rely
  on a dynamic Motif library available for all our customers, so the
  location problem remains.

  Please reply by e-mail and I will summarize. I would be particulary
  curious about 3rd party Motif suppliers such as IXI. For example, we
  purchased the Solaris2 version of UIMX. It included a copy of X11R5
  and Motif1.2, hardwired to live in the standard /usr directory.

The second line of the second paragraph should read: we link all X11
and Motif files *statically*.

                                * * * *

My own interpretation of the replies I received are:

  1) While /opt/X11R5 is a reasonable place for X11R5 on Solaris2,
     there is no agreement that this is a "standard" place. It could
     as reasonably be /opt/x11, /opt/x11r5, /opt/X11r5, etc. More
     often, the install location for X11R5 was /usr/local/X11,
     /usr/local/X11R5, /var/X11/R5, etc.

     Given the lack of agreement, /opt/X11R5 is probably not a useful
     install location to hardcode into statically linked libraries.

  2) A number of sysadms replied that they created links from the
     "standard" /usr X11 locations to their actual installed X
     location. They did this in order to support statically linked
     third party programs.

     Looking at Solaris2 programs on my own system, I noticed that
     most statically linked programs had hardcoded paths to the
     default /usr locations.

     Finally, some X11R5/Motif re-distributors (but not all) appear to
     build X11R5 to live in the /usr location. IXI provides a script,
     built at install time, which each user must include in their
     .cshrc file if the IXI distribution is not installed in the
     standard location.

The actual replies received are appended to the end of this message.

                                * * * *

There are two ways for a sysadm to deal with statically linked 3rd
party X11/Motif executables:

  1) Install links from the static libraries' X11 install locations to
     the actual X11 location.

        + Most 3rd party software assumes an X11 location of /usr, so
          only one set of links needs to be created.

        + The user does not need to change anything in order to run
          the software.

        - There is no guarantee that all 3rd party software assumes a
          location of /usr, so multiple sets of links might be
          required.

      As an example, I believe (but do not guarantee) that if I have
      3rd party software with static X11/Motif libraries built for the
      default /usr locations and if my X11/Motif installation is in
      /opt/X11R5, the following links are sufficient to run the
      software:

        ln -s /opt/X11R5/lib/X11 /usr/lib/X11
        ln -s /opt/X11R5/lib/Xm /usr/lib/Xm
        ln -s /opt/X11R5/include/X11/bitmaps /usr/include/X11/bitmaps

  2) Provide users with a set of environment variables that define
     where X11 is installed.

        + Works with all statically linked X11R5/Motif software,
          regardless of where the static libraries think X11 lives.

        - Each user must define these variables in order for X
          applications to work. Errors may not immediately occur for
          some applications if the variables are undefined. When they
          do occur, the reason for the problem may not be obvious to
          the user.

     I believe that the minimum environment variables needed (along
     with the default /usr locations) are:

        XFILESEARCHPATH /usr/lib/X11/%L/%T/%N%C:\
                                /usr/lib/X11/%l/%T/%N%C:\
                                /usr/lib/X11/%T/%N%C:\
                                /usr/lib/X11/%L/%T/%N:\
                                /usr/lib/X11/%l/%T/%N:\
                                /usr/lib/X11/%T/%N
        ERRORDB /usr/lib/X11/XErrorDB
        KEYSYMDB /usr/lib/X11/XKeysymDB
        XNLSPATH /usr/lib/X11/nls
        XLIBI18N_PATH /usr/lib/X11
        XBMLANGPATH /usr/include/X11/bitmaps
        XCMSDB /usr/lib/X11/Xcms.txt
        XMBINDDIR /usr/lib/Xm/bindings

                                * * * *

My recommendation for 3rd party software providers using statically
linked X11R5/Motif libraries is to build the libraries to live in the
standard /usr locations.

                                * * * *

Finally, I examined the possibility of dynamically linking in at least
the X11 libraries on Solaris2.3. The advantage is that this would use
the user's own X11 libraries, which would know where they are
installed.

The problem is that Sun's dynamic libraries' version numbers don't
match that of our X11 build which was generated using the Solaris2
contrib patches. According to one correspondent, IXI's version
numbers are also different. This defeats one of the advantages of
dynamic libraries since a program dynamically linked with my X11 build
will not run with the OpenWindows libraries (i.e. the libraries won't
be found) and vice versa.

                                                 -- tonyf@ims.com
                                               (503) 626-7117 x1349

Following are the responses I received to my original query. Thanks to
all who replied.

******************************************************************************

From: Dave Wilmot <dawi@is-rocker.gwl.com>

I believe the problem/question is really a simple "File System
Design" question. The answer is also simple; this unbundled software
should go in /opt/tools.

All unbundled software should whenever possible go into /opt.

I even link /usr/openwin ---> /opt/tools/openwin

******************************************************************************

From: koontz@bldr.nist.gov (John E. Koontz X5180)

In article <1993Nov15.195740.26886@ims.com> you write:
|> The question is: for those system administrators building and
|> installing X11R5 on Solaris2 machines, do you build X11R5 to reside
|> in: ..

We're still using SunOS 4.1.3, but our usual practice is
/usr/local/X11, and subdirectories thereof, with links to these
subdirectories from /usr/bin/X11, etc. It's intended to provide an
environment that supports both common views of how to do the
installation. An alternative I've seen (on a Convex) is /usr/X11,
with links as above. I've also seen a Cray which had X11 actually
installed in /usr/bin/X11, etc., per the distribution defaults. Note
that /usr/local/X11 is actually a link to /usr/local/X11R5 (or
X11R4). I can't see why we would change this under Solaris 2.

For historical reasons, we consolidate the X files in /usr/lib and
/usr/lib/X11 in /usr/local/X11/lib. Links to the shared object files
are in /usr/local/lib.

******************************************************************************

From: bingle@cs.purdue.edu (Richard Bingle)

I built X11R5 for 8 different arch/OS combinations. For us, X11R5 lives
in /usr/local/X11R5 on all of those machines.

/usr/local/X11R5 (binaries)
/usr/local/X11R5/lib (libraries)
/usr/local/X11R5/lib/X11 (arch independent library type stuff, i.e.
                                 app-defaults directory, fonts directory)
/usr/local/X11R5/include (include files)
/usr/local/X11R5/man (man pages)

Unfortunately, we were forced to make /usr/lib/X11 point to our
/usr/local/X11R5/lib/X11 for some third party software to work.

******************************************************************************

From: jgarb@erim.org (Joe Garbarino)

We build X releases in /var/X11/R# (e.g. /var/X11/R5) and Motif in
/var/motif/v# (e.g. /var/motif/v1.2.1). This allows use to have
multiple versions online. This does present a problem with config
files, but we haven't come up with a better way of supporting multiple
versions. This is really a mess that seems like it is crying out for
some environment variables (I think the app-defaults can be handled
with various env variables).

******************************************************************************

From: joe@unipress.com

I'm the guy who puts together the 3rd party Motif development platform for
Solaris 1.x and 2.x from UniPress Software.

I decided that since there were so many hard-wired pathnames in X and Motif,
that all users should make the software appear to be in the same place. I
chose /usr/motif as this place, since there is no /opt in Solaris 1.x.
/usr/openwin is out, since we ship X libraries as well as Motif libraries, and
the ones we ship conflict with the ones in OpenWindows. Users can install the
sofware anywhere they want on their network, so long as they make a symbolic
link from /usr/motif to the motif/ directory they unload from the tape we ship
them. Solaris 2 customers who are big on putting things in /opt can either
install the stuff in /opt/motif and make the link from /usr, or install the
stuff somewhere else and make links from /opt and /usr.

> Even if we allow for dynamically linking the X11 libraries, the Motif
> library also has a hard-wired location: the Xm/bindings directory.

I'm not sure about this, but I think that the actual information is dredged
out of Xm/bindings and put into server properties by the mwm window manager
(or a separate program, xmbind). In this case, chances are good your
application won't rely on it.

In some non-obvious cases, hard-wired pathnames can be overridden with
environment variables. Also, there are many hard-wired pathnames in the
library that never get used by most applications. In short, this may not be
as big of a problem for you as you think.

******************************************************************************

From: nsche@atc-1s.hac.com (Norman Scherer)

We build and install X11R5 in /home/x11r5/... but end up putting links
in /usr/lib/X11 just to make things work that have paths fixed in them. There
is no way we have found to install products without having those paths. They
are needed for bitmaps if nothing else.

******************************************************************************

From: Chris Flatters <cflatter@aoc.nrao.edu>

The usual installation point for X11R5 under Solaris 2.x is /opt/X11R5
but, of course, system managers may put it anywhere they want. This
may not be a problem since OpenWindows 3.2 on includes X11R5 libraries
(so you could have dynamically linked everything except the Motif
libraries under Solaris 2.2). If you dynamically link the X11
libraries you should use the OpenWindows versions to avoid confusion
(the MIT versions use a different version numbering scheme so you
can't swap between them by setting LD_LIBRARY_PATH as under Sun OS
4.x).

SunSoft's Motif distribution lives under /opt/SUNWmotif.

If you still want to link statically, I would recommend that you go
with the IXI developers' pack. IXI have added a number goodies to the
Motif and X11 libraries, including the ability to specify the
locations of XKeysymDB using environment variables. These feature has
been removed from the SunSoft distribution.

By default, IXI installs into /usr/bin/X11 etc. but can be installed
anywhere.

******************************************************************************

From: guy@x.co.uk (Guy Singh)

> We ship X11R5/Motif1.2 products for Suns. On Solaris1, we link all X11
> and Motif files dynamically, since we neither X11R5 nor Motif1.2 is
> present on our customers systems. Starting with Solaris2.3, we can
> consider the option of dynamically linking the X11 libraries.
>
> If we continue to statically link these files (say, because Sun has
> tinkered with the files or fallen behind on their patches), we run
> into the problem that our X11 libraries will have certain locations
> hardcoded into them. Some of these are:
>
> the location of the XKeysymDB file

      An environment variable "XKEYSYMDB" can be used to point to this.

> the location of the app-defaults directory

       Use XFILESEARCHPATH to manipulate this.

> the location of the nls directory (for Xsi support)
>

       Use XNLSPATH

> The question is: for those system administrators building and
> installing X11R5 on Solaris2 machines, do you build X11R5 to reside
> in:
>
> /usr/bin/X11, /usr/lib/X11, etc.?
> /opt/X11R5?
> /usr/openwin?
> Somewhere else?
>

  Assume nothing about the place of installation unless you force it on
  the user e.g. some packages allow you to specify a directory for
  installation, but always create a link in /opt.

> Even if we allow for dynamically linking the X11 libraries, the Motif
> library also has a hard-wired location: the Xm/bindings directory.
> Until Solaris2 supports the COSE environment, we won't be able to rely
> on a dynamic Motif library available for all our customers, so the
> location problem remains.
>
   XMBINDDIR is the env var that allows you to control locating
   of the bindings directory.

******************************************************************************

From: barrie@x.co.uk (Barrie Cooper)

The simplest way to solve this is to install everything
Motif 1.2 and X11R5 into a single place and then export
a number of environment variables for instance.

# Location of Motif and X11R5
export MOTIFHOME=/opt/motif
# Location of C/Codeset
export XLIBI18N_PATH=$MOTIFHOME/lib
# Location of bitmaps
export XBMLANGPATH=$MOTIFHOME/include/X11/bitmaps/%B
# Location of X and Motif libraries
export XLIBDIR=$MOTIFHOME/lib
# For Sun linker
export LD_LIBRARY_PATH=$MOTIFHOME/lib
# For X and Motif config files
export XFILESEARCHPATH=$MOTIFHOME/lib/%T/%N%S:$XFILESEARCHPATH

you may have to alter the above paths to suit your
own particular installation.

******************************************************************************

From: drk@osf.org

> Even if we allow for dynamically linking the X11 libraries, the Motif
> library also has a hard-wired location: the Xm/bindings directory.
> Until Solaris2 supports the COSE environment, we won't be able to rely
> on a dynamic Motif library available for all our customers, so the
> location problem remains.

In Motif 1.2 the environment variable XMBINDDIR can be used to specify
the directory for looking up fallback virtkey bindings. Only if this
variable is unset is "/usr/lib/Xm/bindings" used.

******************************************************************************

From: astewart@vigs.com (Allan Stewart)

Tony,
  I've been wondering about this also. It seems that Sun has taken the
position of prefering to put all "optional" (I don't consider X optional)
software under /opt. I guess this is ok, and it does make nfs mounting
optional stuff just a tad neater (although not any more efficient).
  Although I haven't done any Motif delelopment yet on this setup,
what I have done is to install the software under /opt and make
symbolic links to it from the "standard places" like /usr/lib/X11.

******************************************************************************

From: Per Andersson <ppan@celsiustech.se>

I'm not about to purchase anything from you, but I can share my thoughts
and problems with you. I would put X in /opt/X11R5, or /usr/local/X11R5,
with symbolic links from /opt/X11, or /usr/local/X11. I would also be very
upset to get a statically linked application, because the non-existent support
for compose-key processing in MIT-X11 forces us to use our own Xlib. We are,
as you may have noted in Sweden. Motif is enough of a problem as it is,
shipping it's own library. Multi-vendor/non-US computing with X isn't easy.
(VMS, SunOS4, SunOS5, AIX etc.)

******************************************************************************

From: jarvelai@uranus.csc.fi (Pekka J{rvel{inen)

>installing X11R5 on Solaris2 machines, do you build X11R5 to reside in:

/usr/X11R5 (it's project root default)

but I didn't understand problem. System admistrator can always make
link to anywhere for example /p/X5 (Our company standard)



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:30 CDT