5.1.1 The GNU/Linux way

Prepare for building

For Debian / Ubuntu users, install the needed packages:

 apt-get install subversion build-essential cmake gawk linux-libc-dev
 libecasound2.2-dev libasound2-dev libc6-dev gnulib libc6-dev
 libpulse-dev libxrender-dev uuid-dev libfreetype6-dev

For Archlinux users:

 pacman -S subversion gcc cmake gawk freetype2 libxrender

Get Squeak VM sources from the Subversion repository

As of April 2010, the last stable version of Squeak VM is 4.0.3 revision 2202. To check it out:

 svn co http://squeakvm.org/svn/squeak/trunk/platforms/ -r 2202

Build it!

The build process from an existing interpreter is straightforward. First, create a build directory in the platforms directory:

 cd path/to/platforms/ 
 mkdir build
 cd build

Then, execute CMake's configure script:


Finally, run make.


Now you should have the squeak binary in your build folder. You can test its sanity by opening a Pharo image:

 ./squeak path/to/my/pharo.image

And then running all Pharo unit tests.

Configure options

CMake's configure script has several options. To list them use:

 ../unix/cmake/configure --help 

You may want to use the prefix option so the make install command will put binaries in a chosen folder

 ../unix/cmake/configure --prefix=/home/user/squeakvm/mybuild 

CFLAGS options can be used to activate some GCC optimizations. Defaults flags on i386 are -g -O2 -fomit-frame-pointer , but on my machine, micro benchmarks are better with:

 ../unix/cmake/configure --CFLAGS="-O2 -fomit-frame-pointer -mfpmath=sse -march=native -s -mtune=generic" 

An easy way to check the impact of your CFLAGS is to open a Pharo image and evaluate:

 Transcript open. 
5 timesRepeat:
show: 1 tinyBenchmark;

Higher is better.

Add a Note

Licensed under Creative Commons BY-NC-SA | Published using Pier |