Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opcodes: cgen regeneration errors out with guile v2+ #69

Open
cooljeanius opened this issue Jul 12, 2024 · 7 comments
Open

opcodes: cgen regeneration errors out with guile v2+ #69

cooljeanius opened this issue Jul 12, 2024 · 7 comments

Comments

@cooljeanius
Copy link
Owner

trying to regenerate cgen-created files in the opcodes subdirectory fails with the following error:

/Applications/Xcode.app/Contents/Developer/usr/bin/make -w run-cgen arch=fr30 prefix=fr30 options="" \
		archfile=./../cgen/cpu/fr30.cpu opcfile=./../cgen/cpu/fr30.opc extrafiles=""
make[3]: Entering directory `/Users/ericgallager/apple-gdb-1824/src/opcodes'
/bin/sh ./cgen.sh opcodes . "`if test -f ../guile/libguile/guile; then echo ../guile/libguile/guile; else echo /opt/local/bin/guile; fi` -l ./../cgen/guile.scm -s" \
	  ./../cgen "-v" fr30 fr30 ./../cgen/cpu/fr30.cpu ./../cgen/cpu/fr30.opc \
	  "" ""
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm
;;; WARNING: compilation of /Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm failed:
;;; Syntax error:
;;; /Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm:14:4: definition in expression context, where definitions are not allowed, in form (define (eval1 expr) (eval expr (current-module)))
ice-9/psyntax.scm:1435:12: Syntax error:
/Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm:14:4: definition in expression context, where definitions are not allowed, in form (define (eval1 expr) (eval expr (current-module)))
make[3]: *** [run-cgen] Error 1
make[3]: Leaving directory `/Users/ericgallager/apple-gdb-1824/src/opcodes'
make[2]: *** [stamp-fr30] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I'm going to have to actually learn cgen and guile/scheme in order to fix this... Bounty available for anyone who wants to help.

@cooljeanius
Copy link
Owner Author

The suggestion to set GUILE_AUTO_COMPILE=0 doesn't help:

$ make GUILE_AUTO_COMPILE=0
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in po
make[2]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -w run-cgen arch=fr30 prefix=fr30 options="" \
		archfile=./../cgen/cpu/fr30.cpu opcfile=./../cgen/cpu/fr30.opc extrafiles=""
make[3]: Entering directory `/Users/ericgallager/apple-gdb-1824/src/opcodes'
/bin/sh ./cgen.sh opcodes . "`if test -f ../guile/libguile/guile; then echo ../guile/libguile/guile; else echo /opt/local/bin/guile; fi` -l ./../cgen/guile.scm -s" \
	  ./../cgen "-v" fr30 fr30 ./../cgen/cpu/fr30.cpu ./../cgen/cpu/fr30.opc \
	  "" ""
ice-9/psyntax.scm:1435:12: Syntax error:
/Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm:14:4: definition in expression context, where definitions are not allowed, in form (define (eval1 expr) (eval expr (current-module)))
make[3]: *** [run-cgen] Error 1
make[3]: Leaving directory `/Users/ericgallager/apple-gdb-1824/src/opcodes'
make[2]: *** [stamp-fr30] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

@cooljeanius
Copy link
Owner Author

version info for guile used:

$ /opt/local/bin/guile --version
guile (GNU Guile) 2.2.7
Copyright (C) 2020 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@cooljeanius
Copy link
Owner Author

Also fails with guile 2.0.11:

$ /opt/iains/x86_64-apple-darwin19/gcc-7-5-toolchain/bin/guile --version
guile (GNU Guile) 2.0.11
Copyright (C) 2014 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ make GUILE=/opt/iains/x86_64-apple-darwin19/gcc-7-5-toolchain/bin/guile
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in po
make[2]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -w run-cgen arch=fr30 prefix=fr30 options="" \
		archfile=./../cgen/cpu/fr30.cpu opcfile=./../cgen/cpu/fr30.opc extrafiles=""
make[3]: Entering directory `/Users/ericgallager/apple-gdb-1824/src/opcodes'
/bin/sh ./cgen.sh opcodes . "`if test -f ../guile/libguile/guile; then echo ../guile/libguile/guile; else echo /opt/iains/x86_64-apple-darwin19/gcc-7-5-toolchain/bin/guile; fi` -l ./../cgen/guile.scm -s" \
	  ./../cgen "-v" fr30 fr30 ./../cgen/cpu/fr30.cpu ./../cgen/cpu/fr30.opc \
	  "" ""
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm
;;; WARNING: compilation of /Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm failed:
;;; ERROR: Syntax error:
;;; /Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm:14:4: definition in expression context, where definitions are not allowed, in form (define (eval1 expr) (eval expr (current-module)))
ice-9/psyntax.scm:1274:12: In procedure #<procedure 10e28cd70 (test then else)>:
ice-9/psyntax.scm:1274:12: Syntax error:
/Users/ericgallager/apple-gdb-1824/src/opcodes/./../cgen/guile.scm:14:4: definition in expression context, where definitions are not allowed, in form (define (eval1 expr) (eval expr (current-module)))
make[3]: *** [run-cgen] Error 1
make[3]: Leaving directory `/Users/ericgallager/apple-gdb-1824/src/opcodes'
make[2]: *** [stamp-fr30] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

@cooljeanius
Copy link
Owner Author

It works when I force GUILE=guile18, so I guess this is a guile2.x incompatibility...

@cooljeanius cooljeanius changed the title opcodes: cgen regeneration errors out opcodes: cgen regeneration errors out with guile v2+ Jul 12, 2024
@cooljeanius
Copy link
Owner Author

OK, so now that I've remembered that I can use guile1.8 to regenerate... I'm running into a different error regenerating the frv files:

ERROR: unknown operand:  FPCONV-DEFAULT

Just touching them for now instead of regenerating them...

@cooljeanius
Copy link
Owner Author

OK, so now that I've remembered that I can use guile1.8 to regenerate... I'm running into a different error regenerating the frv files:

ERROR: unknown operand:  FPCONV-DEFAULT

Just touching them for now instead of regenerating them...

...also, the m32c regeneration seems to be hanging on the following step:

Instantiating multi-insns ...

cooljeanius added a commit that referenced this issue Jul 12, 2024
for opcodes
see #69

Change-Id: I1532cf60dcf64e41221a7541b34f603efd96d26b
@cooljeanius
Copy link
Owner Author

Note that this is prerequisite for fixing issue #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant