|
This page describes how to get the TEA build environment working
on Windows. This is probably the most controversial aspect of
TEA: the use of autoconf, configure, and make to build things
as opposed to using VC++ project files.
We feel your pain.
But, we also build all our software automatically, and you really
can't automate the process without makefiles. For a general
description of TEA and autoconf/configure/make, please see our
Tcl Extension Architecture paper.
Note: This page lists a bunch of steps you take by running
commands. These commands must be run in the bash shell.
The first part of the process is installing the Cygwin tools
that include this. Don't try these commands
at a DOS prompt.
10 Steps to Success
-
Start by downloading the cygwin tools.
These are free, and
you get them from an FTP site near you. There is
a list of mirror sites
on the sourceware.cygnus.com Web site.
The main site is ftp://sourceware.cygnus.com/pub/cygwin/,
but this is busy and a mirror may provide faster access.
This directory has a link called latest, which at the time of this
writing goes to the b20 directory. There you should get
the full installation (about 14 Meg), which is in a file called full.exe.
Unfortunately, the "usertools" distribution (3 Meg) doesn't come with make, sigh.
Full Cygwin Distribution (ftp.ajubasolutions.com)
Full Cygwin Distribution (freesoftware.com)
-
Install the package by running the full.exe installer.
This unpacks into a single folder that
occupies a little under 40 Meg on your hard drive.
I installed mine on my D: drive under a cygnus folder.
By the way, the installation includes a copy of Tk/Tcl 8.0, Tix 4.1, and [incr Tcl] 1.5.
(You might be able to delete the H-i586-cygwin32/i586-cygwin32 folder to save
about 16 Megabytes of space. This contains the compiler tools, which we
don't actually use. Instead, we still use the VC++ compiler, but in the
framework of other cygwin tools.)
-
Run the bash shell via the cygwin.bat script.
You can find cygwin.bat in the top-level directory of the cygwin installation.
This batch file alters the PATH and runs the bash shell.
If you don't know about UNIX shells, they are command interpreters like the "MS-DOS Prompt"
tool available under windows. Essentially all the programs in the cygwin toolset are
simple command line utilities that are designed to run under the bash shell, either
interactively or in scripts.
Yup, back to the good old days of command prompts and scripts.
-
Create a /bin directory.
Some tools, especially make,
assume "/bin/sh" is available, so setting this up is crucial.
The bin directory is something like d:/cygnus/cygwin-b20/H-i586-cygwin32/bin,
which in 8.3 format will appear as d:/cygnus/CYGWIN~1/H-I586~1/bin.
Note that you can use forward slashes in your file names under bash,
much like you can in Tcl scripts.
Run the bash program as described above, and utter the following command
(suitably modified for your installation directory):
mount -f d:/cygnus/cygwin~1/H-i586~1/bin /bin
This will create a sort of symbolic link from /bin down into the installation
that will persist across reboots. It is only meaningful to bash;
the MS-DOS programs won't see it.
Alternatively, you can create a C:/bin directory and copy the sh.exe program
into it.
-
Set up your PATH so the Cynwin tools are available.
Because nothing is installed into
the shared windows folder, you must update your PATH explicitly.
If you don't mind always running the cygwin.bat file,
then that already takes care of it for you. The installer
puts this into your Start menu for you, and you could create
a shortcut to that batch file on your desktop.
You can also alter your system environment settings via the Window control path to put
the right directory into your PATH.
-
Download autoconf.
Autoconf is the program that converts configure.in files into
configure scripts. In many cases the CVS repository will only
contain configure.in and you must generate configure using autoconf.
Unfortunately, the autoconf script is not part of the cygwin tools. You
can download it from ftp.gnu.org. You'll probably need to
use one of the mirror sites.
Or, simply use this local copy from our FTP site:
autoconf-2.13.tar.gz
-
Install autoconf.
You'll use configure and make to install autoconf. Unpack the .tar.gz file (WinZip
can handle this format). Now, run bash and execute the following
commands to configure and install autoconf.
cd d:/autoconf-2.13
sh configure --prefix=d:/cygnus/cygwin-b20 --exec-prefix=d:/cygnus/cygwin-b20/H-i586-cygwin32
make
make install
The --prefix and --exec-prefix flags correspond to the Cygwin
installation directory structure. If you leave out the --prefix, the
default value is c:/usr/local, and --exec-prefix defaults to --prefix.
The --prefix and --exec-prefix flag are explained in more detail in
the TEA document. You'll see this sequence
of configure and make more when we build Tcl, Tk, and some extensions.
-
Build Tcl
If you build from the
CVS repository,
you must start by running autoconf to create the
configure script.
cd d:/tcl8.3/win
autoconf
If you start from a Tcl source distribution
from the FTP site, then this step has already been done.
(We are still
debating whether or not to put the configure file into CVS...)
Now create a directory to build in,
and configure the Makefile there, and run make to build Tcl
mkdir debug
cd debug
../configure --enable-symbols
make
make test
make install
-
Build an Extension
If you build from the
CVS repository,
you must start by running autoconf to create the
configure script.
cd d:/thread1.0/
autoconf
TEA extensions have their configure and Makefile at the top
of their directory structure. These files are shared by
UNIX and Windows builds. Run autoconf in the top directory.
Create a build directory
such as unix/solaris or win/debug. Change to that directory
and run the configure script to generate your platform-specific
Makefile. The --with-tcl flag is used to specify the
directory in which Tcl was built.
mkdir win/debug
cd win/debug
d:/thread1.0/configure --enable-symbols --with-tcl=d:/tcl8.3/win/debug
make
make test
make install
-
Common Problems
-
First, make sure you have Microsoft VC++ installed.
In theory it will be possible to use gcc on Windows, but the
configure files to not check for gcc nor set the correct
compiler flags.
-
If the configure step cannot find the compiler even though it is
installed, then your PATH probably does not include BIN directory
of Developer Studio (e.g., d:/program files/Microsoft Visual Studio/VC98/Bin).
There are a few other environment variables you need, too.
What I did was copy the VCVARS32.bat file into the CYGWIN.bat file
so everything is set up when I run bash.
-
If "make test" generates lots of errors, try running the test
suite from a directory on the local hard drive.
Many of the file system tests do not work well with remote
file systems.
-
If "make install" puts the files into the wrong locations,
specify the --prefix and --exec-prefix configure options to
set those installation locations properly.
Top of page Developer Home
| Ajuba
| Getting Started
| Tcl Advocacy
| Software Resources
| Documents
| Services
| Community
Search
| Site Map
| Feedback
| Contact Us
| webmaster@ajubasolutions.com
Increase page width
© 1998-2000 Ajuba Solutions. All rights reserved.
Legal Notice |
Privacy Statement
Last modified: August 07, 2000 |