From: Rich Cook (rcook_at_llnl.gov)
Date: Wed Dec 02 2009 - 15:14:03 CST

My machine is OS X 10.5.7. The X11 that comes with that OS is buggy.
I installed XQuartz 2.4.0 from http://xquartz.macosforge.org/trac/wiki
and VMD 1.8.7 now works fine. Thanks! Now I have to figure out how
to protect my Mac users out there from this nasty bug -- VMD 1.8.6 did
not do this, by the way. Not surprising, as it looks like you've
rewritten some of the graphics code in a significant way. Anyhow, I'd
say the ball is squarely in my court. I'll probably use xdpyinfo to
protect my users in a wrapper script.
Syonara

On Dec 2, 2009, at 11:39 AM, John Stone wrote:

>
> Rich,
> What version of MacOS X are you guys running? I know remote
> X11/GLX display has been both broken and fixed over the years in
> various revs of MacOS X. One thing I was just thinking about that
> you might try checking: Are you running a 64-bit VMD and attempting
> to display to a 32-bit Mac (or a 32-bit MacOS X)? It would be good to
> narrow down the range of possible causes. What happens if you try a
> 32-bit VMD remote displaying to the Mac (if that's not already what
> you're trying)? I assume both the Mac and Linux machines are x86
> based?
> (e.g. both ends of the connection are little-endian byte order)
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Wed, Dec 02, 2009 at 11:26:42AM -0800, Rich Cook wrote:
>> Yes, clearly there is a flaw in Apple's X11, no doubt. Furthermore,
>> it's a flaw in the video driver -- I had to do a "sudo reboot
>> now". I
>> tried displaying to my linux desktop and there was no problem. I'll
>> see if upgrading the X11 fixes things.
>> At the same time, VMD is the only app that causes this, so I suspect
>> there is an error code being ignored or an assumption being made,
>> followed by an ill-fated call to a non-existent routine. Naturally
>> this should never crash an X11 server. But we all know X11 is not a
>> pristine piece of engineering -- hell, neither is the code I write.
>> Anyhow, I guess I have the source code, so I could compile in debug
>> and see if I can find the instruction that causes things to go
>> bonkers
>> -- of course, the trouble is that X11 is asynchronous. Sigh.
>> We have a lot of Mac users here, so this is actually relevant and not
>> just a personal peeve of mine. I'll keep looking --
>>
>> On Dec 1, 2009, at 5:51 PM, John Stone wrote:
>>
>>>
>>> Rich,
>>> If your Mac is crashing that would indicate that you have a
>>> broken video driver or that the X11 implementation on your version
>>> of MacOS has a serious flaw. It should not be possible for any
>>> OpenGL or X11 application to crash the windowing system, as the X11
>>> server and GLX implementation are supposed to check the parameters
>>> passed in through the API routines. Building VMD from source won't
>>> change anything of substance unless you encountered a rare case
>>> where
>>> the local host (where VMD was running) was sending garbage to the
>>> remote Mac, but even this should not be capable of crashing the
>>> remote
>>> system, so it would really require flaws on both ends. I can tell
>>> you
>>> that remote display of VMD works fine for me on machines that have
>>> functional X11 and GLX implementations. We do have a few Linux
>>> machines
>>> in our lab that have an X11 with broken GLX functionality,
>>> but this is cured in the recent linux distros in our lab, and
>>> I've never had problems on commercial Unix OSes like AIX, IRIX,
>>> Solaris, though I realize these are likely not of interest to you.
>>> I'm in a rush to head off for the time being, I'll reply to your
>>> other emails later tonight when I get a chance.
>>>
>>> Cheers,
>>> John
>>>
>>>
>>> On Tue, Dec 01, 2009 at 03:50:48PM -0800, Rich Cook wrote:
>>>> I guess I should share that I'm building from source because the
>>>> binary installation did not work for me. We install on our
>>>> clusters,
>>>> and when I display back to my Mac workstation, it crashed my entire
>>>> machine, quite an impressive feat! I'm hoping a source build
>>>> changes
>>>> things, as I can then pick and choose which modules to include.
>>>>
>>>> On Dec 1, 2009, at 12:03 PM, John Stone wrote:
>>>>
>>>>>
>>>>> Rich,
>>>>> I'll go ahead and add new environment variables for the Python
>>>>> stuff
>>>>> since a lot of people end up building from source in order to
>>>>> integrate
>>>>> VMD with their favorite Python version and Python library
>>>>> installation.
>>>>>
>>>>> Are you doing your builds from CVS, or from the source tarballs
>>>>> for
>>>>> the
>>>>> official release? I can send you a note when I've modified the
>>>>> configure
>>>>> script to enable the environment variable overrides and
>>>>> committed it
>>>>> to CVS.
>>>>>
>>>>> Cheers,
>>>>> John Stone
>>>>> vmd_at_ks.uiuc.edu
>>>>>
>>>>> On Tue, Dec 01, 2009 at 11:59:29AM -0800, Rich Cook wrote:
>>>>>> Thanks, that's helpful. It would be great if this stuff could be
>>>>>> done
>>>>>> from the command line, as you can see I automate things to deploy
>>>>>> on
>>>>>> more than one machine, and hand-editing files is a non-starter in
>>>>>> this
>>>>>> environment -- I end up writing sed scripts to take care of it.
>>>>>>
>>>>>> But thanks again for the information.
>>>>>>
>>>>>> On Dec 1, 2009, at 8:05 AM, John Stone wrote:
>>>>>>
>>>>>>>
>>>>>>> Hi,
>>>>>>> The standard VMD 'configure' script expects all of the libraries
>>>>>>> to be found in vmd/lib rather than in /usr/local or other
>>>>>>> locations.
>>>>>>> We do this because when we build VMD here we have to have strict
>>>>>>> control
>>>>>>> over which versions of the various libraries we are linking
>>>>>>> against,
>>>>>>> and
>>>>>>> this prevents us from accidentally picking up a bad version of
>>>>>>> Tcl,
>>>>>>> Python,
>>>>>>> or FLTK from the /usr/local tree on system we're compiling on.
>>>>>>>
>>>>>>> You can redirect the VMD compilation to use whatever directory
>>>>>>> structure
>>>>>>> you like by editing the appropriate lines in the 'configure'
>>>>>>> script
>>>>>>> prior to generating the makefiles etc. Look in the 'configure'
>>>>>>> script
>>>>>>> starting on line 1027 and you'll see where the default Python
>>>>>>> include
>>>>>>> and linkage paths are set. You can simply edit those directory
>>>>>>> paths
>>>>>>> and you should be in business. This is often simpler than
>>>>>>> manually
>>>>>>> editing
>>>>>>> the makefile that the configure script generates, although that
>>>>>>> approach
>>>>>>> would work equally well if you're more comfortable with it.
>>>>>>>
>>>>>>> For Tcl/Tk we allow overriding default paths with the use of a
>>>>>>> few
>>>>>>> environment variables (see line 22-31 in the 'configure'
>>>>>>> script).
>>>>>>> If people would find it helpful, I could add logic to allow the
>>>>>>> same
>>>>>>> kinds of overrides for Python and other libraries that are often
>>>>>>> part
>>>>>>> of the default OS install.
>>>>>>>
>>>>>>> Let me know if you have more questions.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> John Stone
>>>>>>> vmd_at_ks.uiuc.edu
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Nov 30, 2009 at 03:49:23PM -0800, Rich Cook wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I am using the below script to install VMD 1.8.7. I'm almost
>>>>>>>> there,
>>>>>>>> but the build seems to be unable to find the python library.
>>>>>>>> Can
>>>>>>>> some
>>>>>>>> wise person here help me? I find the build instructions to be
>>>>>>>> confusing and incomplete. Thanks for any help or pointers to
>>>>>>>> additional info.
>>>>>>>>
>>>>>>>> Here is my machine info:
>>>>>>>> rcook_at_zeus287 (src): uname -a
>>>>>>>> Linux zeus287 2.6.18-76chaos #1 SMP Fri Aug 14 13:22:06 EDT
>>>>>>>> 2009
>>>>>>>> x86_64 x86_64 x86_64 GNU/Linux
>>>>>>>>
>>>>>>>> Do I need to download and install Python 2.5 in the vmd-1.8.7
>>>>>>>> directory to get it in there?
>>>>>>>> Here is the installation script:
>>>>>>>> #
>>>>>>>> =
>>>>>>>> =
>>>>>>>> =
>>>>>>>> =
>>>>>>>> =
>>>>>>>> =
>>>>>>>> ===============================================================
>>>>>>>> # begin installation script for vmd
>>>>>>>> #!/usr/bin/env bash
>>>>>>>> if ! . $HOME/RC_bash_lib/shellfuncs.sh; then
>>>>>>>> echo "need shellfuncs, time to exit, bye bye"
>>>>>>>> exit 1
>>>>>>>> fi
>>>>>>>>
>>>>>>>> set -x
>>>>>>>> cd /usr/global/tools/vmd/1.8.7
>>>>>>>>
>>>>>>>> rm -rf $SYS_TYPE/{src,bin,lib}
>>>>>>>> mkdir -p $SYS_TYPE/src
>>>>>>>> cd $SYS_TYPE
>>>>>>>> [ -d Tcl ] || errexit "You must have Tcl installed in $(pwd)/
>>>>>>>> Tcl"
>>>>>>>>
>>>>>>>> cd src
>>>>>>>> tar -xvzf /usr/global/tools/vmd/1.8.7/tarballs/
>>>>>>>> vmd-1.8.7.src.tar.gz
>>>>>>>>
>>>>>>>> echo
>>>>>>>> "============================================================"
>>>>>>>> echo "First the plugins have to be built"
>>>>>>>> cd /usr/global/tools/vmd/1.8.7/$SYS_TYPE/src/plugins
>>>>>>>> gmake LINUXAMD64 TCLINC=-I/usr/global/tools/vmd/
>>>>>>>> 1.8.7/$SYS_TYPE/
>>>>>>>> Tcl/
>>>>>>>> include TCLLIB=-L/usr/global/tools/vmd/1.8.7/$SYS_TYPE/Tcl/lib/
>>>>>>>> export PLUGINDIR=/usr/global/tools/vmd/1.8.7/$SYS_TYPE/src/
>>>>>>>> vmd-1.8.7/
>>>>>>>> plugins
>>>>>>>> gmake distrib
>>>>>>>>
>>>>>>>> echo
>>>>>>>> "============================================================"
>>>>>>>> echo "Now build SURF"
>>>>>>>> cd /usr/global/tools/vmd/1.8.7/$SYS_TYPE/src/vmd-1.8.7/lib/surf
>>>>>>>> uncompress surf.tar.Z -c | tar -xv || errexit "could not untar
>>>>>>>> surf
>>>>>>>> library"
>>>>>>>> gmake depend
>>>>>>>> gmake
>>>>>>>> mv surf surf_LINUXAMD64
>>>>>>>>
>>>>>>>> echo
>>>>>>>> "============================================================"
>>>>>>>> echo "Now make Fltk"
>>>>>>>> cd /usr/global/tools/vmd/1.8.7/$SYS_TYPE/src/
>>>>>>>> tar -xvzf /usr/global/tools/vmd/1.8.7/tarballs/fltk-1.1.10rc3-
>>>>>>>> source.tar.gz
>>>>>>>> cd fltk-1.1.10rc3 || errexit "cannot cd to fltk directory"
>>>>>>>> ./configure --prefix=/usr/global/tools/vmd/1.8.7/$SYS_TYPE
>>>>>>>> gmake
>>>>>>>> gmake install || errexit "Cannot build Fltk library"
>>>>>>>>
>>>>>>>> echo
>>>>>>>> "============================================================"
>>>>>>>> echo "Now the main thing can be built"
>>>>>>>> cd /usr/global/tools/vmd/1.8.7/$SYS_TYPE/src/vmd-1.8.7
>>>>>>>> sedfiles -e "s:install_bin_dir=\"/usr/local/bin
>>>>>>>> \":install_bin_dir=
>>>>>>>> \"/
>>>>>>>> usr/global/tools/vmd/1.8.7/$SYS_TYPE/bin\":" -e
>>>>>>>> "s:install_library_dir=
>>>>>>>> \"/usr/local/lib:install_library_dir=\"/usr/global/tools/vmd/
>>>>>>>> 1.8.7/$SYS_TYPE/lib:" configure
>>>>>>>> chmod 775 configure
>>>>>>>> export TCL_INCLUDE_DIR=/usr/global/tools/vmd/1.8.7/$SYS_TYPE//
>>>>>>>> include
>>>>>>>> export TCL_LIBRARY_DIR=/usr/global/tools/vmd/1.8.7/$SYS_TYPE//
>>>>>>>> lib
>>>>>>>> export TK_INCLUDE_DIR=/usr/global/tools/vmd/1.8.7/$SYS_TYPE//
>>>>>>>> include
>>>>>>>> export TK_LIBRARY_DIR=/usr/global/tools/vmd/1.8.7/$SYS_TYPE//
>>>>>>>> lib
>>>>>>>>
>>>>>>>> ./configure LINUXAMD64 OPENGL FLTK ACTC NETCDF TK TCL PYTHON
>>>>>>>> NUMPY
>>>>>>>> PTHREADS LP64 PTHREADS NOSILENT
>>>>>>>> cd src
>>>>>>>> gmake # <--------- this fails
>>>>>>>> gmake install
>>>>>>>>
>>>>>>>> # end vmd installation script
>>>>>>>> #=============================================================
>>>>>>>> Here is the error:
>>>>>>>>
>>>>>>>> g++ -m64 -fno-for-scope -Wno-deprecated -Wall -O6 -ffast-
>>>>>>>> math -DARCH_LINUXAMD64 -DVMDOPENGL -DVMDGRAPHICS -DVMDACTC -
>>>>>>>> DVMDPYTHON -DVMDTHREADS -DUSEPOSIXTHREADS -D_REENTRANT -
>>>>>>>> DVMDNUMPY -
>>>>>>>> DVMDORBITALS -DVMDWITHORBITALS -DVMDWITHCARBS -DVMDPOLYHEDRA -
>>>>>>>> DVMDSURF
>>>>>>>> -DVMDMSMS -DVMDFIELDLINES -DVMDPBCSMOOTH -DVMDTCL -DVMDTK -
>>>>>>>> DVMDSTATICPLUGINS -DVMDGUI -DVMDFLTK -I../lib/actc/include -
>>>>>>>> I../
>>>>>>>> lib/
>>>>>>>> python/lib_LINUXAMD64/include/python2.5 -I../lib/numpy/
>>>>>>>> lib_LINUXAMD64/
>>>>>>>> include -I../lib/python/lib_LINUXAMD64/lib/python2.5/site-
>>>>>>>> packages/
>>>>>>>> numpy/core/include -I/usr/global/tools/vmd/1.8.7/
>>>>>>>> chaos_4_x86_64_ib//
>>>>>>>> include -I/usr/global/tools/vmd/1.8.7/chaos_4_x86_64_ib//
>>>>>>>> include -
>>>>>>>> I../
>>>>>>>> plugins/include -I../plugins/LINUXAMD64/molfile -I../lib/
>>>>>>>> netcdf/
>>>>>>>> include -I../lib/fltk/include -I. -c PythonTextInterp.C -o ../
>>>>>>>> LINUXAMD64/PythonTextInterp.o
>>>>>>>> Compiling PythonTextInterp.C --> PythonTextInterp.o ...
>>>>>>>> In file included from PythonTextInterp.C:21:
>>>>>>>> py_commands.h:28:20: error: Python.h: No such file or directory
>>>>>>>> PythonTextInterp.C:32:21: error: errcode.h: No such file or
>>>>>>>> directory
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> /* A function that takes a single integer argument and returns
>>>>>>>> a pointer to a function that takes two integer arguments and
>>>>>>>> returns a floating-point number. */
>>>>>>>> float (*func2(int a))(int, int);
>>>>>>>> Rich Cook
>>>>>>>> rcook_at_llnl.gov
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 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
>>>>>>>
>>>>>>
>>>>>>
>>>>>> /* A function that takes a single integer argument and returns
>>>>>> a pointer to a function that takes two integer arguments and
>>>>>> returns a floating-point number. */
>>>>>> float (*func2(int a))(int, int);
>>>>>> Rich Cook
>>>>>> rcook_at_llnl.gov
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> 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
>>>>>
>>>>
>>>>
>>>> /* A function that takes a single integer argument and returns
>>>> a pointer to a function that takes two integer arguments and
>>>> returns a floating-point number. */
>>>> float (*func2(int a))(int, int);
>>>> Rich Cook
>>>> rcook_at_llnl.gov
>>>>
>>>>
>>>>
>>>
>>> --
>>> 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
>>>
>>
>>
>> /* A function that takes a single integer argument and returns
>> a pointer to a function that takes two integer arguments and
>> returns a floating-point number. */
>> float (*func2(int a))(int, int);
>> Rich Cook
>> rcook_at_llnl.gov
>>
>>
>>
>
> --
> 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
>

/* A function that takes a single integer argument and returns
    a pointer to a function that takes two integer arguments and
    returns a floating-point number. */
float (*func2(int a))(int, int);
Rich Cook
rcook_at_llnl.gov