From: Dipesh Bhattarai (dipesh.bhattarai_at_gmail.com)
Date: Mon Nov 30 2009 - 19:32:09 CST

Hi Rich,

I faced similar problem when I tried building VMD from the source code. From
your description, it seem, VMD is unable to find Python library in the 'lib'
directory. To take care of that problem, you will either have to compile
Python in the directory or modify the makefile so that it points to correct
python header and library files. Usually python comes preinstalled in Linux
box, so I recommend you modify the makefile itself.

Dipesh

On Mon, Nov 30, 2009 at 5:49 PM, Rich Cook <rcook_at_llnl.gov> 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
>
>
>
>
>

-- 
Dipesh Bhattarai, PhD