larsbrinkhoff / lbForth

Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
GNU General Public License v3.0
414 stars 113 forks source link

Undefined: TO_DOES #87

Closed Phi-Ho closed 3 years ago

Phi-Ho commented 3 years ago

Greetings,

Please advise how can this issue be fixed. Please find appended below some related info. ctc.fth was using instead of the missing included "threading.fth" in "src/dictionsry.fth"

Regards,

phiho

lbForth ok include targets/x86/build.fth (Debug print include targets/x86/nucleus.fth include targets/x86/nucleus.fth include src/kernel.fth include src/dictionary.fth include targets/x86/jump.fth include targets/ctc.fth ) Undefined: TO_DOES ok ' TO_DOES Undefined: TO_DOES

$ fgrep -r TO_DOES lisp/meta.lisp:;; UNTIL CELL NAME_LENGTH TO_NEXT TO_CODE TO_DOES TO_BODY lisp/meta.lisp: "TO_CODE" "TO_DOES" "TO_BODY" "[" "[DEFINED]" "[UNDEFINED]" src/compile.fth:has-does? [if] does-offset t-constant TO_DOES [then] targets/c/meta.fth: CELL NAME_LENGTH TO_NEXT TO_CODE TO_DOES TO_BODY targets/ctc.fth:: >does ( a -- a' ) TO_DOES + ;
targets/x16/meta.fth:h: TO_DOES 0 t-literal ; $

larsbrinkhoff commented 3 years ago

If you want to build the "c" target, do it like this: make clean all TARGET=c

Phi-Ho commented 3 years ago

Hi,

It looks like something is missing from my git system.

Thanks for your help.

Regards,

phiho

lbForth-master$ make clean all rm -f .o kernel.c params params.fth jump.fth threading.fth target.fth rm -f forth -forth test- -stamp .exe conf.mk forth.html forth.js make -ftargets/c/bootstrap.mk make[1]: Entering directory '/mnt/f/fun/lbforth/lbForth-master' make[1]: Circular kernel.c <- b-forth dependency dropped. gcc -m32 -O2 -fomit-frame-pointer -fno-unit-at-a-time -Itargets/c targets/c/params.c -o params targets/c/run.sh ./params -lisp > params.lisp cp targets/c/jump.fth jump.fth cp targets/ctc.fth threading.fth cp targets/c/target.fth target.fth echo ": sysdir s\" src/\" ;" >> target.fth git submodule update --init fatal: not a git repository (or any parent up to mount point /mnt) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). make[1]: [targets/c/bootstrap.mk:23: lisp/meta.lisp] Error 128 make[1]: Leaving directory '/mnt/f/fun/lbforth/lbForth-master' make: [Makefile:27: b-forth] Error 2 lbForth-master$