On Wed, Mar 05, 2014 at 09:21:05AM +0100, Friedrich Dominicus wrote:
> Pierce Ng <pie...@samadhiweb.com> writes:
> > I am a long time FreeBSD user. Right now an instance of my blog is running
> > on Pharo 1.4 on CogVM on FreeBSD 8.x.
> How did you build the Pharo VM?

Used to need to patch the source. Here's an old post from me:
http://forum.world.st/Building-Cog-on-FreeBSD-td3072348.html.

Patching is no longer needed. Periodically, I build from source from both
Git and SVN repositories. However, recently I'm somewhat confused which
Git-based version to use, so I build from the SVN-based source.

Basically, over time, I settled on this script, based on my experimentation
and reading stuff I found on the net:

  #!/bin/sh
  ../../platforms/unix/config/configure \
      CC="gcc -m32" CXX="g++ -m32" \
      CFLAGS="-g -O -msse2 -DNDEBUG -DTIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 
-DCOGMTVM=0 -DDEBUGVM=0 -DNOEXECINFO" \
      --enable-mpg-mmx=no --enable-mpg-pthreads=no --without-npsqueak
  make

There is some funny thing about the FFI: One particular version of the
SqueakFFIPrims plugin works. But several other versions that I've built
all fail. 

Also, NativeBoost doesn't work on FreeBSD. In terms of dlfcn.h constants
such as RTLD_LAZY etc, FreeBSD is more like OSX than like Linux. (Or
perhaps I should say OSX is like FreeBSD.) I have built a VM on FreeBSD in
which "NativeBoost forCurrentPlatform" says "NativeBoostMac32" while
"OSPlatform current" says "UnixPlatform" but the dynamic linking doesn't
work yet. From reading assembly programming tutorials for FreeBSD, Linux
and OSX, my current conjecture is around stack popping, but I've never done
assembly programming for real on these Unixen, so this is just guesswork on
my part.

I hope NativeBoost will work on FreeBSD eventually. All the world's not
just Linux, OSX and Windows.


-- 
Pierce Ng
http://samadhiweb.com/blog/


Reply via email to