On Wed, 23 Jan 2008, Andy Dougherty wrote: > On Wed, 23 Jan 2008, Allison Randal via RT wrote: > > Summary (edited for clarity) > > > > c++ -o pbc_to_exe pbc_to_exe.o -Lblib/lib -lparrot src/parrot_config.o > > Fails. But adding $O_FILES to the end works: > > >> c++ -o pbc_to_exe pbc_to_exe.o -Lblib/lib -lparrot src/parrot_config.o > >> $(O_FILES) > > This looks like the same problem I reported and fixed in > > [perl #49314] AutoReply: [PATCH] pbc_to_exe should list libraries last > > Looks like it's broken again. > > The fix is probably to just move src/parrot_config.o *before* the > libraries. Even if that doesn't fix it for OS X, it's likely to be > required on Unix systems with traditional linker behavior.
Oops. Reading the original bug report more carefully, > c++ -o pbc_to_exe pbc_to_exe.o -L/usr/local/lib -L/opt/local/lib > -L/sw/lib -L/sw/lib -L/opt/local/lib -L/sw/lib > -L/Users/allison/projects/svn/parrot/blib/lib -lparrot > -L/Users/allison/projects/svn/parrot/blib/lib -lm -lgmp -lreadline > /Users/allison/projects/svn/parrot/src/parrot_config.o > /usr/bin/ld: Undefined symbols: > _Parrot_set_executable_name > collect2: ld returned 1 exit status my suggested reordering is unlikely to fix this. The undefined symbol '_Parrot_set_executable_name' is referenced in pbc_to_exe.o, so the linker should have been looking for it already when it encountered -lparrot. This indeed looks like something is going on to specifically hide symbols, but I have no idea how Mac OS works in this regard. Still, the reordering ought to be done. parrot_config.o ought to appear *before* -lparrot. -- Andy Dougherty [EMAIL PROTECTED]