[Graph logo] Installing Lsd on Mac OSX



The Laboratory for Simulation Development is an open-source program that, in principle, will work under any computer operation system. However, it is most easy to install under Unix and Windows. John R. Chang has developed an easy procedure for installing a functioning version of Lsd 5.5 under Macintosh OSX.
 
Introduction:

For those who have some knowledge about the functioning of Mac OSX, Lsd, and Tcl/Tk, the following procedure can be used directly. Others will want to consult Matthieu Farcot's note on installing Lsd on OSX that was written in 2003. However, they should probably not follow Farcot's procedure but turn to the present one after having read his note.

John Chang's procedure is tested with Mac OS X v10.4 (Tiger), but may work on Mac OS X v10.3 (Panther), too. Not all Lsd functionality has been tested on Mac OS X, but at least the basics work.

The procedure:

  1. Install X11.
  2. Download and expand Lsd sources
    http://www.business.aau.dk/~mv/Lsd/Lsd5_5linux.zip
    
    
  3. Go into the Lsd5.5 directory. Then save this patch file (which only works as long as Marco Valente does not change the source file!): Lsd5.5-macosx.diff
    
    
  4. Launch Applications > Utilities > X11
    
    
  5. cd to the Lsd5.5 directory and
            $ patch -p1 < Lsd5.5-macosx.diff
            $ make -f makefile.ln
            $ ./lmm
  6. Pick a model, then change Lsd's System Compilation Options as follows:
    LSDROOT=/###INSERT YOUR PATH TO###/Lsd5.5
    TCL_VERSION=8.4
    TK_VERSION=8.4
    DUMMY=-L/usr/X11R6/lib -lX11 -ldl -lstdc++
    PATH_TCL_LIB=/usr/lib
    PATH_TK_LIB=/usr/lib
    PATH_TK_HEADER=/usr/include
    PATH_TCL_HEADER=/usr/include
    PATH_LIB=/usr/lib
    INCLUDE_LIB=-I/usr/include
Explanation of the diffs:
  • Library/header paths and linker options are of course different from platform to platform.
  • The Mac OS X implementation of tk_getOpenFile doesn't support the - initialfile option
  • The Unix version of Lsd hard-codes "konsole" and "mozilla" helper apps which don't exist on Mac OS X. The equivalents are "xterm" and "open". The diffs are a dirty hack to work around this; the proper fix would be cleaner...
  • The a.bat temporary script needs +x permissions.
The result:

Lsd on Mac


Maintained by Esben Sloth Andersen, email: esa@business.aau.dk.
Revision: 19 March 2006, 10:27.