Re: CogVM OpenBSD and the Call Stack
I will attempt as you have said. I have already done other things and managed to get a successfull build. I can even load a pharo image successfully! Thats about it, do anything, and it crashes. I will do as you say and report back. In the mean time comments are welcome. Output from crash: $ ./squeak /home/dusty/pharo-image/pharo.image relocating call to invalid address Squeak VM version: 4.0-2552 #1 Mon Jun 4 19:52:45 SAST 2012 gcc 4.2.1 Built from: CoInterpreter VMMaker.oscog-eem.159 uuid: cbf7f95a-6fe2-4578-898e-47afb8524be4 Jun 4 2012 With: StackToRegisterMappingCogit VMMaker.oscog-eem.159 uuid: cbf7f95a-6fe2-4578-898e-47afb8524be4 Jun 4 2012 Revision: VM: r2552 http://www.squeakvm.org/svn/squeak/branches/Cog Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins Build host: OpenBSD dent.local 5.1 GENERIC#160 i386 plugin path: /home/dusty/CogVM/CogVM/unixbuild/bld/ [default: /home/dusty/CogVM/CogVM/unixbuild/bld/] Abort trap (core dumped) $ Code where the error message comes from (cogit.c): snip... static void relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta) { sqInt distance; if (delta != 0) { distance = byteAt(retpc - 1)) 24) + ((byteAt(retpc - 2)) 16)) + ((byteAt(retpc - 3)) 8)) + (byteAt(retpc - 4)); distance += delta; byteAtput(retpc - 1, (((usqInt) distance) 24) 255); byteAtput(retpc - 2, (((usqInt) distance) 16) 255); byteAtput(retpc - 3, (((usqInt) distance) 8) 255); byteAtput(retpc - 4, distance 255); if (0) { assertusqInt) (callTargetFromReturnAddress(self_in_relocateCallBeforeReturnPCby, retpc = (minCallAddress())); } else { if (!usqInt) (callTargetFromReturnAddress(self_in_relocateCallBeforeReturnPCby, retpc = (minCallAddress( { error(relocating call to invalid address); } } } } .../snip On , Stuart Henderson s...@spacehopper.org wrote: On 2012/06/02 15:07, Dusty wrote: In my feeble and ignorance, I'm attempting to build CogVM on OpenBSD. I've come across some problems that my limited skills cannot solve. -I/home/dusty/CogVM/openCogVm/platforms/Cross/vm -I/home/dusty/CogVM/openCogVm/src/vm -I/usr/X11R6/include -c -o sqUnixMain.o /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:62:22: error: execinfo.h: No such file or directory Build with -I/usr/local/include (and install the libexecinfo port if you haven't already) /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:820:3: error: #error need to implement extracting pc from a ucontext_t on this system If this is the ucontext.h stuff, afaik nobody has implemented ucontext for OpenBSD, certainly it's not in-tree.
Re: CogVM OpenBSD and the Call Stack
Ok, result after execinfo.h and -I/stuff, also -DDEBUG and turning DEBUGVM=1 on. $ ./squeak /home/dusty/pharo-image/pharo.image ioFindExternalFunctionIn(display_X11, 0xfffe): Unable to resolve symbol ioFindExternalFunctionIn(sound_OSS, 0xfffe): Unable to resolve symbol ioFindExternalFunctionIn(sound_MacOSX, 0xfffe): Unable to resolve symbol ioFindExternalFunctionIn(sound_Sun, 0xfffe): Unable to resolve symbol ioFindExternalFunctionIn(sound_pulse, 0xfffe): Unable to resolve symbol ioFindExternalFunctionIn(sound_ALSA, 0xfffe): Unable to resolve symbol ioFindExternalFunctionIn(sound_null, 0xfffe): Unable to resolve symbol uxAllocateMemory: pageSize 0x1000 (4096), mask 0xf000 uxAllocateMemory: /dev/zero descriptor -1 uxAllocateMemory: min heap 27418528, desired 46292960 uxAllocateMemory: mapping 0x4000 bytes (1024 Mbytes) uxAllocateMemory: mapping 0x3000 bytes (768 Mbytes) uxAllocateMemory: mapping 0x2400 bytes (576 Mbytes) uxAllocateMemory: mapping 0x1b00 bytes (432 Mbytes) relocating call to invalid address Squeak VM version: 4.0-2552 #1 Mon Jun 4 20:13:12 SAST 2012 gcc 4.2.1 Built from: CoInterpreter VMMaker.oscog-eem.159 uuid: cbf7f95a-6fe2-4578-898e-47afb8524be4 Jun 4 2012 With: StackToRegisterMappingCogit VMMaker.oscog-eem.159 uuid: cbf7f95a-6fe2-4578-898e-47afb8524be4 Jun 4 2012 Revision: VM: r2552 http://www.squeakvm.org/svn/squeak/branches/Cog Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins Build host: OpenBSD dent.local 5.1 GENERIC#160 i386 plugin path: /home/dusty/CogVM/CogVM/unixbuild/bld/ [default: /home/dusty/CogVM/CogVM/unixbuild/bld/] Abort trap (core dumped) $ Please keep in mind I'm not a programmer. So any help is much appreciated. Thanks On , Stuart Henderson s...@spacehopper.org wrote: On 2012/06/02 15:07, Dusty wrote: In my feeble and ignorance, I'm attempting to build CogVM on OpenBSD. I've come across some problems that my limited skills cannot solve. -I/home/dusty/CogVM/openCogVm/platforms/Cross/vm -I/home/dusty/CogVM/openCogVm/src/vm -I/usr/X11R6/include -c -o sqUnixMain.o /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:62:22: error: execinfo.h: No such file or directory Build with -I/usr/local/include (and install the libexecinfo port if you haven't already) /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:820:3: error: #error need to implement extracting pc from a ucontext_t on this system If this is the ucontext.h stuff, afaik nobody has implemented ucontext for OpenBSD, certainly it's not in-tree.
CogVM OpenBSD and the Call Stack
Hi In my feeble and ignorance, I'm attempting to build CogVM on OpenBSD. I've come across some problems that my limited skills cannot solve. $ make gcc -g -O2 -msse2 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0 -I/usr/X11R6/include -I/usr/local/include -msse -DLSB_FIRST=1 -DHAVE_CONFIG_H -DSQUEAK_BUILTIN_PLUGIN -I/home/dusty/CogVM/openCogVm/unixbuild/bld -I/home/dusty/CogVM/openCogVm/unixbuild/bld -I/home/dusty/CogVM/openCogVm/platforms/unix/vm -I/home/dusty/CogVM/openCogVm/platforms/Cross/vm -I/home/dusty/CogVM/openCogVm/src/vm -I/home/dusty/CogVM/openCogVm/platforms/Cross/vm -I/home/dusty/CogVM/openCogVm/platforms/unix/vm -I/home/dusty/CogVM/openCogVm/src/vm -I/home/dusty/CogVM/openCogVm/platforms/Cross/plugins/FilePlugin -I/home/dusty/CogVM/openCogVm/platforms/unix/plugins/B3DAcceleratorPlugin -I/home/dusty/CogVM/openCogVm/unixbuild/bld -I/home/dusty/CogVM/openCogVm/unixbuild/bld -I/home/dusty/CogVM/openCogVm/platforms/unix/vm -I/home/dusty/CogVM/openCogVm/platforms/Cross/vm -I/home/dusty/CogVM/openCogVm/src/vm -I/usr/X11R6/include -c -o sqUnixMain.o /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:62:22: error: execinfo.h: No such file or directory /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:820:3: error: #error need to implement extracting pc from a ucontext_t on this system /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c: In function 'reportStackState': /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:824: error: 'fp' undeclared (first use in this function) /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:824: error: (Each undeclared identifier is reported only once /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:824: error: for each function it appears in.) /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:824: error: 'sp' undeclared (first use in this function) *** Error code 1 Stop in /home/dusty/CogVM/openCogVm/unixbuild/bld/vm (line 273 of Makefile). *** Error code 1 Stop in /home/dusty/CogVM/openCogVm/unixbuild/bld (line 406 of Makefile). $ And the offending code is #if COGVM /* If we're in generated machine code then the only way the stack * dump machinery has of giving us an accurate report is if we set * stackPointer framePointer to the native stack frame pointers. */ # if __APPLE__ __MACH__ __i386__ void *fp = (void *)(uap ? uap-uc_mcontext-ss.ebp: 0); void *sp = (void *)(uap ? uap-uc_mcontext-ss.esp: 0); # elif __linux__ __i386__ void *fp = (void *)(uap ? uap-uc_mcontext.gregs[REG_EBP]: 0); void *sp = (void *)(uap ? uap-uc_mcontext.gregs[REG_ESP]: 0); # elif __FreeBSD__ __i386__ void *fp = (void *)(uap ? uap-uc_mcontext.mc_ebp: 0); void *sp = (void *)(uap ? uap-uc_mcontext.mc_esp: 0); # elif __sun__ __i386__ void *fp = (void *)(uap ? uap-uc_mcontext.gregs[REG_FP]: 0); void *sp = (void *)(uap ? uap-uc_mcontext.gregs[REG_SP]: 0); # else # error need to implement extracting pc from a ucontext_t on this system # endif char *savedSP, *savedFP; ifValidWriteBackStackPointersSaveTo(fp,sp,savedFP,savedSP); #endif I have got ucontext.h from src and stuff. Anyway. I want to know what on earth I should do with call stacks and ucontext and what all this is... Somebody educate me. I need to be schooled. Many thanks Dusty
Re: CogVM OpenBSD and the Call Stack
On 2012/06/02 15:07, Dusty wrote: In my feeble and ignorance, I'm attempting to build CogVM on OpenBSD. I've come across some problems that my limited skills cannot solve. -I/home/dusty/CogVM/openCogVm/platforms/Cross/vm -I/home/dusty/CogVM/openCogVm/src/vm -I/usr/X11R6/include -c -o sqUnixMain.o /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:62:22: error: execinfo.h: No such file or directory Build with -I/usr/local/include (and install the libexecinfo port if you haven't already) /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:820:3: error: #error need to implement extracting pc from a ucontext_t on this system If this is the ucontext.h stuff, afaik nobody has implemented ucontext for OpenBSD, certainly it's not in-tree.
Re: CogVM OpenBSD and the Call Stack
On Sat, Jun 02, 2012 at 08:19:17PM +0100, Stuart Henderson wrote: On 2012/06/02 15:07, Dusty wrote: In my feeble and ignorance, I'm attempting to build CogVM on OpenBSD. I've come across some problems that my limited skills cannot solve. -I/home/dusty/CogVM/openCogVm/platforms/Cross/vm -I/home/dusty/CogVM/openCogVm/src/vm -I/usr/X11R6/include -c -o sqUnixMain.o /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:62:22: error: execinfo.h: No such file or directory Build with -I/usr/local/include (and install the libexecinfo port if you haven't already) /home/dusty/CogVM/openCogVm/platforms/unix/vm/sqUnixMain.c:820:3: error: #error need to implement extracting pc from a ucontext_t on this system If this is the ucontext.h stuff, afaik nobody has implemented ucontext for OpenBSD, certainly it's not in-tree. No one should bother to either. The API is now obsolete. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.