[Vm-dev] [Vm-beginners] Building Cog on FreeBSD
Frank Shearar
frank.shearar at angband.za.org
Sat Dec 4 17:19:24 UTC 2010
On 2010/12/04 16:37, David T. Lewis wrote:
>
> Forwarding from vm-beginners list
>
> ----- Forwarded message from Pierce Ng<pierce at netmemetic.com> -----
>
> Date: Sat, 4 Dec 2010 20:23:15 +0800
> From: Pierce Ng<pierce at netmemetic.com>
> To: vm-beginners at lists.squeakfoundation.org
> Subject: [Vm-beginners] Building Cog on FreeBSD
>
> I posted the following to squeak-dev, but it is pending moderator
> approval because I've unsubscribed from that list. In case it doesn't
> appear there, here it is.
>
> Here's how to build 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
Nit: this should be
patch-platforms__unix__plugins__PseudoTTYPlugin__openpty.h
(note the double underscore)
> 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>
Dump this into a file foo, and add
"platforms/Cross/plugins/SqueakFFIPrims/" in front of the filename, so
you can patch < foo
> - 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.
I can't run an image to test this (does someone have a test image that,
say, just spits the result of 3 + 4 to stdout? That'd be a great testing
tool!) but certainly the build completes without error after the
above-mentioned changes.
frank
More information about the Vm-dev
mailing list