Building Gwydion Dylan on Unix


Automatic Configuration

To configure Gwydion Dylan for your system, simply type
  /srcdir/configure
and wait for configure to figure things out. Note that you must either run configure using an absolute pathname or pass the absolute pathname of the source directory in explicitly using --srcdir=srcdir.

When configure is done, begin the compilation by typing "make (or "gmake" if you have GNU make). When the compilation is done, type "make install" to install the executable and libraries. (Note: you will need write permission for the directories that files are being installed to; see below)

The default installation directory for executables is /usr/local/bin; for libraries it is /usr/local/lib/dylan You can change the prefix for these paths from /usr/local to whatever by typing "configure --prefix=whatever". It is not a good idea to specify the path name using a tilde (~) because tilde has a special meaning only in csh. make uses sh, so tildes probably won't do what you want them to.

If you want to build in one-place while the sources are kept in another-place, then type:

    cd one-place; another-place/configure
and configure will construct the appropriate directories and Makefiles.

Custom Configuration

If the automatic configuration doesn't work, or if you need to specify different optimization options, etc., then things get more interesting, and you need to have some understanding of how things work. Though an Autoconf generated configure script is used as the front end to configuration, only the C code for mindy and mindycomp really make use of autoconf in any nontrivial way. All of the Dylan code is configured using the Makegen mechanism, which is a system of Perl scripts.

Autoconf overrides

The compilation of mindy and mindycomp can be tweaked via environment variables:
	CC	specifies the C compiler to use
	CCOPTS	specifies options to pass to the C compiler
	YACC	specifies the parser generator
	LEX	specifies the lexer generator
	LFLAGS	specifies the flags passed to LEX
The default C compiler options (CCOPTS) are "-g -O4 -finline-functions -Wall" if you are using gcc, and "-g -O" otherwise. If you are not using gcc, we highly recommend you read the man page for your compiler and supply the flags that ask for the maximum optimization. (Note that on many compilers, -g, "generate debugging information", and -O, "optimize", are mutually exclusive. If you have to choose between the two, go with optimization.)

Options can be passed to make by using environment variables: Using /bin/sh, say "VARNAME=option make -e" (-e tells make to look at the environment variables). Under gmake, options can also be passed via the command line: "gmake VARNAME=option".

Makegen parameters

To change parameters to Makegen, change the Defaults file at the root of the Gwydion build tree. The default Defaults is created by configure from configure.in.

You can clean up any previously made object files and executables with "make clean".

Here's what a sample installation might look like:

        /bin/sh           # Need the Bourne shell to pass options to make
	./configure --prefix=/usr/bob
	CCOPTS="-g -O3" make -e
	make install
	exit              # exit the shell you just launched
This would install binaries to /usr/bob/bin, and library files to /usr/bob/lib/dylan.

Porting Gwydion Dylan

In theory it should be possible to get Gwydion Dylan working on most any machine that has an ANSI C compiler. In practice, some assembly is required.

Porting Mindy
Mindy is pretty portable, and versions of Mindy have been successfully built on the following platforms:
	Hardware	OS		Compiler
	--------	--		--------
	HP Apollo	HPUX 9.03	gcc
	HP 9000/800	HPUX A.09.04	cc
	DEC pmax 	Mach 2.6	gcc
	DEC pmax	Ultrix 4.x	gcc
	SGI 		IRIX 4.0.5 	gcc and sgi-cc
	SGI 		IRIX 5.2 	sgi-cc
	Sun 		SunOS 4.11	gcc
	Sun		Solaris	2.3	cc
	IBM PowerPC 250	AIX 4.1		cc
	PC clone 	Linux 1.2.0     gcc

Mindy can not be built out of the box on the DEC Alpha. If you would like to port Mindy to the Alpha or any other architecture where Mindy does not easily compile, send mail to gwydion-bugs@cs.cmu.edu and we will try to provide as much help as we can.

Porting d2c
d2c is not as portable as Mindy:
  • It has some knowledge of the assembler pseudo-ops in order to build the initial heap image (no actual instructions are generated this way.)
  • It has to know how to run the C compiler, build libraries, run make, generate makefiles, etc.
  • It depends on the Boehm conservative garbage collector.

The main hooks for porting d2c are the Makegen Defaults and the platforms.descr files. So far every port has also required Dylan code modification, but you might be lucky. Extra work is required to port Melange and DIG, see the platform-specific files in those source directories. There is also some assembly code used by d2c to generate non-local exits.

It is possible to build d2c without a working d2c by boostrapping via Mindy. There's some support for this in configure and the Makegen files, but you need to run some stuff by hand. Peter Housel says this worked for him:

 mkdir build
 cd build
 $srcdir/configure
 gmake force.timestamp
 gmake -C mindy
 gmake -C common dbc_only
 gmake -C d2c
 gmake -C common
 gmake -C d2c d2c-compile
 gmake -C d2c install
 rm -f config.cache
 $srcdir/configure
 gmake

If you have successfully compiled Gwydion Dylan on another architecture, please send mail to gwydion-bugs@cs.cmu.edu and we will add that architecture to the list. Please include the operating system version and what compiler you used. If changes were required, please send diffs as well.

Build Trouble Shooting Tips

When I went to "make install" I got permission denied errors.
You need to be the super user to install into /usr/local. Become the super user, or ask you system admin to do it for you, or pick an unprivileged location, eg your home directory, and re-run configure: "./configure --prefix=$HOME; make install"

When I tried "prefix=$HOME make -e install" the shell said "prefix=$HOME: Command not found".
You're running a C shell, while our instructions tell you how to pass local environment bindings using the Bourne shell (/bin/sh). You can run the standard /bin/sh and repeat the procedure, or you may set the environments globally with the C shell `setenv' command before running make.

When I went to "make install" I got "cannot unlink" errors.
The install-sh script is trying to rename the files rather than copying them. Try "MVPROG=cp make install".

When I went to `make' the compiler choked making mindy/compat/sigaction.o.
Your machine does not have a POSIX signal handling package, and the default fallback to BSD signal handling didn't work either. You can try the System V emulation by adding -DUSG_SIGNALS to the options used to compile sigaction.o. Alternatively, there may be some magic word that is needed to open up the BSD compatibility on your system. Look in /usr/include/signal.h and see if it gives any clues.

Everything went fine until the final linking step for mindy or mindycomp, then I got a message about undefined symbols.
You've found a hole in our compat library. It could be easy or difficult to fix. Send mail to gwydion-bugs@cs.cmu.edu. Please include the operating system version and what compiler you used.

I'm compiling Mindy, and I get this error:
	ld: driver.o: relocation format botch (symbol type))
	collect2: ld returned 4 exit status
There is a bug in some versions of gcc for the Sun. Try recompiling driver.o with a different compiler or with optimizations off.


[ Gwydion home page | mail to gwydion-group ]