From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Feb 04 2010 - 10:14:13 CST

Joshua,
  Yes, I've known about these event handling issues for some time.
While they aren't fixed yet, at least we no longer have to modify
the Tcl/Tk source code to prevent crashes anymore! I used to have to
apply patches to the Tk source code to change some of their event handling
code to prevent Tk and FLTK from interfering with each others windows.

I've mentioned to the Apple guys a number of times that they ought to
see about improving the MacOS X Tk port, since I believe that Tk for
MacOS X was originally donated by Apple engineering staff. The other
issue I have related to this is that the current Tk for MacOS X is
based on Carbon, which precludes building 64-bit binaries.

I may end up making a future VMD build for MacOS X that's based on X11
rather than the native windowing system, particularly if that allows me
to build 64-bit binaries.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Thu, Feb 04, 2010 at 11:04:53AM -0500, Joshua Anderson wrote:
> Nevermind, I figured out a workaround. If I change the Fl::flush() to
> Fl::wait(0) in vmd.C, then everything seems to works fine.
>
> This appears to be caused by an issue in fltk and/or tk installed by
> macports. For instance, if I load the "wish" tcl/tk app that macports
> installed it also fails to respond to mouse events.
>
> Given the compiler directives in vmd to swap between flush and
> wait(0), it would seem that this has been a recurring problem with
> various versions of tk and/or fltk.
>
> Hopefully someone out there will find this information useful....
>
> Josh
>
> On Feb 3, 2010, at 4:55 PM, John Stone wrote:
>
> >Hi,
> > Do you have a copy of vmdmac.r in your vmd/src/ directory?
> >The resource compiler is looking for it there, but seems not
> >to be finding it in your case. I've attached a copy of it
> >to this email.
> >
> >Cheers,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> >
> >On Wed, Feb 03, 2010 at 04:39:52PM -0500, Joshua Anderson wrote:
> >>I'm attempting to create a build of VMD on my mac linked with a
> >>specific python I have installed (via macports if you must know, not
> >>that it matters). The system is a recent intel iMac running Mac OS X
> >>10.5.8.
> >>
> >>The configuration I'm using to build is:
> >>MACOSXX86 FLTKOPENGL FLTK TK CUDA IMD LIBTACHYON NETCDF TCL PYTHON
> >>PTHREADS NUMPY SILENT
> >>
> >>I've navigated the VMD compiling docs, built the plugins without
> >>problems, modified the configure scripts to point to the macports
> >>libraries and am now compiling vmd proper. Everything compiles, but I
> >>get the following errors in the linking phase.
> >>
> >>$ make
> >>Linking vmd_MACOSXX86 ...
> >>ln: ./foobar: File exists
> >>failed to find vmdmac/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
> >>
> >>The vmdmac.r file does not show up in the source tarball. I found
> >>this
> >>ancient post regarding it:
> >>http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/0678.html .
> >>If I
> >>use the vmdmac.r file from that post, vmd does compiles and link
> >>successfully, but I still have problems at that point.
> >>
> >>I then make install VMD to a test dir to try it out. Running bin/vmd
> >>errors out with vmd_MACOSX not existing. OK, update that to
> >>MACOSXX86,
> >>run bin/vmd again and VMD loads, but the menus, opengl display,
> >>etc...
> >>do not respond to any mouse clicks. I can quit by typing quit in the
> >>terminal window I used to launch it, though.
> >>
> >>Any ideas what am I doing wrong?
> >>
> >>I don't think the problem is due to any library mismatching. I've
> >>triple checked that all include and library directories are pointing
> >>to Tcl, Tk, and FLTK installed by macports. otool confirms that all
> >>those libraries are linked from macports (/opt/local/*)
> >>$ otool -L vmd_MACOSXX86
> >>vmd_MACOSXX86:
> >> /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version
> >>292.4.0)
> >> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
> >>(compatibility version 1.0.0, current version 1.0.0)
> >> /System/Library/Frameworks/AGL.framework/Versions/A/AGL
> >>(compatibility version 1.0.0, current version 1.0.0)
> >> @rpath/libcudart.dylib (compatibility version 1.1.0, current version
> >>3.0.0)
> >> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python
> >>(compatibility version 2.6.0, current version 2.6.0)
> >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> >>version 111.1.4)
> >> /opt/local/lib/libtk8.5.dylib (compatibility version 8.5.0, current
> >>version 8.5.8)
> >> /opt/local/lib/libtcl8.5.dylib (compatibility version 8.5.0, current
> >>version 8.5.8)
> >> /opt/local/lib/libnetcdf.4.dylib (compatibility version 5.0.0,
> >>current version 5.0.0)
> >> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
> >>(compatibility version 2.0.0, current version 136.0.0)
> >> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
> >>version 7.4.0)
> >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
> >>version 1.0.0)
> >> /System/Library/Frameworks/CoreServices.framework/Versions/A/
> >>CoreServices (compatibility version 1.0.0, current version 32.0.0)
> >> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/
> >>CoreFoundation (compatibility version 150.0.0, current version
> >>476.19.0)
> >> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/
> >>ApplicationServices (compatibility version 1.0.0, current version
> >>34.0.0)
> >>
> >>--------
> >>Joshua A. Anderson, Ph.D.
> >>Chemical Engineering Department, University of Michigan
> >
> >--
> >NIH Resource for Macromolecular Modeling and Bioinformatics
> >Beckman Institute for Advanced Science and Technology
> >University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> ><vmdmac.r.gz>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078