Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
VM Recipe: How to build an interpreter VM on Linux
Last updated at 4:37 pm UTC on 25 April 2019
From the vm-dev list: http://lists.squeakfoundation.org/pipermail/vm-dev/2015-April/018259.html by Dave Lewis. These instructions are current as of June 2016.

This recipe is for compiling the VM from the C source code.

An interpreter VM uses the V3 image format.

The instructions in
How to build a standard VM with Squeak on Linux.
contain in addition how to generate the C source code from the Smalltalk VM source code.


The shell script for the build instructions below is mkvm

How to build an interpreter VM (1) from source on a typical Linux or Unix system:


Tools needed

Install development tools for your Linux system (32-bit libraries are not required).

Install CMake, either from your Linux distribution or from www.cmake.org.

Install Subversion, either from your Linux distribution or from https://subversion.apache.org/.

If you also want to make a Debian install package, install the checkinstall utility.

Steps

Make a new, empty, directory for your work.

In that directory, download the full platforms sources from the Subversion
repository. Download everything, whether you need it or not. The Subversion
directory information will be used in the build process, so do not cut
corners to save space.
   $ svn co http://squeakvm.org/svn/squeak/trunk/platforms
Also in the new directory, download the generated sources. This is an up to
date copy of source files generated from the Smalltalk source code in VMMaker.
You can generate them yourself by loading VMMaker, but using the files from
the Subversion repository is a faster way to get started.
   $ svn co http://squeakvm.org/svn/squeak/trunk/src
You will now have ./platforms and ./src directories with the latest source
code for the VM. Make another subdirectory called ./build that you will
use to build the VM.
   $ mkdir build
Change to the build directory.
   $ cd build
Copy the example Makefile into your build directory.
   $ cp ../platforms/unix/cmake/Makefile.example Makefile
Configure builds and make the VMs
   $ make
This will configure the builds to install the executable and libraries in /usr/local and will require sudo permissions to install them. If you don't have sudo permissions or wish to use a different installation directory, use the O= option to the make. For example :
   $ make O="${HOME}/squeak"
You may use P= option to provide the path to the platforms/ directory and S= option for the src/ directory. This make command will create two subdirectories, build/ and build64/, populate it with the configured Makefiles and then build the products.

Install the VM
   $ make install
You should have permissions to copy the products to the install directory specified earlier. Use sudo if necessary.

Create a Debian package
   $ make deb

Result

You now have a VM that runs that classic Squeak image formats, including
the 64-bit version (see http://build.squeak.org/job/Squeak%2064-bit%20image/).




(1) This is a traditional context interpreter VM. It will not run the latest
high performance Spur image formats. Please refer to the Cog and Spur VM
development at http://www.mirandabanda.org/cogblog/ and
http://www.mirandabanda.org/files/Cog/VM/ for the latest Cog and Spur
VM development, and for VMs that support the new Spur image formats.