Compiling Mosanim/Mosaic dynamically for Solaris 2.4 - HOWTO

Compiling Mosanim/Mosaic dynamically for Solaris 2.4 - HOWTO

Post by R. Stewart Ell » Fri, 28 Apr 1995 04:00:00



Now that Solaris 2.4 comes with Xm, there is no reason to put up with the
absurd practice of the NCSA folks of linking Mosaic statically.  Among other
things, they link in all the X libs statically, where it would be much
better to just do this with the Motif libs.  Although there are some serious
incompatibilities between Solaris 2.3 and 2.4, such as gethostbyname(), I
suspect that many of the problems they report in the README-2.5.solaris
file, or whatever it is called, would clear up if they linked as many libs
dynamically as possible.  I have always also thought it was rather bizarre
that NCSA sets everything up for MIT X11, even though most Sun users run
standard OW, whichever release comes with their system.

Among other things, the unoptimized, stripped version of Mosanim is only
800K.  The following Makefile.solaris patch is for the Mosanim distribution,
but I suspect it will also work with most other recent releases of Mosaic
for X.  It is setup for bone stock OW 3.4 and SunOS 5.4.  This patch assumes
you are running GCC, and it will work with LD_LIBRARY_PATH nulled out,
because I have used the -R/libdir directives.  As it sits, it sets -g for
the compiler.

I hope the rest of this is acceptable as input to patch.  I did it with diff
-c on a Solaris 2.4 machine, using the standard Sun diff.  I have not tested
this very much yet.

*** Makefile.solaris.DISTR      Wed Apr 26 09:52:02 1995
--- Makefile.solaris    Wed Apr 26 10:05:25 1995
***************
*** 52,58 ****
  #### For Dell SVR4:
  # syslibs = -lnsl -lsocket -lc -lucb
  #### For Solaris (2.x)  --nsl does not link correctly staticly.
! syslibs = -lnsl /usr/lib/libsocket.a /usr/ccs/lib/libgen.a
  # /usr/lib/libelf.a /usr/ucblib/libucb.a
  #### For Motorola SVR4:
  # syslibs = -lnsl -lsocket -lgen
--- 52,59 ----
  #### For Dell SVR4:
  # syslibs = -lnsl -lsocket -lc -lucb
  #### For Solaris (2.x)  --nsl does not link correctly staticly.
! #syslibs = -lnsl /usr/lib/libsocket.a /usr/ccs/lib/libgen.a
! syslibs = -lnsl -lsocket -lgen
  # /usr/lib/libelf.a /usr/ucblib/libucb.a
  #### For Motorola SVR4:
  # syslibs = -lnsl -lsocket -lgen
***************
*** 70,76 ****
  #### BSD/386
  # xinc = -I/usr/X11/include
  #### Solaris 2.x (Patched X11R5 and Motif libs)
! xinc = -I/opt/X11R5/include

  #### X library locations.
  # xlibs = -lXm_s -lXmu -lXt_s -lX11_s
--- 71,78 ----
  #### BSD/386
  # xinc = -I/usr/X11/include
  #### Solaris 2.x (Patched X11R5 and Motif libs)
! #xinc = -I/opt/X11R5/include
! xinc - -I/usr/openwin/include/ -I/usr/dt/include

  #### X library locations.
  # xlibs = -lXm_s -lXmu -lXt_s -lX11_s
***************
*** 85,93 ****
  #### For Dell SVR4:
  # xlibs = -L/usr/X5/lib -lXm -lXmu -lXt -lXext -lX11
  #### For Solaris (2.x) (Use static to go from machine to machine)
! xlibs = /opt/X11R5/lib/libXm.a /opt/X11R5/lib/libXmu.a /opt/X11R5/lib/libXt.a
! xlibs += /opt/X11R5/lib/libXext.a /opt/X11R5/lib/libX11.a
! xlibs += /usr/lib/libm.a
  #### For SCO ODT 3.0 (I'm told that -lXtXm_s is *not* a typo :-):
  # xlibs = -lXtXm_s -lXmu -lX11_s
  #### For nearly everyone else:
--- 87,97 ----
  #### For Dell SVR4:
  # xlibs = -L/usr/X5/lib -lXm -lXmu -lXt -lXext -lX11
  #### For Solaris (2.x) (Use static to go from machine to machine)
! #xlibs = /opt/X11R5/lib/libXm.a /opt/X11R5/lib/libXmu.a /opt/X11R5/lib/libXt.a
! #xlibs += /opt/X11R5/lib/libXext.a /opt/X11R5/lib/libX11.a
! #xlibs += /usr/lib/libm.a
! xlibs = -L/usr/openwin/lib -Xlinker -R/usr/openwin/lib -L/usr/dt/lib
! xlibs += -Xlinker -R/usr/dt/lib -lXm -lXmu -lXt -lXext -lX11 -lm
  #### For SCO ODT 3.0 (I'm told that -lXtXm_s is *not* a typo :-):
  # xlibs = -lXtXm_s -lXmu -lX11_s
  #### For nearly everyone else:

--
  R.Stewart(Stew) Ellis, Assoc.Prof., (Off)810-762-9765   ___________________
  Humanities & Social Science,  GMI Eng.& Mgmt. Inst.    /   _____  ______

  Gopher,chimera,nn,tin,jove,modems, free code is best!/________/ /  /  / /

 
 
 

1. Mosaic: any compiled and running it under Solaris x86 2.4?

I've been able to compile it, but it dies before openning any windows.

486DX2/66, 1540c SCSI, Cirrus Logic VLB VGA
2.4 FCS

Thanks.

---
--Leonard E. Sitongia           HAO Sun Unix System Manager

High Altitude Observatory       P.O. Box 3000 Boulder CO 80307  USA

2. Promise ULTRA66 and no joy

3. Anyone compiled Mosaic under 2.4?

4. Bad nfs write performance with HP, any idea?

5. Help with NCSA Mosaic 2.4 on Solaris

6. X keyboard events out of sequence

7. Mosaic for Solaris x86 2.4?

8. Acer 332T and XF86_SVGA problem

9. Mosaic and Solaris 2.4

10. Mosaic server (cern) server on solaris x86 2.4?

11. Mosaic for Solaris 2.4 x86

12. Solaris x86 and NCSA Mosaic 2.4--SOLVED!

13. NCSA X Mosaic 2.6b2 for Solaris 2.4