On Wed, 2 Jan 2008, James E Keenan wrote:

> Andy Dougherty wrote:
> > After fixing various minor little things, here's where I stand
> > on Solaris 8/SPARC after the recent changes.
> > 

> > Failed Test                        Stat Wstat Total Fail  List of Failed
> > 
> > -------------------------------------------------------------------------------
> > t/configure/115-auto_warnings-02.t    7  1792    22   14  16-22
> > t/configure/115-auto_warnings-03.t    7  1792    22   14  16-22
> > t/configure/115-auto_warnings-04.t    7  1792    22   14  16-22
> > t/configure/115-auto_warnings-05.t    8  2048    23   16  16-23
> > t/configure/115-auto_warnings-06.t    8  2048    23   16  16-23
> > t/configure/115-auto_warnings-07.t    9  2304    24   18  16-24
> > t/configure/146-auto_snprintf-01.t   13  3328    30   26  18-30
> 
> Could you open an RT ticket for these -- or perhaps one for auto::warnings and
> one for aut::snprintf?  I will then re-work the tests, as I have a general
> idea of the problem.
> 
> What also would be helpful:  (1) Output of prove -v on these.  (2) How did you
> configure?  I.e., which (of your many!) perls did you use? which command-line
> options?  any interactive configuration?

It's the same problem I already reported on at length in #47391.  (I have
adjusted the subject line to reference that ticket so RT will pick it up.)
My perl was built with cc, but I don't have cc available for this build
of parrot.  I supplied all the correct flags on the Configure.pl command
line, but the tests are still assuming the values from the underlying perl
configuration.  The tests are still using init::defaults.  That is wrong.
They should be using the results stored in Parrot::Config instead.

Here, in gory detail, is the diagnosis.  I configured with perl5.10,
which was built with Sun's cc.

    $ perl5.10 -V:cc
    cc='cc';

Sun's cc is not available for this build of parrot.  However, gcc is.
I supplied all the appropriate flags to Configure.pl to use gcc:

    $ perl5.10 Configure.pl --cc=gcc --link=gcc --ld=gcc --cxx=g++
    [ ... successful Configure.pl output omitted ...]

However, 115-auto_warnings-0[2-7].t and 146-auto_snprintf-01.t all fail
in the same way:

    $ prove -v t/configure/115-auto_warnings-02.t
    t/configure/115-auto_warnings-02....1..22
    ok 1 - use config::init::defaults;
    ok 2 - use config::init::hints;
    ok 3 - use config::inter::progs;
    ok 4 - use config::auto::warnings;
    ok 5 - init::defaults constructor returned defined value
    ok 6 - The object isa init::defaults
    ok 7 - init::defaults has description
    ok 8 - init::defaults runstep() returned defined value
    ok 9 - init::hints constructor returned defined value
    ok 10 - The object isa init::hints
    ok 11 - init::hints has description
    ok 12 - init::hints runstep() returned defined value
    ok 13 - inter::progs constructor returned defined value
    ok 14 - The object isa inter::progs
    ok 15 - inter::progs has description
    Compilation failed with 'cc'
    # Looks like you planned 22 tests but only ran 15.
    dubious
            Test returned status 255 (wstat 65280, 0xff00)
    DIED. FAILED tests 16-22
            Failed 7/22 tests, 68.18% okay
    Failed Test                        Stat Wstat Total Fail  List of Failed
    
-------------------------------------------------------------------------------
    t/configure/115-auto_warnings-02.t  255 65280    22   14  16-22
    Failed 1/1 test scripts. 7/22 subtests failed.
    Files=1, Tests=22,  2 wallclock secs ( 1.73 cusr +  0.49 csys =  2.22 CPU)
    Failed 1/1 test programs. 7/22 subtests failed.

The failure is because the tests are not honoring my command-line settings
for the compiler and linker.  If config/inter/progs.pm had proper error
reporting (see my long rant in #41168) it would direct you to look in
the file test.ldo.

    $ cat test.ldo
    Can't exec "CC": No such file or directory at lib/Parrot/Configure/Utils.pm 
line 91.

Where did that 'CC' come from?  It came from config/init/hints/solaris.pm,
which tries to guess the appropriate linker to use based on the current
value of the compiler.  Since my underlying perl configuration used
Sun's cc, and the hint file apparently does not know about my command
line settings, it guesses that the appropriate linker to use is Sun's CC.

In short, the hint file is being run in an environment where it does
not have access to my command line arguments, where I explicitly
set everything appropriately already.  It is relying, instead, on
init::defaults, which, as I have pointed out, is incorrect.

The simplest, most obvious, fix is to never use init::defaults (except
in the one case where you wish to test config/init/defaults.pm itself).
Use the correct values in Parrot::Config instead.

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to