Another minor task for the interested

0 views
Skip to first unread message

Dan Sugalski

unread,
Nov 21, 2003, 11:01:41 AM11/21/03
to perl6-i...@perl.org
Should be straightforward though it involves diving into a twisty maze of
make rules, so maybe not. Anyway, trying a "make -j 4" dies a quick and
horrible death, failing to find Parrot/OpLib/core.pm. My assumption here
is that we're just missing some dependency rules, as a make -j 2, or a
make -j 4 after a failed make -j 4 works just fine.

Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Harry

unread,
Nov 21, 2003, 2:36:00 PM11/21/03
to perl6-i...@perl.org
--- Dan Sugalski <d...@sidhe.org> wrote:
> Should be straightforward though it involves diving into a twisty
> maze of
> make rules, so maybe not. Anyway, trying a "make -j 4" dies a quick
> and
> horrible death, failing to find Parrot/OpLib/core.pm. My assumption
> here
> is that we're just missing some dependency rules, as a make -j 2, or
> a
> make -j 4 after a failed make -j 4 works just fine.

I am having a quick look at it now. I copied the Parrot/OpLib/core.pm
to a backup file, did a make clean, which removes the file. I then
copied it back to its normal position and ran "make -j 4" and it worked
a treat so I am now trying to see at which point in the process the
file gets created because it appears to be created a bit too late for
"make" to work. (Maybe this is what you where getting at above).

Harry


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Dan Sugalski

unread,
Nov 21, 2003, 3:28:08 PM11/21/03
to perl6-i...@perl.org
On Fri, 21 Nov 2003, Harry wrote:

> --- Dan Sugalski <d...@sidhe.org> wrote:
> > Should be straightforward though it involves diving into a twisty
> > maze of
> > make rules, so maybe not. Anyway, trying a "make -j 4" dies a quick
> > and
> > horrible death, failing to find Parrot/OpLib/core.pm. My assumption
> > here
> > is that we're just missing some dependency rules, as a make -j 2, or
> > a
> > make -j 4 after a failed make -j 4 works just fine.
>
> I am having a quick look at it now. I copied the Parrot/OpLib/core.pm
> to a backup file, did a make clean, which removes the file. I then
> copied it back to its normal position and ran "make -j 4" and it worked
> a treat so I am now trying to see at which point in the process the
> file gets created because it appears to be created a bit too late for
> "make" to work. (Maybe this is what you where getting at above).

I was mostly thinking that some step or other in the Makefile has a
dependency on that file, and some other step creates it, but the
dependency's not explicit. I'd like to find the step(s) that require it
and make it a dependency for them, then add in a dependency for the file
for whatever step actually creates it, so things get ordered properly. It
should (hopefully) be straightforward, but...

Steve Fink

unread,
Nov 21, 2003, 10:44:26 PM11/21/03
to Dan Sugalski, perl6-i...@perl.org
On Nov-21, Dan Sugalski wrote:
>
> I was mostly thinking that some step or other in the Makefile has a
> dependency on that file, and some other step creates it, but the
> dependency's not explicit. I'd like to find the step(s) that require it
> and make it a dependency for them, then add in a dependency for the file
> for whatever step actually creates it, so things get ordered properly. It
> should (hopefully) be straightforward, but...

I have other evidence of dependency entanglement -- fairly often, I do
a 'make; make test' (which I think is equivalent to 'make test' both
theoretically and practically), and I'll have a bunch of tests fail.
Doing a 'make clean; make test' fixes the failures. (Ok, sometimes it
requires a re-Configure.pl too, but that's another issue.)

There is a known dependency gap due to the recursive invocation of
classes/Makefile, but I don't think that is causing either of these
problems.

Random idea for this problem and the zillions of similar problems
people face all the time with make: it would be cool to patch ccache
so that it reports its cache misses. And just to be anal, add a flag
saying 'for this run, do not evict things from the cache to restrict
space usage.'

Then, when you do a 'make' that doesn't remake enough, you could do

make clean
export CC="ccache --report-misses=/tmp/misses.txt --no-evictions gcc"
make

and you could look at the first miss to see an example of something
that needed to be rebuilt, but did not have a dependency triggering
it.

(I can see at least one way in which this scheme is still not
guaranteed to be correct -- there's a reasonable chance you would hit
in the cache from an unrelated compile, and thus fail to see the first
missing dependency.)

Harry

unread,
Dec 6, 2003, 3:12:15 PM12/6/03
to perl6-i...@perl.org
Dan Sugalski wrote:
>
> I was mostly thinking that some step or other in the Makefile has a
> dependency on that file, and some other step creates it, but the
> dependency's not explicit. I'd like to find the step(s) that require it
> and make it a dependency for them, then add in a dependency for the file
> for whatever step actually creates it, so things get ordered properly. It
> should (hopefully) be straightforward, but...


I hope after this amount of time someone still wants this fixed.

After much rummaging around I added the following to the makefile and it
seems to be working up to 4 Jobs now. I think this may open up a few
more problems though.

Harry

--- Makefile Sat Dec 6 19:42:33 2003
+++ Makefile.new Sat Dec 6 18:29:07 2003
@@ -831,9 +831,9 @@
$(SRC)/core_ops_cg$(O): $(GENERAL_H_FILES) $(SRC)/core_ops_cg.c
$(SRC)/core_ops_cgp$(O): $(GENERAL_H_FILES) $(SRC)/core_ops_cgp.c

-$(SRC)/core_ops_cg.c $(INC)/oplib/core_ops_cg.h: $(OPS_FILES)
$(BUILD_TOOL)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm
lib/Parrot/OpTrans/CGoto.pm
+$(SRC)/core_ops_cg.c $(SRC)/runops_cores.c $(INC)/oplib/core_ops_cg.h:
$(OPS_FILES) $(BUILD_TOOL)/ops2c.pl lib/Parrot/OpsFile.pm
lib/Parrot/Op.pm lib/Parrot/OpTrans/CGoto.pm lib/Parrot/OpLib/core.pm
$(PERL) $(BUILD_TOOL)/ops2c.pl CGoto --core
-$(SRC)/core_ops_cgp.c $(INC)/oplib/core_ops_cgp.h: $(OPS_FILES)
$(BUILD_TOOL)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm
lib/Parrot/OpTrans/CGP.pm
+$(SRC)/core_ops_cgp.c $(INC)/oplib/core_ops_cgp.h: $(OPS_FILES)
$(BUILD_TOOL)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm
lib/Parrot/OpTrans/CGP.pm lib/Parrot/OpLib/core.pm
$(PERL) $(BUILD_TOOL)/ops2c.pl CGP --core

Dan Sugalski

unread,
Dec 9, 2003, 11:00:31 PM12/9/03
to harry, perl6-i...@perl.org
At 8:12 PM +0000 12/6/03, harry wrote:
>Dan Sugalski wrote:
>>
>>I was mostly thinking that some step or other in the Makefile has a
>>dependency on that file, and some other step creates it, but the
>>dependency's not explicit. I'd like to find the step(s) that require it
>>and make it a dependency for them, then add in a dependency for the file
>>for whatever step actually creates it, so things get ordered properly. It
>>should (hopefully) be straightforward, but...
>
>
>I hope after this amount of time someone still wants this fixed.
>
>After much rummaging around I added the following to the makefile
>and it seems to be working up to 4 Jobs now. I think this may open
>up a few more problems though.

I dug up where this is getting setup, and it seems to work out OK. Thanks!
--

Reply all
Reply to author
Forward
0 new messages