Below are my notes from building a VM capable of running memory.image. Note that I ran VMMaker three times - the first two times are not needed! I was just proceeding in small steps to do things like look at diffs etc etc.
Things that puzzle me:
- the calls to halt ("halt(3)" appears a lot in interp.c) - the call to cleanUpContexts - the error generating LargeIntegersPlugin - the nasty code in the generated LargeIntegersPlugin
Regards, Tony
== COMPILATION NOTES ==
Get http://squeakvm.org/unix/release/Squeak-3.9-8.src.tar.gz Get http://netjam.org/flow2a5.tar.gz Get http://www.netjam.org/flow/releases/current/bits/flow2aPrimitiveSources.zip Get http://damien.cassou.free.fr/squeak-dev/sq3.9-7067dev07.09.1.zip
Unzip sq3.9-7067dev07.09.1.zip somewhere convenient. - Untar Squeak-3.9-8.src.tar.gz into the resulting sq3.9-7067dev07.09.1 directory. - Unzip spoon.2a12.linux.zip as well - Unzip flow2a5.tar.gz, and rename "flow/" to "flow2a5/" - Unzip flow2aPrimitiveSources.zip, and rename "flow/" to "flow2a/"
Edit flow2a/platformSpecific/linux/Makefile.in, commenting out the "cp Flow.so $(plgdir)" line.
Open the image in the sq3.9-7067dev07.09.1 directory.
Open Package Universe Browser - Choose "--System--", "VMMaker", "3.8b6.1" - Middle-click "3.8b6.1", choose "select this version" - Click "install selection"
Much code downloading and installation happens.
Open VMMaker - click "Find Path" at the end of the "Path to platforms code" line - Choose your current working directory's subdirectory "Squeak-3.9-8". - Click OK - Click "Find platform" on the "Platform name" line. - Choose "unix" from the menu that appears. - Click "Core+Internal" on the "Generate" line - When it's done, save and quit the image
Rename away the generated source directory: $ mv src32 src32-without-patches
Reopen the Squeak-Dev image. File in "./spoon/components/spoonProcessor Changes.st" Click "Core+Internal" again. Save and quit the image again.
Rename the generated source directory appropriately: $ mv src32 src32-with-patches
If you like, examine the core changes to the interpreter: $ diff -w -ru3 src32-without-patches/ src32-with-patches/
Regenerate the VM one more time, with as many plugins as possible external, and the rest internal. - open the image - middle click "Plugins not built" in the VMMaker - choose "make all external" - drag "LargeIntegersSimulator" out of the "External Plugins" panel into the "Plugins not built" panel - click "Entire" - You get an error during LargeIntegersPlugin! Click "proceed". Save and quit the image.
Edit src32/vm/interp.c - add the line "#define halt(x)" to the top - search for the line "cleanUpContexts();" and comment it out
Now apply the changes to the VM sources and build the VM. $ rm -rf Squeak-3.9-8/platforms/unix/src $ rm -rf Squeak-3.9-8/platforms/unix/src32 $ rm -rf Squeak-3.9-8/platforms/unix/src64 $ mv src32 Squeak-3.9-8/platforms/unix/src $ mv Squeak-3.9-8/platforms/unix/src/plugins/Flow/ Flow-plugin-as-generated $ cp -r flow2a5 Squeak-3.9-8/platforms/unix/plugins/Flow $ cp flow2a/platformSpecific/linux/Makefile.in Squeak-3.9-8/platforms/unix/plugins/Flow/ $ mkdir Squeak-3.9-8/build $ (cd Squeak-3.9-8/platforms/unix/config/; make) $ (cd Squeak-3.9-8/build/; ../platforms/unix/config/configure --prefix=/opt/spoon)
Fix LargeIntegers.c line 1370 - comment out the line halt(,("missing primitive: ", primitiveName));
$ (cd Squeak-3.9-8/build/; make) $ (cd Squeak-3.9-8/build/; make install)
Now /opt/spoon/bin/squeak memory.image should work.