From: Jan Rychter (jan_at_rychter.com)
Date: Tue May 01 2007 - 14:29:46 CDT

> Jan,
> The reason your build used X11 rather than Aqua was because
> it was compiled with "OPENGL" rather than "FLTKOPENGL". We normally
> compile the MacOS X Intel version of VMD with:
> MACOSXX86 FLTKOPENGL FLTK IMD TK TCL SILENT SPACEBALL PTHREADS LIBTACHYON \
> ACTC NETCDF

Thanks -- that's a good hint!

> I don't know what makefile editing you did, but I suspect it was
> due to the use of non-framework versions of Tcl/Tck/etc. If you tell me
> more specifically what you're doing, I should be able to help you get
> things working.

Ok, so here is where I am right now.

I use the following flag set: MACOSXX86 FLTKOPENGL FLTK TK TCL PYTHON PTHREADS NUMPY

I made the following modifications to configure:
--------------------------------------------------------------------------------------------------
diff -u ../original/vmd-1.8.6/configure configure
--- ../original/vmd-1.8.6/configure 2007-04-08 07:03:49.000000000 +0200
+++ configure 2007-05-01 21:22:36.000000000 +0200
@@ -1814,7 +1814,7 @@
     # Set Python paths to use the system-provided Python rather than
     # our own, since Apple MacOS X 10.4.x or newer includes Python 2.3
     # by default.
- $python_include = "-F/System/Library/Frameworks";
+ $python_include = "-I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include -F/Library/Frameworks -F/System/Library/Frameworks";
     $python_library = "";
     $python_libs = "-framework Python -lpthread";
 
@@ -1851,8 +1851,8 @@
       ## MacOS X native builds using Tcl/Tck frameworks
       ##
       ## use the Tcl/Tk frameworks provided by apple, when we use their Python
-# $tcl_include = "-F/System/Library/Frameworks";
-# $tcl_library = "-F/System/Library/Frameworks";
+ $tcl_include = "-F/Library/Frameworks";
+ $tcl_library = "-F/Library/Frameworks";
 
       ## use our own Tcl/Tk framework builds when not compiling with Python,
       ## as Apple's currently shipping versions are quite buggy
@@ -1895,9 +1895,9 @@
     $def_imageviewer="/usr/bin/open %s";
 
     # Hack the FLTK paths to use 1.1.7 rather than 1.1.4
- $fltk_include = "-I$fltk_dir/fltk-1.1.7";
- $fltk_library = "-L$fltk_dir/$config_arch";
- $fltk_libs = "-lfltk -lX11";
+ $fltk_include = "-I/opt/local/include";
+ $fltk_library = "-L/opt/local/lib";
+ $fltk_libs = "-lfltk";
 
     # Set Python paths to use the system-provided Python rather than
     # our own, since Apple MacOS X 10.4.x or newer includes Python 2.3
@@ -1956,8 +1956,8 @@
       $tcl_libs = "-framework Tcl";
       if ($config_tk) { $tcl_libs = "-framework Tk " . $tcl_libs; }
 
- $vmd_include = "$tcl_include";
- $vmd_library = "$tcl_library";
+ $vmd_include = "-F/Library/Frameworks -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include $tcl_include";
+ $vmd_library = "-F/Library/Frameworks $tcl_library";
       $vmd_libs = "$tcl_libs";
 
       # MacOS 10.3 stuff
--------------------------------------------------------------------------------------------------

... and now the compilation bombs out like this:

c++ -fPIC -Os -ffast-math -DARCH_MACOSXX86 -DVMDOPENGL -DVMDFLTKOPENGL -DVMDGRAPHICS -DVMDPYTHON -DVMDTHREADS -DUSEPOSIXTHREADS -D_REENTRANT -DVMDNUMPY -DVMDSURF -DVMDMSMS -DVMDFIELDLINES -DVMDVOLUMETEXTURE -DVMDTCL -DVMDTK -DVMDSTATICPLUGINS -DVMDGUI -DVMDFLTK -F/System/Library/Frameworks -F/Library/Frameworks -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include -I../lib/tcl/include -I../lib/tk/lib_MACOSXX86/Tk.framework/Versions/8.4/Headers -I../plugins/include -I../plugins/MACOSXX86/molfile -I/opt/local/include -I. -I../src -o vmd_MACOSXX86 FltkOpenGLDisplayDevice.o OpenGLExtensions.o OpenGLRenderer.o OpenGLShader.o OpenGLCache.o Hershey.o PythonTextInterp.o VMDTkinterMenu.o py_animate.o py_atomsel.o py_atomselection.o py_axes.o py_color.o py_commands.o py_display.o py_graphics.o py_imd.o py_label.o py_material.o py_menu.o py_molecule.o py_molrep.o py_mouse.o py_render.o py_trans.o py_numeric.o Animation.o ArtDisplayDevice.o AtomColor.o AtomParser.o AtomL
exer.o AtomRep.o AtomSel.o Axes.o BaseMolecule.o BondSearch.o CmdAnimate.o CmdColor.o CmdDisplay.o CmdLabel.o CmdMaterial.o CmdMenu.o CmdMol.o CmdRender.o CmdTrans.o CommandQueue.o CoorPluginData.o CUDAAccel.o DisplayDevice.o Displayable.o DisplayRocker.o DispCmds.o DrawMolecule.o DrawMolItem.o DrawMolItem2.o DrawMolItemRibbons.o DrawMolItemMSMS.o DrawMolItemRings.o DrawMolItemSurface.o DrawMolItemVolume.o DrawForce.o DrawRingsUtils.o FileRenderList.o FileRenderer.o FPS.o GelatoDisplayDevice.o GeometryAngle.o GeometryAtom.o GeometryBond.o GeometryDihedral.o GeometryList.o GeometryMol.o GeometrySpring.o Inform.o ImageIO.o Isosurface.o JRegex.o JString.o macosxvmdstart.o MaterialList.o Matrix4.o Measure.o Molecule.o MoleculeList.o MoleculeGraphics.o MolFilePlugin.o Mouse.o MSMSInterface.o PeriodicTable.o P_JoystickTool.o P_TugTool.o P_GrabTool.o P_PrintTool.o P_PinchTool.o P_UIVR.o P_Buttons.o P_Tracker.o P_Tool.o P_CmdTool.o P_SensorConfig.o ParseTree.o PickList.o PickModeAddBond.o PickModeCenter.o Pic!
 kModeFor
ce.o PickModeList.o PickModeMolLabel.o PickModeMove.o PickModeUser.o PlainTextInterp.o PluginMgr.o POV3DisplayDevice.o PSDisplayDevice.o VMDQuat.o RadianceDisplayDevice.o RayShadeDisplayDevice.o R3dDisplayDevice.o RenderManDisplayDevice.o Scene.o SnapshotDisplayDevice.o SpringTool.o Stage.o STLDisplayDevice.o Stride.o Surf.o SymbolTable.o TachyonDisplayDevice.o Timestep.o UIObject.o UIText.o VMDApp.o VMDCollab.o VMDDir.o VMDDisplayList.o VMDMenu.o VMDTitle.o VMDThreads.o VolCPotential.o VolMap.o VolMapCreate.o VolumetricData.o VolumeTexture.o VrmlDisplayDevice.o Vrml2DisplayDevice.o WavefrontDisplayDevice.o utilities.o vmd.o vmdmain.o ColorInfo.o TclCommands.o TclMeasure.o TclMolInfo.o TclTextInterp.o TclVec.o TclGraphics.o TclVolMap.o cmd_animate.o cmd_collab.o cmd_color.o cmd_display.o cmd_imd.o cmd_label.o cmd_material.o cmd_menu.o cmd_mol.o cmd_mouse.o cmd_plugin.o cmd_render.o cmd_tool.o cmd_trans.o cmd_user.o cmd_util.o tcl_commands.o VMDTkMenu.o ColorFltkMenu.o DisplayFltkMenu.o FileChooserFltkMenu.o
GraphicsFltkMenu.o SelectionBuilder.o GeometryFltkMenu.o MaterialFltkMenu.o MolBrowser.o RenderFltkMenu.o SaveTrajectoryFltkMenu.o VMDFltkMenu.o MainFltkMenu.o ToolFltkMenu.o frame_selector.o hash.o inthash.o intstack.o vmdsock.o vmddlopen.o pcre.o fitrms.o -F/Library/Frameworks -F../lib/tcl/lib_MACOSXX86 -F../lib/tk/lib_MACOSXX86 -Wl,-executable_path . -lmx -L../plugins/MACOSXX86/molfile -L/opt/local/lib -framework OpenGL -framework AGL -framework Python -lpthread -lpthread -framework Tk -framework Tcl -lmolfile_plugin -lfltk_gl -lfltk -framework Carbon ;
Linking vmd_MACOSXX86 ...
/usr/bin/ld: warning -F: directory name (../lib/tcl/lib_MACOSXX86) does not exist
/usr/bin/ld: warning -F: directory name (../lib/tk/lib_MACOSXX86) does not exist
/Developer/Tools/Rez -t APPL -o ../MACOSXX86/vmd_MACOSXX86 vmdmac.r
### /Developer/Tools/Rez - SysError 0 during open of "vmdmac.r".
Fatal Error!
### /Developer/Tools/Rez - Fatal Error, can't recover.
vmdmac.r: ### /Developer/Tools/Rez - Since errors occurred, ../MACOSXX86/vmd_MACOSXX86's resource fork was not written.
make: *** [vmd_MACOSXX86] Error 3

Any help is very much appreciated.

--J.

> On Mon, Apr 30, 2007 at 12:39:33PM +0200, Jan Rychter wrote:
> > Hi,
> >
> > Does anyone have a build of VMD running under Mac OS X (Intel) with
> > Python support?
> >
> > I've been trying to compile vmd 1.8.6 on MacOS X (10.4.9, Intel) with
> > Python support (I have 2.5 installed), and gave up. After much, much
> > fighting and manual makefile editing I got the executable to actually
> > build and link, but now running it results in a segfault. The terminal
> > says:
> >
> > [12:35] tnuctip:/Users/jwr>/Applications/VMD\ 1.8.6\ jwr.app/Contents/MacOS/startup.command; exit
> > Info) VMD for MACOSXX86, version 1.8.6 (April 29, 2007)
> > [...]
> > Info) Multithreading available, 2 CPUs detected.
> > ERROR) Exiting due to X-Windows OpenGL window creation failure.
> > Info) VMD for MACOSXX86, version 1.8.6 (April 29, 2007)
> > Info) Unable to create OpenGL window.
> >
> > I have no idea why it tries to use X11, I thought it would use native
> > GL. I have it configured with
> > MACOSXX86 OPENGL TK TCL PYTHON PTHREADS NUMPY
> >
> > Any ideas? Perhaps someone has built such a binary and would be kind
> > enough to provide it?
> >
> > --J.