[Vm-dev] Building VM on 64-bit machines

David T. Lewis lewis at mail.msen.com
Sun May 20 18:09:34 UTC 2007


Hi Mandeep,

On Sun, May 20, 2007 at 12:56:20PM +0100, Mandeep Gill wrote:
> 
> I am trying to build the Squeak VM on 64-bit linux with gcc 4.1 but am
> having problems with both compiling the sources and running images.
> I'm found some information on www.squeakvm.org/squeak64, however I'm
> not sure how up to date it is.

It's not up to date at all.

> I've downloaded the latest sources from the squeak-vm subversion
> repository and have tried building it using several different compile
> options.
> 
> Trying to compile as per the standard instructions succeeds, but I am
> not sure what if it compiles a 32 or 64 bit VM. Regardless this VM
> crashes using the standard Squeak3.9-final-7067 image with a
> segmentation fault.

First some terminology. When Ian and Dan did the 64 bit port, they used
the term "64 bit image" to refer to an image in which all of the object
pointers had been converted from 32 bit values to 64 bit values, and the
term "64 bit host" to refer to a platform with 64 bit machine pointer
size. Any combination of 32/64 bit host and 32/64 bit image is possible,
but the combination you are interested in for you machine is 64 bit host
and 32 bit image (all currently available Squeak images are still in
32 bit format).

When you ran the 64 bit VM that you found on the internet, you were running
the 64 bit image/64 bit host flavor, and it was expecting you to feed it
a 64 bit image. When you fed it a normal 32 bit image, it complained about
not understanding the image format.

Back to your original question. Yes, some people are running 64 bit
systems, although very few seem to be working with 64 bit images. The
current VMMaker and Subversion sources are somewhat broken for 64 bit
systems. In order to build a VM to run 32 bit images on your 64 bit host,
you will need to add at least a couple of patches. I think that the
following will be sufficient to get you going:

- In your platforms directory (the one you got from Subversion), the
sqMemoryAccess.h file needs a patch. This is in Mantis bug report 4608
<http://bugs.squeak.org/view.php?id=4608>, and the actual patched file
is <http://bugs.squeak.org/file_download.php?file_id=2809&type=bug>.

- Apply the fix in Mantis 5688. You don't need this to get a running VM,
but you will not be able to connect to SqueakMap until you have included
this fix in your VM.

There are some other issues listed in the Mantis "Squeak 64 bit" category,
but I don't think you need to worry about them if you are just running
32 bit images.

Hope this helps,

Dave



More information about the Vm-dev mailing list