From: Pieter van 't Hof (pieter.van.t.hof_at_logica.com)
Date: Tue Dec 01 2009 - 03:40:05 CST

Hi Rich,

When I had to build VMD I ran into quite some errors myself. I found a
pretty good step-by-step guide here:

http://debianclusters.cs.uni.edu/index.php/NAMD:_Building_vmd

Using this guide I managed to compile VMD :) Maybe it can help you to.

Good luck,

Pieter

-----Original Message-----
From: Dipesh Bhattarai <dipesh.bhattarai_at_gmail.com>
To: Rich Cook <rcook_at_llnl.gov>
Cc: vmd-l_at_ks.uiuc.edu
Subject: Re: vmd-l: building VMD is tricky -please help
Date: Mon, 30 Nov 2009 19:32:09 -0600

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
Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu sch|tzen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.