Ticket #1070 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

building parrot with the make -j option fails after r41514

Reported by: mikehh Owned by: coke
Priority: normal Milestone:
Component: none Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

jrtayloriv reported this in a comment to re-opened ticket TT #231.

In essence building parrot with the -j option (-j2 by jrtayloriv) results in a make failure as when make tries to build nqp it requires that the parrot executable has been built already and as it tries to do this before it has been completed the make fails.

The relevant lines from make are as follows:

./parrot -o compilers/nqp/nqp.pbc compilers/nqp/nqp.pir
make: ./parrot: Command not found
make: *** [compilers/nqp/nqp.pbc] Error 127
make: *** Waiting for unfinished jobs....

Change History

Changed 12 years ago by doughera

On Mon, 28 Sep 2009, Parrot wrote:

>  In essence building parrot with the -j option (-j2 by jrtayloriv) results
>  in a make failure as when make tries to build nqp it requires that the
>  parrot executable has been built already and as it tries to do this before
>  it has been completed the make fails.
> 
>  The relevant lines from make are as follows:
>  {{{
>  ./parrot -o compilers/nqp/nqp.pbc compilers/nqp/nqp.pir
>  make: ./parrot: Command not found
>  make: *** [compilers/nqp/nqp.pbc] Error 127
>  make: *** Waiting for unfinished jobs....
> 
>  }}}

I think the problem is that 'make' ends up relying on the implicit suffix 
rule   .pir.pbc.  There's the following comment in the Makefile:

# XXX These obviously require parrot: had trouble adding parrot as a dependency
# here, though. Ignored on Mac OS X, at least.

.pir.pbc : # suffix rule (limited support)
        $(PARROT) -o $@ $<

.pbc$(O) : # suffix rule (limited support)
        $(PARROT) -o $@ $<

The "trouble" is that suffix rules do not, in general, allow for
dependencies.

-- 
    Andy Dougherty		doughera@lafayette.edu


Changed 12 years ago by doughera

This problem is also fatal for Solaris dmake (Distributed Make), even with -j 1.

Changed 12 years ago by coke

  • owner set to coke

Changed 12 years ago by coke

  • status changed from new to closed
  • resolution set to fixed

Once the dep on parrot is added, further failures occur because compilers/nqp/nqp.pir loads a generated file that it doesn't depend on (at least, not from the top level makefile).

While I would rather have a single, unified set of makefile deps, that would involve a lot of effort to fix this one bug; so I cheated and added compilers.dummy as a prereq for parrot_nqp. (r41563). Not an ideal solution, but only used a small # of tuits.

Changed 12 years ago by doughera

Thanks. That works for Solaris dmake. It does have the unfortunate side-effect of rebuilding parrot_nqp every time you say 'make' (or 'make test'), since the compilers.dummy target is never actually built. But that's still much better.

More accurate dependencies would help, of course. I also think getting rid of the wrong suffix rules would help in the long run too. But for now, at least, it works.

Note: See TracTickets for help on using tickets.