Monday, December 14, 2009

GNU smalltalk 3.1 on OSX 10.6

I tried to get GNU smalltalk running on Snow Leopard, but ran into trouble. First, it segmented but I found a fix online saying to make a change around line 628 in sigsegv/

+    macos* | darwin*)
+ AC_CHECK_FUNC([vm_region], [CFG_STACKVMA=stackvma-mach.c]) ;;

That helped, but then I ran into the following:

(gdb) run --no-user-files --kernel-dir=/Users/beaty/src/smalltalk-3.1/kernel --image=/Users/beaty/src/smalltalk-3.1/ -iQ /dev/null
Starting program: /Users/beaty/src/smalltalk-3.1/.libs/gst --no-user-files --kernel-dir=/Users/beaty/src/smalltalk-3.1/kernel --image=/Users/beaty/src/smalltalk-3.1/ -iQ /dev/null
dyld: Library not loaded: /usr/local/lib/libgst.7.dylib
Referenced from: /Users/beaty/src/smalltalk-3.1/.libs/gst
Reason: image not found

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007fff5fc01065 in __dyld_dyld_fatal_error ()

So, I had to:
export DYLD_LIBRARY_PATH=$HOME/lib:/usr/local/lib:/lib:/usr/lib:$HOME/src/smalltalk-3.1/libgst/.libs:/Users/beaty/src/smalltalk-3.1/sigsegv/src/.libs

At that point, it bus errored. Firing up gdb gave:

Program received signal SIGBUS, Bus error.
0x0000000100048190 in _gst_mem_alloc (h=0x100200ca0, sz=16) at alloc.c:222
222 blk-> = mem->next;
(gdb) where
#0 0x0000000100048190 in _gst_mem_alloc (h=0x100200ca0, sz=16) at alloc.c:222
#1 0x00000001000233bf in _gst_tenure_oop (oop=0x101014890) at oop.c:738
Previous frame inner to this frame (gdb could not unwind past this frame)

And at that point I gave up (partially because it installed without a hitch on a Linux box) and used MacPorts to grab gst. That worked, but I had hope to install only gst instead of all that MacPorts installs along with it. Dunno if this will help anyone, but maybe it will...

No comments: