[Vm-dev] Getting stable Cog build on Ubuntu linux

Eliot Miranda eliot.miranda at gmail.com
Fri Oct 22 01:40:15 UTC 2010


On Thu, Oct 21, 2010 at 6:35 PM, Igor Stasenko <siguctua at gmail.com> wrote:

>
> Hello,
>
> few weeks ago i reported that i experienced Cog VM crashes soon after
> starting it.
> I though that it could be related to pthread library, listed twice in
> GCC options..
>
> I was managed to build a stable VM but now i found that problem is not in
> that!
> The VM, which i was built were using debugging-enabled, with all
> bells&whistles config..
> But once i tried a 'release' config, the VM is crashing:
>
> ../../platforms/unix/config/configure --without-vm-display-fbdev
> --without-npsqueak -prefix=/home/sig/cogvm/ CFLAGS="-g -O2 -msse2
> -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1
> -DCOGMTVM=0 -DDEBUGVM=0"
>
> Then i tried to gradually change various options and foudn that this
> one produces stable VM:
>
> ../../platforms/unix/config/configure --without-vm-display-fbdev
> --without-npsqueak -prefix=/home/sig/cogvm/ CFLAGS="-g -O1 -msse2
> -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1
> -DCOGMTVM=0 -DDEBUGVM=0"
>
> (the difference is just an optimization option O2 vs O1 )
>
> It seems like a compiler related issue..
> Any ideas what wrong with O2?
>
>
> gcc --version
> gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
> Copyright (C) 2009 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>

I'm pretty sure I use gcc 4.2.  You might want to try compiling the files
(especially cointerp.c cogit.c sqUnixThreads.c) with -O1 one by one to
localise the problem.  I've seen problems with the cogit's use of alloca and
if you look at the configure build system it forces compiling cogit.c with
-O1.  If you're perhaps using CMake then you'll want to modify it to compile
cogit.c with -O1 also.  The issue is the cogit's use of alloca which seems
to confuse gcc.

HTH
Eliot


>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20101021/0e6b46ba/attachment.htm


More information about the Vm-dev mailing list