Preparing to compile Kaya
To compile Kaya, you will need the following programs and libraries.
- The usual set of development tools - make, g++, etc.
- The Glasgow Haskell Compiler (ghc), version 5.0.4 or later.
- The MTL (monad transformer) package for Haskell
- The happy parser generator.
- A C++ compiler (g++, the GNU C compiler, is the only one we've tested)
- Shared libraries and development headers for
- On Windows only, libintl-2.dll and its dependencies from the GNUwin32 project.
Other optional libraries may also be built if you have the dependencies available. See the page for each optional library for more information.
See the page for your operating system for more information on obtaining those libraries (if your OS isn't listed, then ask on the mailing list for help - and we'll be very grateful for a description of the compiling process on that OS!)
Compiling Kaya
Go to the Kaya source directory and type:
- ./configure
This will hopefully prepare Kaya to be compiled. If you're missing a required library or program, you'll get a warning at this stage. By default, Kaya will be installed into
~/binand~/lib- if you want to change this, then use the--prefixoption (for example --prefix=/usr/local. - make
This should compile Kaya, hopefully without any trouble. If something goes wrong at this stage, please ask on the mailing list, and we'll help you sort it out.
In some circumstances a bug in make can cause Kaya programs run as part of the build process to crash. If this happens, use ulimit -s 32768 to work around the problem. (On other architectures and operating systems, setting this ulimit may cause intermittent crashes that would not otherwise have occurred)
- make test
A quick set of tests that Kaya is working as it should.
- make install
Installs Kaya. You should now be able to compile Kaya source code using kayac program.k.
Supported hardware and operating systems
Kaya has been compiled successfully at least once on the following architectures and Operating Systems. It should in theory compile on any system you can satisfy the dependencies for - we certainly want it to, so descriptions of where it fails are very much appreciated.
Hardware architectures
- AMD/Intel 32 or 64 bit PC
- Alpha
- Arm RISC
- Intel/PowerPC Apple Mac
- HP PA-RISC
- Mips and Mipsel
- Motorola 68000
- IBM S390
- Sun Sparc
Operating Systems
- Linux and other Unix-like OSes, including Mac OS X
- Microsoft Windows XP (via MinGW)
Compilation on Windows XP via Cygwin is not supported as Cygwin's support for wide characters is insufficient. We've not been able to test with the Microsoft C compiler yet, but it should work in theory - if you try it, please let us know how you get on.