Difference between revisions of "Compiling EiffelStudio"

(Removed unix Specific since we fixed the problem causing unresolved externals.)
(Installing EiffelStudio)
Line 4: Line 4:
 
== Installing EiffelStudio ==
 
== Installing EiffelStudio ==
  
To compile EiffelStudio, you need an already working EiffelStudio compiler on your machine. The current source tree '''requires at least version 5.7''' of EiffelStudio. You can download it from http://eiffelsoftware.origo.ethz.ch/downloads/builds/. This version still requires a registration (we missed to remove the registration cluster while compiling). You need to '''activate''' EiffelStudio (see below), because in some cases the compiler won't work correctly if not activated. [[Installing EiffelStudio]] is covered in its own article.
+
To compile EiffelStudio, you need an already working EiffelStudio compiler on your machine. The current source tree '''requires at least version 5.7''' of EiffelStudio. You can download it from http://eiffelsoftware.origo.ethz.ch/downloads/builds/. [[Installing EiffelStudio]] is covered in its own article.
  
 
'''Note:''' on Windows you will need the Microsoft C compiler to compile Eiffel Studio. How to install the free version of the Microsoft C compiler: [[Installing Microsoft C compiler]]. It is not possible to compile EiffelStudio with the free Borland compiler.
 
'''Note:''' on Windows you will need the Microsoft C compiler to compile Eiffel Studio. How to install the free version of the Microsoft C compiler: [[Installing Microsoft C compiler]]. It is not possible to compile EiffelStudio with the free Borland compiler.

Revision as of 12:43, 15 June 2006


Installing EiffelStudio

To compile EiffelStudio, you need an already working EiffelStudio compiler on your machine. The current source tree requires at least version 5.7 of EiffelStudio. You can download it from http://eiffelsoftware.origo.ethz.ch/downloads/builds/. Installing EiffelStudio is covered in its own article.

Note: on Windows you will need the Microsoft C compiler to compile Eiffel Studio. How to install the free version of the Microsoft C compiler: Installing Microsoft C compiler. It is not possible to compile EiffelStudio with the free Borland compiler.

Compilation methods

Currently there are two compilation methods.

  • You can use one of the Automatic Build Scripts
  • Alternatively you can compile EiffelStudio from scratch following the instructions in this document.

If possible, use the Automatic Build Scripts and report any errors to the developer mailing list.

Extracting source code

Checking out from SVN

  1. Point an environment variable called EIFFEL_SRC to the directory where you want to compile EiffelStudio
    Usually we use the XXdev convention for this directory name - where XX is the version number from the current developped version of the compiler.
  2. Make sure that ISE_EIFFEL, ISE_PLATFORM and ISE_C_COMPILER (on windows only) are properly defined
  3. Perform the following checkout procedures:


DOS

set SVNURL=https://eiffelsoftware.origo.ethz.ch/svn/es
svn co %SVNURL%/trunk/Src 57dev
svn co %SVNURL%/trunk/Delivery 57dev/Delivery
svn co %SVNURL%/trunk/free_add_ons 57dev/free_add_ons

Bash

export SVNURL=https://eiffelsoftware.origo.ethz.ch/svn/es
svn co $SVNURL/trunk/Src 57dev
svn co $SVNURL/trunk/Delivery 57dev/Delivery
svn co $SVNURL/trunk/free_add_ons 57dev/free_add_ons


To update the sourcefiles to the latest revision, perform the following steps:

Bash and DOS

cd 57dev
svn up
svn up free_add_ons
svn up Delivery

Installing gobo

Please make sure to use the version provided or the very latest version from CVS. All other versions (including the official 3.4 release) will not work because of name clashes in the UC_STRING class between GOBO and EiffelStudio.


Windows specific

You have to extract the gobo distribution from $EIFFEL_SRC/free_add_ons/gobo/gobo_34_win.tgz and extract it into $EIFFEL_SRC/library. Here is how to do it:

DOS

cd %EIFFEL_SRC%\library
tar xvfz %EIFFEL_SRC%\free_add_ons\gobo\gobo_34_win.tgz

Bash

cd $EIFFEL_SRC/library
tar xvzf $EIFFEL_SRC/free_add_ons/gobo/gobo_34_win.tgz

Unix specific

You have to extract the gobo distribution from $EIFFEL_SRC/free_add_ons/gobo/gobo_34_unix.tgz and extract it into $EIFFEL_SRC/library. Here is the list of commands to do this:

cd $EIFFEL_SRC/library
tar xvzf $EIFFEL_SRC/free_add_ons/gobo/gobo_34_unix.tgz

Compiling C libraries

Compiling run-time on Windows

Before being able to compile the run-time, you need to ensure that bash is in your PATH. You can download it from http://www.cygwin.com. Also make sure, that the path to the binaries of your c compiler is placed before the path to cygwin or else the wrong linker will be used. Once done you can do:
Important: if you are using the setup as described in Installing Microsoft C compiler please read this first: mail from manus
you need to replace this file: %EIFFEL_SRC%/C/CONFIGS/windows-msc-x86

DOS

cd %EIFFEL_SRC%/C
configure [win32|win64] [b|m]

Bash

cd $EIFFEL_SRC/C
./configure.bat [win32|win64] [b|m]

The first argument indicated whether you are compiling the run-time for 32 or 64 bits. The second one is to tell which C compiler will be used. For now only `b' (Borland) and `m' (Microsoft) are officially supported. We also informally support `g' (GCC) and `l' (LCC).

On Windows 32 bits to clean up all the generated files you do:

DOS

configure clean

Bash

./configure.bat clean

Compiling run-time on Unix

The command is simply:

cd $EIFFEL_SRC/C
./quick_configure

This requires that ISE_PLATFORM is properly defined. The `quick_configure' script will look for the file CONFIGS/$ISE_PLATFORM and use it to extract the platform specific information to compile the run-time. If not found then an error will be reported.

To clean up the generated files:

make clobber

Compiling C code from libraries

Here is the list of commands to compile all required C libraries on Windows:

DOS

cd %EIFFEL_SRC%/library/net/Clib
make_msc.bat
cd %EIFFEL_SRC%/library/vision2/Clib
make_msc.bat
cd %EIFFEL_SRC%/library/wel/Clib
make_msc.bat

Bash

cd $EIFFEL_SRC/library/net/Clib
./make_msc.bat
cd $EIFFEL_SRC/library/vision2/Clib
./make_msc.bat
cd $EIFFEL_SRC/library/wel/Clib
./make_msc.bat

On Unix it is slightly different:

cd $EIFFEL_SRC/library/event/Clib
finish_freezing -library
cd $EIFFEL_SRC/library/net/Clib
finish_freezing -library
cd $EIFFEL_SRC/library/vision2/Clib
finish_freezing -library
cd $EIFFEL_SRC/library/vision2/implementation/gtk/Clib
finish_freezing -library

Make sure that ISE_EIFFEL is set correctly to your current "EiffelStudio" installation!

Compiling C code from C_library

This is only required on Windows to read PNG file. On Unix, this is not required because it is included in GTK+2.4. Simply do the following:

DOS

cd %EIFFEL_SRC%/C_library/zlib
make_msc.bat
cd %EIFFEL_SRC%/C_library/libpng
make_msc.bat

Bash

cd $EIFFEL_SRC/C_library/zlib
./make_msc.bat
cd $EIFFEL_SRC/C_library/libpng
./make_msc.bat

Compiling C code from compiler

This is only required on Windows as this C code is a tiny wrapper around the Microsoft C++ API to generate and to debug .NET code.

To compile it, you first need to install the Microsoft .NET SDK. You can download it from their website.

After installing it, you need to update your LIB and INCLUDE environment variable to include the path the lib and include directory of the .NET Framework SDK.

Once properly installed, you can do:

DOS

cd %EIFFEL_SRC%/Eiffel/library/cli_writer/Clib
nmake

Bash

cd $EIFFEL_SRC/Eiffel/library/cli_writer/Clib
nmake

Compiling EiffelStudio

Now that we have taken care of the C code compilation we can compile the compiler. We assume that ec is in your path.

The configuration file of the compiler contains two active targets:

  • batch: for the command line compiler.
  • bench: for the graphical compiler, aka EiffelStudio.

Go to $EIFFEL_SRC/Eiffel/Ace and type the following command and replace target_name with either batch or bench.

ec -config ec.acex -target target_name -c_compile

Information.png Note: If you are using an older version of EiffelStudio (i.e. older or equal to 5.7.0826), follow the instructions from Compiling EiffelStudio with an Ace file.

Gotcha

Also, if you encounter problems with your self-compiled version of EiffelStudio, you might try to compile it with GCC 3.x. Version 4 of GCC has a slight change in semantics and EiffelStudio has not been updated. You can see the change in behavior in the following code:

#include <stdio.h>
 
int a;
int b;
int *pointer;
 
int foo()
{
  pointer = &b;
  return 4;
}
 
int main (int argc, char** argv) 
{
  a = 3;
  b = 0;
 
  pointer = &a;
 
  *pointer = foo();
 
  printf ("You are using GCC %d.%d\n",a,b);
  return 0;  
}

Mac OS X specific

Get a mac binary from here, then follow the instructions for unix.