Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
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 <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...
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.)
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
I dug up where this is getting setup, and it seems to work out OK. Thanks!
--