Ticket #1883 (closed bug: fixed)

Opened 11 years ago

Last modified 11 years ago

'make bootstrap-ops' target broken

Reported by: jkeenan Owned by:
Priority: normal Milestone: 2.11
Component: build Version: 2.10.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

In the course of debugging today, I had occasion to run:

make realclean && perl Configure.pl && make bootstrap-ops

It repeatedly failed here:

cc -o parrot \
        src/main.o src/parrot_config.o \
        -Wl,-rpath="/home/jimk/gitwork/parrot"/blib/lib -L/home/jimk/gitwork/parrot/blib/lib -lparrot -lpthread -lm -L/usr/lib  -licuuc -licudata -lpthread -lm -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline  -lffi   -fstack-protector -L/usr/local/lib -Wl,-E     -Wl,-E
./parrot -o runtime/parrot/library/Regex.pbc ext/nqp-rx/src/stage0/Regex-s0.pir
error:imcc:No such file or directory
        in file 'ext/nqp-rx/src/stage0/Regex-s0.pir' line 28
make: *** [runtime/parrot/library/Regex.pbc] Error 1

According to the Makefile, the purpose of the bootstrap-ops target is:

    @echo "  bootstrap-ops:     Generate C code from .ops files."

... and it is defined as:

bootstrap-ops : $(OPS2C)
    $(OPS2C) --core --quiet
    $(MAKE) .

Can anyone clarify? (I have no previous familiarity with this target).

Thank you very much.

kid51

Change History

follow-up: ↓ 2   Changed 11 years ago by plobsing

This looks like a makefile dependancies issue. runtime/parrot/library/Regex.pbc needs to depend on cclass.pasm (line after the line referenced by imcc error).

NQP-rx in general might be a little lacking in declared dependancies. I would not be surprised if this was not the only case.

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

Replying to plobsing:

This looks like a makefile dependancies issue. runtime/parrot/library/Regex.pbc needs to depend on cclass.pasm (line after the line referenced by imcc error).

Along those lines, I tried this patch, after which I did make realclean;perl Configure.pl;make bootstrap-ops.

diff --git a/ext/nqp-rx/Rules.mak b/ext/nqp-rx/Rules.mak
index 236792c..73bdef9 100644
--- a/ext/nqp-rx/Rules.mak
+++ b/ext/nqp-rx/Rules.mak
@@ -2,16 +2,18 @@
 
 NQP_STAGE0_DIR = ext/nqp-rx/src/stage0
 
-$(LIBRARY_DIR)/Regex.pbc: $(NQP_STAGE0_DIR)/Regex-s0.pir $(PARROT)
+CCLASS_PASM = runtime/parrot/include/cclass.pasm
+
+$(LIBRARY_DIR)/Regex.pbc: $(NQP_STAGE0_DIR)/Regex-s0.pir $(PARROT) $(CCLASS_PASM) 
        $(PARROT) -o $@ $(NQP_STAGE0_DIR)/Regex-s0.pir
 
-$(LIBRARY_DIR)/HLL.pbc: $(NQP_STAGE0_DIR)/HLL-s0.pir $(PARROT)
+$(LIBRARY_DIR)/HLL.pbc: $(NQP_STAGE0_DIR)/HLL-s0.pir $(PARROT) $(CCLASS_PASM) 
        $(PARROT) -o $@ $(NQP_STAGE0_DIR)/HLL-s0.pir
 
-$(LIBRARY_DIR)/P6Regex.pbc: $(NQP_STAGE0_DIR)/P6Regex-s0.pir $(PARROT)
+$(LIBRARY_DIR)/P6Regex.pbc: $(NQP_STAGE0_DIR)/P6Regex-s0.pir $(PARROT) $(CCLASS_PASM) 
        $(PARROT) -o $@ $(NQP_STAGE0_DIR)/P6Regex-s0.pir
 
-$(LIBRARY_DIR)/nqp-rx.pbc: $(NQP_STAGE0_DIR)/NQP-s0.pir $(PARROT)
+$(LIBRARY_DIR)/nqp-rx.pbc: $(NQP_STAGE0_DIR)/NQP-s0.pir $(PARROT) $(CCLASS_PASM) 
        $(PARROT) -o $@ $(NQP_STAGE0_DIR)/NQP-s0.pir
 
 ## eventually nqp should be able to generate .pbc files directly

But to little better result:

cc -o parrot \
        src/main.o src/parrot_config.o \
        -Wl,-rpath="/home/jimk/gitwork/parrot"/blib/lib -L/home/jimk/gitwork/parrot/blib/lib -lparrot 
  -lpthread -lm -L/usr/lib  -licuuc -licudata -lpthread -lm -lnsl -ldl -lm -lcrypt -lutil -lpthread 
  -lrt -lgmp -lreadline  -lffi   -fstack-protector -L/usr/local/lib -Wl,-E     -Wl,-E
/usr/local/bin/perl tools/build/h2inc.pl include/parrot/cclass.h runtime/parrot/include/cclass.pasm
./parrot -o runtime/parrot/library/Regex.pbc ext/nqp-rx/src/stage0/Regex-s0.pir
./parrot -o runtime/parrot/library/HLL.pbc ext/nqp-rx/src/stage0/HLL-s0.pir
error:imcc:No such file or directory
        in file 'ext/nqp-rx/src/stage0/HLL-s0.pir' line 1963
make: *** [runtime/parrot/library/HLL.pbc] Error 1

  Changed 11 years ago by bacek

Hello.

There is chicken and egg problem. opsc implemented in nqp, which require parrot, which require bootstrapped ops. We can't put "all" into "bootstrap-ops" dependencies due this circular dependency. However, error/warning message can be implemented.

-- Bacek

  Changed 11 years ago by jkeenan

Can anyone provide a real use-case for make bootstrap-ops?

If not, I propose we rip it out.

Thank you very much.

kid51

  Changed 11 years ago by bacek

Hello.

make boostrap-ops used when you change ops definition (or add/remove them). Generated files (core_ops.c, etc) are commited into repo after.

-- Bacek

  Changed 11 years ago by Vasily Chekalkin

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

Add description for bootstrap-ops make target. Closes #1883

Changeset: 197e843442731c6a16c5d40c234e0898852a860c

Note: See TracTickets for help on using tickets.