From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Fri Apr 03 2015 - 16:22:44 CDT

Hi Michael,

To get vmd compiled on Ubuntu, I've usually had to doctor the configure
file (which is really a perl script that writes the makefile in the src
subdirectory, not the magic gnu autoconf that does look for
dependencies) to look for headers in sane places.

Here are the notable changes for TCL/TK:

################ Tcl / Tk
# location of TCL library and include file.
# If left blank, standard system directories will be searched.
#$stock_tcl_include_dir=$ENV{"TCL_INCLUDE_DIR"} || "/usr/local/include";
#$stock_tcl_library_dir=$ENV{"TCL_LIBRARY_DIR"} || "/usr/local/lib";
$stock_tcl_include_dir="/usr/include/tcl8.5/";
$stock_tcl_library_dir="/usr/lib/x86_64-linux-gnu";

# location of Tk (for TK option)
#$stock_tk_include_dir=$ENV{"TK_INCLUDE_DIR"} || "/usr/local/include";
#$stock_tk_library_dir=$ENV{"TK_LIBRARY_DIR"} || "/usr/local/lib";
$stock_tk_include_dir="/usr/include/tcl8.5/";
$stock_tk_library_dir="/usr/lib/x86_64-linux-gnu";

And similar changes for python:

$python_include = "-I/usr/include/python2.7/";
$python_library = "-L/usr/lib/python2.7/config/";

I think those were the two major ones that don't have their include
files in /usr/include on the default search path.

-Josh Vermaas

On 04/03/2015 03:48 PM, Michael Lamparski wrote:
> I'm trying to compile vmd on Ubuntu and am uncertain with regards to
> how to populate the lib/ directory which the vmd Makefile searches for
> all of its dependencies.
>
> Beginning with a freshly unpacked source tar (containing plugins/ and
> vmd-1.9.2/), I do the following:
>
>
> cd plugins
> export TCLINC=-I/usr/include/tcl8.5
> export TCLLIB=-L/usr/lib/x86_64-linux-gnu
> make LINUXAMD64
>
> export PLUGINDIR=`pwd`/../vmd-1.9.2/plugins
> make distrib
>
> cd ../vmd-1.9.2
> ./configure LINUXAMD64 OPENGL OPENGLPBUFFER FLTK TK COLVARS IMD
> SILENT XINPUT TCL PTHREADS LIBTACHYON NETCDF PYTHON NUMPY XINERAMA
> (note: this is "make linux.amd64.opengl" without ICC, VRPN, LIBSBALL,
> ACTC, or CUDA)
>
> cd src
> make
>
> (A bunch of files compile successfully... but then:)
> Compiling colvarproxy_vmd.C --> colvarproxy_vmd.o ...
> colvarproxy_vmd.C:3:17: fatal error: tcl.h: No such file or directory
> #include <tcl.h>
>
>
> Looking at the Makefile, the cause of the error is clear: The
> makefile expects to find the tcl headers in "../lib/tcl/include".
> Now, I /could/ fix this with a symlink or two... however, I also see
> that no "tcl" folder exists in "vmd-1.9.2/lib", which suggests to me
> that these dependencies are meant to be gathered by some automated
> process (otherwise, the only way to know where the files belong is to
> look at the makefile!).
>
> So... am I missing a step?
>
> Thanks