Ticket #1541 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

warnings appearing during 'make' invocation of pmc2c.pl

Reported by: jkeenan Owned by: jkeenan
Priority: normal Milestone:
Component: build Version: 2.2.0
Severity: medium Keywords: pmc2c
Cc: Util Language:
Patch status: applied Platform:

Description

(Due to lack of time, I reported this on the mailing list without creating a ticket. Creating a TT now and recording Util's analysis.)

I have started to observe some warnings appearing early in the make process:

/usr/local/bin/perl tools/build/h2inc.pl 
  include/parrot/enums.h lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
/usr/local/bin/perl tools/build/vtable_h.pl
/usr/local/bin/perl tools/build/pmc2c.pl --vtable
/usr/local/bin/perl tools/build/pmc2c.pl --dump  
  src/pmc/default.pmc
 at /home/jimk/work/parrot/tools/build/../../lib/Parrot/Pmc2c/Dumper.pm line 54

Parrot::Pmc2c::Dumper::dump_pmc('Parrot::Pmc2c::Pmc2cMain=HASH(0x83f52c0)') 
  called at tools/build/pmc2c.pl line 51
 at /home/jimk/work/parrot/tools/build/../../lib/Parrot/Pmc2c/Dumper.pm line 74

Parrot::Pmc2c::Dumper::dump_pmc('Parrot::Pmc2c::Pmc2cMain=HASH(0x83f52c0)') 
  called at tools/build/pmc2c.pl line 51
/usr/local/bin/perl tools/build/pmc2c.pl --dump src/pmc/fixedintegerarray.pmc
/usr/local/bin/perl tools/build/pmc2c.pl --c  src/pmc/fixedintegerarray.pmc

According to my build logs, this began sometime between r45132 (March 23) and r45159 (March 24). I don't have any evidence yet that this affects the parrot executable, and I have not yet had time to diagnose the problem.

Change History

in reply to: ↑ description ; follow-up: ↓ 2   Changed 12 years ago by jkeenan

  • status changed from new to assigned
  • cc Util added
  • owner set to jkeenan
  • patch set to new

Bruce Grey: Replying to jkeenan: On Apr 2, 2010, at 7:19 AM, James E Keenan wrote:

I have started to observe some warnings appearing early in the 'make' process:
--snip--
/usr/local/bin/perl tools/build/pmc2c.pl --dump  src/pmc/default.pmc
  at /home/jimk/work/parrot/tools/build/../../lib/Parrot/Pmc2c/Dumper.pm line 54
--snip--
sometime between r45132 (March 23) and r45159 (March 24).

Quick analysis: 1. Sub find_file() in Pmc2cMain.pm can be called with or without a second parameter: $die_unless_found.

2. file_find() has contains debugging code that is innocuous when $die_unless_found is set, but is inappropriate when $die_unless_found is not set. This code comes from r20228 (tewk - [Pmc2c] Work complete, Merge from pmc2c branch).

3. Prior to r45138 (plobsing - merge no_pmc_install branch), every call to file_find() set $die_unless_found to true.

4. In r45138, two calls to file_find were added without $die_unless_found being set. The additions look appropriate, as do the absence of $die_unless_found, but this caused the debugging code to trigger in its inappropriate usage for the first time.

This patch should keep the same behavior when when $die_unless_found is set, while suppressing the output when when $die_unless_found is not set. The patch is not fully tested, and my analysis might be incomplete, but that is all the time I have this weekend.

Tested with:

    $ rm src/pmc/default.dump
    $ perl tools/build/pmc2c.pl --dump src/pmc/default.pmc
Index: lib/Parrot/Pmc2c/Pmc2cMain.pm
===================================================================
--- lib/Parrot/Pmc2c/Pmc2cMain.pm    (revision 45384)
+++ lib/Parrot/Pmc2c/Pmc2cMain.pm    (working copy)
@@ -240,8 +240,11 @@
         return $path if -e $path;
     }

-    print Carp::longmess;
-    die "cannot find file '$file' in path '", join( "', '", @includes ), "'" if $die_unless_found;
+    if ($die_unless_found) {
+        my $includes_list = join "', '", @includes;
+        Carp::confess("cannot find file '$file' in path '$includes_list'");
+    }
+
     return;
 }

-- Hope this helps, Bruce Gray

in reply to: ↑ 1   Changed 12 years ago by jkeenan

Replying to Bruce Grey:

This patch should keep the same behavior when when $die_unless_found is set, while suppressing the output when when $die_unless_found is not set. The patch is not fully tested, and my analysis might be incomplete, but that is all the time I have this weekend.

Bruce, thanks for taking the time to look into this. I accept your analysis and (with minor typographical change for code readability) applied your patch in r45388.

Will keep ticket open for 2-3 days for any further comments.

Thank you very much.

kid51

  Changed 12 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed
  • patch changed from new to applied

No further complaints. Closing ticket.

Note: See TracTickets for help on using tickets.