The attached patch allows 'make' to complete on my OS X box, and passes 'make test'. It gets a segfault when running 'make perl6', at the point where it runs 'pbc_to_exe perl6.pbc'. The segfault appears to be a standard GC-style error attempting to access reclaimed memory, and not related to symbol lookup. gdb reports:
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0001d000 0x0100a79a in string_make_direct (interp=0x400440, buffer=0x5474 "", len=467200, encoding=0x400920, charset=0x400ab0, flags=0) at src/string.c:634 warning: Source file is more recent than executable. 634 real_exception(interp, NULL, UNIMPLEMENTED, (gdb) bt #0 0x0100a79a in string_make_direct (interp=0x400440, buffer=0x5474 "", len=467200, encoding=0x400920, charset=0x400ab0, flags=0) at src/string.c:634 #1 0x0100a6b9 in string_make (interp=0x400440, buffer=0x5474 "", len=467200, charset_name=0x1245a24 "ascii", flags=0) at src/string.c:593 #2 0x010caff3 in PF_fetch_string (interp=0x400440, pf=0x413b80, cursor=0x5c6348) at src/packfile/pf_items.c:552 #3 0x0105fa1c in shift_opcode_string (interp=0x400440, io=0x4139f0) at src/pmc_freeze.c:744 #4 0x01024a6d in hash_thaw (interp=0x400440, hash=0x413cc0, info=0xbfffed44) at src/hash.c:331 #5 0x01024d3b in parrot_hash_visit (interp=0x400440, hash=0x413cc0, pinfo=0xbfffed44) at src/hash.c:408 #6 0x011a44bc in Parrot_Hash_visit (interp=0x400440, pmc=0x5dadc0, info=0xbfffed44) at ./src/pmc/hash.pmc:1021 #7 0x01060d4e in visit_loop_todo_list (interp=0x400440, current=0x5dadc0, info=0xbfffed44) at src/pmc_freeze.c:1432 #8 0x01061080 in run_thaw (interp=0x400440, image=0x5c6338, what=VISIT_THAW_NORMAL) at src/pmc_freeze.c:1554 #9 0x010612d0 in Parrot_thaw (interp=0x400440, image=0x5c6338) at src/pmc_freeze.c:1663 #10 0x01024319 in parrot_set_config_hash_interpreter (interp=0x400440) at src/global_setup.c:83 #11 0x010244ff in init_world (interp=0x400440) at src/global_setup.c:140 #12 0x010160cb in Parrot_init (interp=0x400440) at src/embed.c:113 #13 0x0102bccb in make_interpreter (parent=0x0, flags=0) at src/inter_create.c:172 #14 0x01016099 in Parrot_new (parent=0x0) at src/embed.c:74 #15 0x0000220b in main () But, I won't commit the patch until I have some confirmation on whether the segfault happens without the patch on other platforms, or with the patch on other darwin-based installs. At least I can apply the patch to my working directories, so I'm not blocked by 'make' failing, and can get work done. Allison
Index: tools/dev/pbc_to_exe_gen.pl =================================================================== --- tools/dev/pbc_to_exe_gen.pl (revision 25264) +++ tools/dev/pbc_to_exe_gen.pl (working copy) @@ -351,6 +351,11 @@ .local string link link = ld link .= ' ' + + unless osname == 'darwin' goto not_darwin + link .= '-undefined dynamic_lookup ' + not_darwin: + link .= ld_out link .= exefile link .= ' '