I believe the entry at
 http://nsnam.isi.edu/nsnam/index.php/Troubleshooting
 is somewhat misleading about compiling nsallinone-2.32 on Mac OS X
 Leopard 10.5.2.
 I do not believe there is much of a problem at all, just modify the
 ./install script.  I have attached a patch that can be applied with
 patch -p1 < path_to_patch/nsleopard.diff
 All the patch does is to use the same options for Mac OS X (Darwin) as
 Cygwin does
 as far as telling the subprograms where to find the X11 headers and libraries.

 Running stock Mac OS X Leopard 10.5.2 (with further security updates
 from Apple) and Macports
 installed but not in my PATH, I am able to compile successfully all of
 nsallinone-2.32, run the
 ./validate script for ns-2.32 with one platform specific test suite
 failing (Session 3 and Session 4
 of ./test-all-session), and run ns with nam on sample scripts from
the tutorial.

 The difference as far as I can tell between say Tiger and Leopard is
 that Leopard does not include
 the static versions of the X11 libraries in the default Unix location
 (libraries ending with .a).  What
 appear to be older versions of these static libraries are found in the
 more complicated flags suggested
 at the wiki.  The configure scripts for the subprograms check
 explicitly for libraries that end in either
 .a or .so which correspond to the Linux suffixes, but they do not
 check for .dylib which corresponds
 to the Mac OS X suffix for dynamic libraries (or libraries ending in
 .la which correspond to libtool).
 There's another place where the configure script checks for Darwin 7
 and Darwin 8, but not Darwin 9
 which is Leopard.

 Explicitly specifying
 --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include
 and doing absolutely nothing else appears to result in static
 libraries being successfully built and linked.
 I do not even have to alter the environment variable that is the
 equivalent of LD_LIBRARY_PATH
 DYLIB_LIBRARY_PATH
 in my nstest.profile file that sets environment variables:  I just set
 TCL_LIBRARY and PATH, and I
 don't even know if I have to set TCL_LIBRARY.  (Probably a good idea
 since Mac OS X Leopard has
 its own version of Tcl and Tk 8.4.)

 Not only is ns-2.32 apparently working on Leopard, but I am having
 some success porting
 Chih-Heng Ke's extensions of ns2 to work with Evalvid, work that was
 originally done on Cygwin for
 version 2.28.
 http://140.116.72.80/~smallko/ns2/myevalvid2.htm

Reply via email to