Vis5D for Mac OS X

Last modified: Mon Nov 14 18:11:41 2005


I've gotten Vis5D to compile, but the process to do so is a bit ugly. I'm using vis5d+, the 1.3.0 beta source distribution from http://vis5d.sourceforge.net/.

Need to have netCDF libs installed; use fink to get them. "absoft" packages are apparently designed to work with the compilers from that company, so if you don't have those compilers, don't get those packages (get the vanilla ones instead).

Also need to have GL libraries installed in /usr/X11R6/lib. Check for existence of libGL.a, libGLU.a in that location. I'm not sure if these came to me via fink or when I installed X11.


Thanks, Sander! Sander Houweling and I got vis5d running on his mac after a little back-and-forth. In the process, we learned that (a) you apparently don't need libmix (a.k.a. mixkit), and (b) you must have g77 installed. Sander had the Absoft fortran compiler installed on his machine, and some of the vis5d code would not compile because it assumes that one is using g77. By installing g77 from fink, he was able to get configure and make to run all the way through. (5 Jan 2004)

Once you have these prerequisites, follow the following instructions:


  (1) Fix the "configure" script in the base directory.  This follows
  the porting tips document on fink.sourceforge.net for libtool-1.4.
  The diff below shows the (one-line) edit.

--- configure~  Wed Apr 10 22:58:33 2002
+++ configure   Mon Jan 27 14:32:06 2003
@@ -5141,7 +5141,7 @@
     ;;

   darwin* | rhapsody*)
-    allow_undefined_flag='-undefined suppress'
+    allow_undefined_flag='-flat_namespace -undefined suppress'
     # FIXME: Relying on posixy $() will cause problems for
     #        cross-compilation, but unfortunately the echo tests do not
     #        yet detect zsh echo's removal of \ escapes.

  For those not familiar with diff output, this means that line 5141
  needs to have "-flat_namespace" added to it.  You change it from looking 
  like the line prefixed with '-' to looking like the line prefixed
  with '+'.

  (2) There is a conflict between the round() function provided in the
  Vis5D source, and a function of the same name in the OS X system
  library.  One way to resolve this is to rename the Vis5D function.
  I chose to rename it to v5d_round().  You need to edit three files
  to do this, all of them in the "src" directory:

./src/misc.h
./src/misc.c
./src/work.c

  In all cases, change the instances of round( to v5d_round( .

  I don't know why there is an "extern" declaration for this function in
  misc.h, but apparently no regular declaration anywhere else.


  (3) Use the following "configure" options:

setenv CPPFLAGS "-I/sw/include -I/usr/X11R6/include"
setenv LDFLAGS "-flat_namespace -L/sw/lib -L/usr/X11R6/lib"
./configure --prefix=/usr/local --with-netcdf=/sw/lib
make

  (4) The make command will still fail on sequential calls to libtool
  for linking the final executables.  For some reason, the libtool
  call issues a double "-o executable_name".  First, change to the
  "src" subdirectory.  Then copy & paste the libtool command
  but before executing the command, make sure to edit out the second
  "-o" part. This happens sequentially for each executable.

  See this email exchange if you don't understand this step.

  (5) make install




Andy Jacobson webmaster@tazman.princeton.edu