# New Ticket Created by  Andy Dougherty 
# Please include the string:  [perl #17084]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=17084 >


Under traditional Unix loaders (ld), the order in which items are
specified in the command line matters.  Without this patch, -lm appears
before libparrot.a, so at the time libm is encountered, no symbols are
needed and nothing is loaded.  Subsequently, upon encountering
libparrot.a, a number of math/trig-related symbols end up undefined.
(See the Solaris tinderbox logs, for example).  The traditional Unix ld
does not backtrack and rescan -lm again.

This patch corrects the order of arguments in lib/Parrot/Test.pm so that
programs will at least link correctly.  The t/src/intlist test still fails
for me -- I just got

t/src/intlist.......#     Failed test (t/src/intlist.t at line 108)
#          got: 'Step 1: 0
# Failed: 
# '
#     expected: 'Step 1: 0
# Step 2: 1
# Step 3: 2
# Step 4: 255
# Step 5: 256
# Step 6: 257
# Done.
# '

-- but that's a matter for separate investigation.


diff -ru parrot-orig/lib/Parrot/Test.pm parrot-andy/lib/Parrot/Test.pm
--- parrot-orig/lib/Parrot/Test.pm      Fri Sep  6 09:25:57 2002
+++ parrot-andy/lib/Parrot/Test.pm      Mon Sep  9 09:19:54 2002
@@ -164,7 +164,7 @@
       close SOURCE;
 
       _run_command("$PConfig{cc} $PConfig{ccflags} -I./include -c 
$PConfig{ld_out}$obj_f $source_f");
-      _run_command("$PConfig{link} $PConfig{linkflags} $obj_f 
$PConfig{cc_exe_out}$exe_f $PConfig{libs} blib/lib/libparrot$PConfig{a}");
+      _run_command("$PConfig{link} $PConfig{linkflags} $obj_f 
+$PConfig{cc_exe_out}$exe_f blib/lib/libparrot$PConfig{a} $PConfig{libs}");
       my $prog_output;
       _run_command(".$PConfig{slash}$exe_f", 'STDOUT' => $out_f, 'STDERR' => $out_f);
 

-- 
    Andy Dougherty              [EMAIL PROTECTED]
    Dept. of Physics
    Lafayette College, Easton PA 18042



Reply via email to