[Vm-dev] VM Recipe: How to build an interpreter VM on Linux

Tobias Pape Das.Linux at gmx.de
Mon Apr 13 12:34:24 UTC 2015


On 13.04.2015, at 14:19, David T. Lewis <lewis at mail.msen.com> wrote:

> 
> On Mon, Apr 13, 2015 at 07:54:39AM +0200, Tobias Pape wrote:
>> 
>> Hi,
>> 
>> On 13.04.2015, at 04:57, David T. Lewis <lewis at mail.msen.com> wrote:
>> 
>>> 
>>> How to build an interpreter VM from source on a typical Linux or Unix system:
>>> 
>>> 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 distributiion or from
>>> https://subversion.apache.org/
>>> 
>>> 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
>>> 
>>> Build the VM
>>> 
>>> $ make
>>> 
>> 
>> Hang on, I thought this was all CMake now.
>> Wouldn't I just do
>> 
>> cmake .. # or ccmake for that matter
>> make
>> # and so on
> 
> It is all CMake. I just added a makefile to drive the overall process.
> 
> The CMake build process is described in platforms/unix/README.CMake
> 
> 

Okee. :)

> 
>> 
>>> Install the VM
>>> 
>>> $ sudo make install
>>> 
>>> 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/).
>> 
>> This runs _both_ 32 bit  images and 64 bit images?
>> Nice!
>> 
> 
> Yes, this builds the executables for those image types (but not Spur of course).
> The /usr/local/bin/squeak script selects the correct executable based on image
> format number. If you look in your /usr/local/lib/squeak/ directory, you will
> see one subdirectory for the 32-bit images, and another subdirectory
> called <version>_64bit for running 64-bit images. From the user point of view,
> it looks like a single VM.

AAh I thought it actually was a bi-bit binary.
(which would actually be usefull………)

Best
	-Tobias

> 
> Dave
> 
>> 
>>> 
>>> 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.
>>> 
>>> Dave




More information about the Vm-dev mailing list