[Vm-dev] Suspicious typing in Cog VM

Pierce Ng pierce at netmemetic.com
Thu Dec 9 01:42:32 UTC 2010

On Wed, Dec 08, 2010 at 02:32:35PM +0000, Frank Shearar wrote:
> >FWIW, the configure command that I used is:
> >
> >   ../platforms/unix/config/configure CC="gcc -m32" CFLAGS="-g -O2 \
> >   -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
> I'm getting (on FreeBSD 7.3, gcc 4.2.1) configure failing with "C 
> compiler cannot create executables", and config.log talking of "exit 77".

On FreeBSD you need to install the 32 bit libraries, which will go into
/usr/lib32. Then set CC="gcc -m32 -B/usr/lib32". However, it still doesn't
compile cleanly on 7.3 amd64: I get errors like these (that don't occur
when compiling on a 7.3 x86):

- pageMask undeclared (sqUnixMemory.c)
- PROT_READ undeclared (ditto)
- etc.

The other day I posted on how to compile Cog on 32bit FreeBSD. I left out
the parts about fixing type mismatches (int in .h and sqInt in .c, etc.)
because these need to be done on Linux and OSX (via unixbuild) as well, so
it didn't occur to me to mention them. Once you fix these, you should be
able to get Cog running on FreeBSD 7.3 x86.


More information about the Vm-dev mailing list