[Vm-dev] Suspicious typing in Cog VM
David T. Lewis
lewis at mail.msen.com
Wed Dec 8 13:14:13 UTC 2010
On Wed, Dec 08, 2010 at 01:57:45PM +0100, Levente Uzonyi wrote:
> On Wed, 8 Dec 2010, David T. Lewis wrote:
> >On Wed, Dec 08, 2010 at 11:30:19AM +0300, Aleksej Saushev wrote:
> >> Hello!
> >>Types are inconsistent along the source, does Cog VM work on LP64
> >The README file at the root of the Cog distribution says this:
> >The Cogit currently supports only x86 and the floating-point
> >primitives and parts of the platform support code depend on SSE2.
> >I hope members of the community will attempt to port it, e.g. to
> >ARM, PowerPC and x86-64.
> >So no, you should not expect it to work on x86-64. But it should
> >work if you compile it in 32-bit mode on your x86-64 platform
> >(i.e. with "-m32" in the CFLAGS and LDFLAGS).
> >However, I have to admit that I have not yet been able to get
> >this working on my own 64-bit SuSE Linux box, due to issues
> >with libtool on my system. I've been assuming that this is a
> >problem with my Linux system, but I cannot say for sure.
> IIRC this is a problem on all 64-bit linux platforms. The trick is to add
> -m32 to CC instead of CFLAGS (CC="gcc -m32").
Thank you! The CC="gcc -m32" trick is exactly what I was looking for,
and I can now get a successful build.
You should be able to do the same thing on FreeBSD, although the
specifics of compiling 32-bit programs on 64-bit might be different.
FWIW, the configure command that I used is:
../platforms/unix/config/configure CC="gcc -m32" CFLAGS="-g -O2 \
-msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 \
-DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
More information about the Vm-dev