Historical Compiling40, Revision 5
Intro
Why?
- Because you want to help find and fix bugs?
- Because you want to play with the new changes?
- Because you want to help develop?
- Because you want to just see what's happened?
Why not?
- To run the control software for your company's Nuclear Power Plant.
It should be noted at this time that 4.0 is under very active development. Bugs will exist. API changes will take place. The code is not stable. If you have any questions about these, please see the Why? and Why not? sections again.
Windows
You must first download and install a few required development tools in order to compile Euphoria 4.0 from scratch.
Install
Subversion
Subversion is a tool to access the development source code repository that all developers who work on Euphoria use to keep everyone's code in sync. You must download Subversion and install it in order to get the Euphoria 4.0 source. There are many clients, but for simplicity's sake, I will be describing the use of the command line client. If you are familiar with Subversion, then feel free to use your favorite client to access the source.
The command line client can be downloaded from http://subversion.tigris.org/files/documents/15/41687/svn-1.4.6-setup.exe ... Install this application as any other. You may need to restart your computer for the changes to take effect, but save some time and wait until the end of the installing all three tools, thus you only have to restart once.
I want the source but don't want install Subversion stuff!!!
If you don't want to install subversion you can simply download a tar file with current development trunk at: http://rapideuphoria.svn.sourceforge.net/viewvc/rapideuphoria/trunk.tar.gz?view=tar Decompress this file to C:\EU40 keeping internal directory structure.
Open Watcom
OpenWatcom is the C compiler in which we will use to compile Euphoria. At the time of this writing, 1.7a is the latest version and can be downloaded from http://www.openwatcom.org/index.php/Download
It is also like any other installer. During the install, you should choose to include 16bit and 32bit compilers as well as DOS and Windows platforms.
Euphoria 3.1.1
Euphoria cannot be built using Euphoria 3.1.1. You either need to download a pre-built binary, or start from a pre-translated source tree. The reason for this is that the front end of Euphoria is written in Euphoria itself, and some new 4.0 features are used in the code (including the standard library).
Build
using makefiles
Launch a command shell. Now, before doing anything more let's make sure we have a few things in our path. Typing wmake should run the OpenWatcom make program. You will receive an error about no makefile, but that's OK right now. Typing svn should run the svn client and finally typing exwc should run Euphoria 3.1.1 (press enter on the file? prompt). If all three of those programs ran, we are ready to start. If you have download source as tar file you don't need first step.
Note that these instructions will build all Windows and DOS binaries. Look at the top of makefile.wat for details on how to
C:\> svn co http://rapideuphoria.svn.sourceforge.net/svnroot/rapideuphoria/trunk EU40 ... a lot of messages stating filenames ... C:\> SET EUINC=C:\EU40\include C:\> cd \EU40\source C:\EU40\source> configure --prefix \EU40 C:\EU40\source> wmake -f makefile.wat .... alot of build messages .... C:\EU40\source> wmake -f makefile.wat test .... lot's of activity, and a summary at the end .... .... hopefully, everything passes ... C:\EU40\source> wmake -f makefile.wat install .... lots of copying .... C:\EU40\source> SET EUDIR=C:\EU40 C:\EU40\source> SET PATH=C:\EU40\bin;%PATH% C:\EU40\source> cd .. C:\EU40> exwc Euphoria Interpreter 4.0 (development) for 32-bit Windows. ... filename to execute? (just press enter)
4.0 is now installed on your Windows computer. To use, you must make sure that at least two environment variables are set:
EUDIR=C:\EU40 PATH=C:\EU40\bin;....other paths here....
using Jam
Jam is being considered as a replacement for the current series of makefiles to build euphoria and other tools. the makefiles used to build euphoria and tools is difficult to maintain, only a few people really understand them. they only work for a few compilers and the dev's have to maintain a version for windows compiler and one for unix like compilers.
the windows jam executable is in euphoria/bin/jam.exe & svn. (what about other systems?)
here's a sample session with jam from the euphoria root directory:
in jamfiles and commands case important trailing space, space before or after punctuation is significant. C:\Euphoria> SET JAM_TOOLSET=WATCOM C:\Euphoria> jam Compiler is Watcom C/C++ ERROR: config.jam does not yet exist To create the config.jam file, use jam VARNAME=VALUE config Valid options are: DEBUG=on|off Enable/Disable debug mode (default: off) MANAGED_MEM=on|off Enable/Disable managed memory (default: on) BUILD_DIR=dir Directory to build Euphoria and related tools in (default: build) To create a default configuration file, simply run the command: jam config Values can be changed at any time. Changing one value will not affect other values. For instance, if you have a custom build directory you can use jam DEBUG=on config and jam DEBUG=off config to toggle the debug setting without affecting the previously set custom build directory. C:\Euphoria> jam config Compiler is Watcom C/C++ Configuration settings: BUILD_DIR=build DEBUG=no MANAGED_MEMORY=on ...found 1 target(s)... ...updating 1 target(s)... WriteConfig config ...updated 1 target(s)... C:\Euphoria> jam
if the config file is not created,
cat > config.jam BUILD_DIR ?= build ; DEBUG ?= no ; MANAGED_MEMORY ?= off ; ^DThe ?= means, set it if it's not already set. This allows you to do one-off builds such as: jam BUILD_DIR=good eui ... that will override the config file for that one invocation.
You can use jam -dx which will display the executable commands for each operation it does. As a side note, jam -dd eui is cool, it shows a dependency tree.
you can get jam to write all the commands to a batch file jam -ojambuild.bat
win98 conciderations
in config.jam, for win98 compatibility use MANAGED_MEMORY ?= on ;
use the option to have jam create a batch file which you can edit to fix the wlink line >1000. characters and get around jam trying to run cmd.exe instead of command.com .
add a cd and replace all the dir lines to shorten them then cd back out to the root.
change this line, when b\ is the build dir wlib -q b\ebackend.lib +-b\ebackend\be_alloc.obj etc etc to this cd b\ebackend wlib -q ebackend.lib +-be_alloc.obj +-be_callc.obj etc etc cd ..\.. if not exist b\ebackend\ebackend.lib exitthat or something like it should get you to building ebackend.lib if jam errors while running wlib. otherwise it is preferable to run jam directly with a simple cmd.exe replacement. the batch file quickly is out of date and could error if run a second time. will also be a problem if there are errors in the compile requiring a second batch file to be created and edited...
Final Tasks
I will leave making those environment variables persistent up to you. It should be noted again that 4.0 is under very active development and should not be used for production purposes.
- diff to current revision, view current revision history, backlinks
- Last modified Aug 27, 2009 by ne1uno