From: Ian Stokes-Rees (
Date: Tue Jul 20 2010 - 10:07:45 CDT

 A lot of those errors come from the spaceball device. I had the same
problems and had trouble compiling the code. My brutal approach late at
night last week was to rip out any references to spaceball or sball from
the code -- it didn't really work. There should be some pre-processor
flag that will remove the dependencies on this, or the code there to
build it properly (perhaps if you include SBALL in the configuration

Sorry I can't help more. I spent 6 hours last week trying to compile
VMD with Python and CUDA support on OS X, but failed. Reid Van Lehn
(possibly from MIT) sent me his build notes which I include below (I
hope he doesn't mind). Those may get you going in the right direction.




Installation steps (for Mac OS X 10.5.6):

1) Download the source files from CVS. Use the instructions at the VMD
website <>

2) Download other necessary packages. Specifically, I needed Tcl/Tk and
FLTK. You may also need to update X11, and on Linux may need to install
csh and other packages. Google search these to find install packages.

3) Create a lib folder under the vmd directory (which you checked out
from CVS). Here you will install the plugins needed above to create a
self-contained installation.

4) Install tcl/tk and fltk to the vmd/lib folder. Tcl and Tk should be
installed together to the same directory (e.g. /vmd/lib/tcltk). Use the
unix, NOT macosx, installations, and read the README files contained in
the download for installation instructions (do not enable-64bit). FLTK
can also be installed to its own folder in vmd/lib

5) Next, you have to compile the plugins. Even though we are on a 64-bit
machine, we will install the MACOSXX86 architecture, NOT the
MACOSXX86_64, since this is not supported by VMD apparently. To install
the plugins, first edit the Make-arch file in /plugins/. Under the
MACOSXX86 section, remove the NETCDF line (since we do not need this
package for basic functionality), and change the TCL line from
-framework Tcl to -ltcl8.5 since we are using the unix installation of
Tcl and not the Mac OS X framework.

6) Also in the plugins directory, edit the build.csh script. You need to
change the TCLINC and TCLLIB environment variables to point to
vmd/lib/tcltk/include for the former and vmd/lib/tcl/tk/lib for the
latter. Also change the compile architecture to MACOSXX86.

7) Compile the plugins with 'make world.' The build script uses the
gmake command, which invokes GNU make - you may need to download this
for Mac OS X as well (but it comes preinstalled on Linux distributions).
There will be a lot of compilation warnings but hopefully no errors.

8) After compilation is complete, set the PLUGINDIR variable to
/vmd/plugins - on bash this is done using "export

9) Finally, complete plugin compilation using "make distrib" which
copies everything to a folder readable by VMD src. If you get some latex
errors, just hit enter until make distrib is done, and possibly repeat it.

10) Now to configure the actual installation! cd to the /vmd/ directory
and run 'make macosx.opengl.x11' - this creates a configure.options file
with basic configuration flags.

11) Edit the configure.options file - for my barebones installation I

12) Also edit the configure file - the first few lines allow you to
change where the VMD installation will be located and what it will be
named. Run ./configure to configure the installation when you are done.

13) cd to the vmd/src directory and edit the Makefile. Find the lines
for INCDIR LIBS LIBDIR etc and change references to tk/tcl/fltk
libraries to point to the correct places. For example, -framework Tcl
becomes -ltcl8.5, -framework Tk = -ltk8.5, the include and lib
directories of /tcltk are explicitly named, as is the lib directory of
/fltk, etc.

14) To fix a problem with the program hanging upon start up, edit the
VMD.c file - find the line with Fl::flush and change to Fl::wait(0) -
see this website

15) When the Makefile is right, run "make depend" then "make" - there
should be some warnings but no errors.

16) Run sudo make install to complete installation. Ignore any errors
associated with stride/surf/tachyon, as we did not attempt to install

16) Finally, we need to edit the launch file to get it to start
successfully - edit ($installdir)/bin/($installname) - search for the
line "set ARCH=MACOSX" to "set ARCH=MACOSXX86"