[squeak-dev] Building CogVM on FreeBSD

Pierce Ng pierce at netmemetic.com
Sat Dec 4 09:30:27 UTC 2010


Hi,

Here's how to build the Cog VM on FreeBSD.

First, some numbers. Cog, PharoCore 1.1.1, FreeBSD 7.3:

  439108061 bytecodes/sec; 44986622 sends/sec
  484848484 bytecodes/sec; 44903004 sends/sec
  464609800 bytecodes/sec; 45028548 sends/sec
  480300187 bytecodes/sec; 46726917 sends/sec
  485768500 bytecodes/sec; 47229357 sends/sec

4.0.3-2202, a slighly older non-compatible Pharo image, same FreeBSD 7.3:

  525667351 bytecodes/sec; 15328014 sends/sec
  548473486 bytecodes/sec; 14943262 sends/sec
  545260915 bytecodes/sec; 14728594 sends/sec
  545260915 bytecodes/sec; 14600418 sends/sec
  524590163 bytecodes/sec; 14646769 sends/sec

Build the VM on a 32bit FreeBSD boxen.

- Download the sources:

  $ svn co http://squeakvm.org/svn/squeak/branches/Cog/platforms
  $ svn co http://squeakvm.org/svn/squeak/branches/Cog/src
  $ svn co http://squeakvm.org/svn/squeak/branches/Cog/unixbuild

- Apply the following patches from the FreeBSD port of Squeak, found in
/usr/ports/lang/squeak/files:

  patch-platforms__Cross__plugins__Mpeg3Plugin__libmpeg__mpeg3io.h
  patch-platforms__unix__config__configure
  patch-platforms__unix__plugins__PseudoTTYPlugin_openpty.h
  patch-platforms__unix__plugins__SqueakFFIPrims__ffi-config

- Apply the following patch to platforms/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c:

--- sqFFIPlugin.c.bak	2010-12-03 23:41:56.000000000 +0800
+++ sqFFIPlugin.c	2010-12-04 14:38:02.000000000 +0800
@@ -10,7 +10,7 @@
 *****************************************************************************/
 
 #include <stdio.h>
-#if !WIN32
+#if !defined(WIN32 ) && !defined(__FreeBSD__)
 # include <alloca.h>
 #endif
 #include <string.h>

- Configure the VM as follows in the 'bld' directory:

$ ../../platforms/unix/config/configure \
  CFLAGS="-g -O -msse2 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" \
  --without-npsqueak

- Build the VM. Voila.

HTH.





More information about the Squeak-dev mailing list