[squeak-dev] Building CogVM on FreeBSD

Frank Shearar frank.shearar at angband.za.org
Sun Dec 5 18:14:54 UTC 2010


On 2010/12/04 09:30, Pierce Ng wrote:
> Hi,
>
> Here's how to build the Cog VM on FreeBSD.

Glad to see your mail make it to squeak-dev, Pierce. I posted some 
comments on vm-dev, and I'll reproduce them here. (I don't know if 
you're subscribed there.)

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

Typo nit: this should be

   patch-platforms__unix__plugins__PseudoTTYPlugin__openpty.h

(note the double underscore)

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

And building completed without error! I haven't attempted running an 
image; I only have terminal access to a FreeBSD machine.

I'd mentioned in vm-dev that it would be really useful to have an image 
that only evaluated "3 + 4" and wrote that to stdout. (Maybe someone 
already has one?) We could use that with a Hudson instance, and verify 
our VM builds automatically.

frank



More information about the Squeak-dev mailing list