home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.soft-sys.khoros
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!cs.tu-berlin.de!fauern!fauna!cnwietho
- From: cnwietho@immd4.informatik.uni-erlangen.de (Carsten Wiethoff)
- Subject: Problems (solved) compiling Khoros with shared libs on Sparc
- Message-ID: <By5v5F.1JB@immd4.informatik.uni-erlangen.de>
- Organization: CSD., University of Erlangen, Germany
- Date: Mon, 23 Nov 1992 08:48:50 GMT
- Lines: 41
-
- I have tried to compile Khoros 1.5 on a Sun Sparcstation2 with shared
- libraries, primarily to save disk space.
-
- There were several problems, which were nontrivial, so I'd like to
- share my solutions with other people trying the same thing.
-
- First of all, the make system is not really made to support shared libs,
- the problem is that a program using one routine of a SHARED Library
- will need all symbols open in this shared Library, not only the
- symbols used in the routine from the shared lib.
- That means for example that every program that is linked to the dynamic
- version of libgeosurf will need liblinpack as well, because there
- is a routine in libgeosurf, that needs linpack.
- Consequently practically all routines need linpack, eispack and fortran
- and math libraries.
-
- Some of the Imakefiles un-cleverly define out "VEXPR=" which for
- the above reason makes the Makefiles fail.
-
- It is important to have the right Version of the Fortran lib, 1.4.1 works,
- 1.4 does not. It says "undefined symbol _MAIN_".
-
- It is equally important to link against the right math lib, use the one
- that comes with Fortran.
-
- The math lib does not exist in shareable form (why not???), but you
- can make a (bad) shared lib from it by extracting the objects from
- it ( ar xv libm.a ) and linking it into a shared lib using ld (ld *.o).
- Of course, use the math library from Fortran.
-
- In the shared version of libXmu two symbols are not defined that are
- needed by libXaw. Fortunately and strangely these symbols are defined
- in an object contained in the non-shared version of libXmu, called
- sharedlib.o. You can extract it, make a shared library from it and
- link it dynamically to all modules requiring X.
- The above is true for the X-Libraries coming with OpenWindows 3.0.
-
- All things working correctly, your binaries will be 16-24kByte typically,
- bin will be 9M with full debugging and symbols and 6M when stripped.
-
- Carsten Wiethoff (pwi@psun3.hmi.de)
-