From: Strahs, Dr. Daniel Bernard (dstrahs_at_pace.edu)
Date: Sat Apr 04 2015 - 10:52:45 CDT

Hi Michael:

The last VMD I complied on Ubuntu was 1.9.1.

This is how I do it; manually creating the ./lib filesystem. Below is my directory listing of ./lib so that you can see how the links are pointing.

/opt/vmd-1.9.1# ls -l lib
total 72
drwxr-xr-x 2 root root 4096 Jul 31 2014 actc
drwxr-xr-x 2 20110 1004 4096 Feb 2 2012 cave
drwxr-xr-x 2 20110 1004 4096 Jul 31 2014 fltk
drwxr-xr-x 3 20110 1004 4096 Jul 31 2014 Mesa
drwxr-xr-x 2 root root 4096 Jul 31 2014 netcdf
drwxr-xr-x 2 root root 4096 Jul 31 2014 numpy
drwxr-xr-x 2 20110 1004 4096 Feb 2 2012 points
drwxr-xr-x 2 root root 4096 Jul 31 2014 python
drwxr-xr-x 2 20110 1004 4096 Feb 2 2012 redistrib
drwxr-xr-x 5 20110 1004 4096 Feb 2 2012 scripts
drwxr-xr-x 2 20110 1004 4096 Jul 29 2014 stride
drwxr-xr-x 2 20110 1004 4096 Jul 30 2014 surf
drwxr-xr-x 2 20110 1004 4096 Feb 2 2012 tachyon
drwxr-xr-x 2 root root 4096 Jul 31 2014 tcl
drwxr-xr-x 2 root root 4096 Jul 31 2014 tk
-rwxr-xr-x 1 20110 1004 8599 Feb 2 2012 use

/opt/vmd-1.9.1# ls -l lib/actc lib/fltk lib/netcdf lib/python lib/tcl lib/tk
lib/actc:
lrwxrwxrwx 1 root root 21 Aug 16 2014 include -> /usr/local/include/ac
lrwxrwxrwx 1 root root 14 Aug 16 2014 lib_LINUX -> /usr/local/lib

lib/fltk:
lrwxrwxrwx 1 root root 12 Aug 16 2014 include -> /usr/include
lrwxrwxrwx 1 root root 23 Aug 16 2014 LINUX -> /usr/lib/i386-linux-gnu
-rw-r--r-- 1 20110 1004 692 Feb 2 2012 README

lib/netcdf:
lrwxrwxrwx 1 root root 12 Aug 16 2014 include -> /usr/include
lrwxrwxrwx 1 root root 8 Aug 16 2014 lib_LINUX -> /usr/lib

lib/tcl:
lrwxrwxrwx 1 root root 19 Aug 16 2014 include -> /usr/include/tcl8.5
lrwxrwxrwx 1 root root 23 Aug 16 2014 lib_LINUX -> /usr/lib/i386-linux-gnu

lib/tk:
lrwxrwxrwx 1 root root 18 Aug 16 2014 include -> /usr/include/tk8.5
lrwxrwxrwx 1 root root 23 Aug 16 2014 lib_LINUX -> /usr/lib/i386-linux-gnu

I hope this helps.

________________________________
From: owner-vmd-l_at_ks.uiuc.edu [owner-vmd-l_at_ks.uiuc.edu] on behalf of Josh Vermaas [vermaas2_at_illinois.edu]
Sent: Friday, April 3, 2015 5:22 PM
To: Michael Lamparski; vmd-l_at_ks.uiuc.edu
Subject: Re: vmd-l: How to populate lib/ directory when compiling

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