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

Installation error (Fedora 37, Emacs 28.2) #92

Open
clementblaudeau opened this issue Mar 30, 2023 · 18 comments
Open

Installation error (Fedora 37, Emacs 28.2) #92

clementblaudeau opened this issue Mar 30, 2023 · 18 comments

Comments

@clementblaudeau
Copy link

Dear PVS developpers,
While trying to install the latest version (or any recent snapshot), I have an error when running ./install-sh : !!! Something went wrong - see the end of byte-compile.log
The byte-compile.log file shows :

Byte compilation currently generates lots of warnings
  (because of compatibility issues with older Emacs versions)\n
Loading /usr/share/emacs/site-lisp/site-start.d/asy-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/autoconf-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/cmake-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/desktop-entry-mode-init.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/mercurial-site-start.el (source)...
Loading /usr/share/emacs/site-lisp/site-start.d/rpmdev-init.el (source)...
PVS: byte compilation starting

In pvs-kind-of-buffer:
pvs-utils.el:80:12: Warning: reference to free variable ‘pvs-prelude’
pvs-utils.el:90:23: Warning: reference to free variable ‘pvs-buffer-kind’

In end of data:
pvs-utils.el:2018:20: Warning: the function ‘decf’ is not known to be defined.
pvs-utils.el:1879:30: Warning: the function ‘ilisp-value’ is not known to be
    defined.
pvs-utils.el:1860:6: Warning: the function ‘princ-nl’ is not known to be
    defined.
pvs-utils.el:1843:8: Warning: the function ‘switch-to-lisp’ is not known to be
    defined.
pvs-utils.el:1824:17: Warning: the function ‘pvs-formula-origin’ is not known
    to be defined.
pvs-utils.el:1818:4: Warning: the function ‘typecheck’ is not known to be
    defined.
pvs-utils.el:1817:4: Warning: the function ‘find-pvs-file’ is not known to be
    defined.
pvs-utils.el:1816:4: Warning: the function ‘pvs-remove-bin-files’ is not known
    to be defined.
pvs-utils.el:1812:6: Warning: the function ‘pvs-send’ is not known to be
    defined.
pvs-utils.el:1810:18: Warning: the function ‘prove-pvs-file’ is not known to
    be defined.
pvs-utils.el:1809:18: Warning: the function ‘prove-theory’ is not known to be
    defined.
pvs-utils.el:1807:23: Warning: the function ‘comint-send’ is not known to be
    defined.
pvs-utils.el:1806:42: Warning: the function ‘ilisp-process’ is not known to be
    defined.
pvs-utils.el:1799:21: Warning: the function ‘ilisp-send’ is not known to be
    defined.
pvs-utils.el:1796:18: Warning: the function ‘prove-importchain’ is not known
    to be defined.
pvs-utils.el:1783:4: Warning: the function ‘set-rewrite-depth’ is not known to
    be defined.
pvs-utils.el:1506:10: Warning: the function ‘pushnew’ is not known to be
    defined.
pvs-utils.el:1335:27: Warning: the function ‘endp’ is not known to be defined.
pvs-utils.el:990:29: Warning: the function ‘context-files’ is not known to be
    defined.
pvs-utils.el:811:4: Warning: the function ‘pvs-bury-output’ is not known to be
    defined.
pvs-utils.el:776:15: Warning: the function ‘comint-remove-whitespace’ is not
    known to be defined.
pvs-utils.el:621:4: Warning: the function ‘save-some-pvs-files’ is not known
    to be defined.
pvs-utils.el:347:17: Warning: the function ‘pvs-send-and-wait’ is not known to
    be defined.
Loading /usr/share/emacs/28.2/lisp/international/uni-name.el (source)...
pvs-ltx: 1282 rules (+ 0 conflicts)!
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilcompat.elc...
Loading ilisp/ilcompat...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/completer.elc...
Loading ilisp/completer...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/comint-ipc.elc...
Loading ilisp/comint-ipc...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-def.elc...
Loading ilisp/ilisp-def...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-sym.elc...
Loading ilisp/ilisp-sym...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-inp.elc...
Loading ilisp/ilisp-inp...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-ind.elc...
Loading ilisp/ilisp-ind...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-prc.elc...
Loading ilisp/ilisp-prc...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-val.elc...
Loading ilisp/ilisp-val...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-out.elc...
Loading ilisp/ilisp-out...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-mov.elc...
Loading ilisp/ilisp-mov...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-key.elc...
Loading ilisp/ilisp-key...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-prn.elc...
Loading` ilisp/ilisp-prn...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-low.elc...
Loading ilisp/ilisp-low...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-doc.elc...
Loading ilisp/ilisp-doc...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-ext.elc...
Loading ilisp/ilisp-ext...
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-mod.elc...

I figured that loading ilisp-mod was failing, which is indeed the case. Trying to load it directly in emacs, I get :

Wrote /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-mod.elc
Loading /home/cblaudeau/pvsdir/emacs/ilisp/ilisp-mod.elc...
ilisp-byte-code-to-list: Wrong type argument: sequencep, #<subr lisp-mode>

I narrowed it down to the line 69: (ilisp-set-doc 'lisp-mode ilisp-documentation)

If I try to run ./pvs nevertheless, I get the following error :

Debugger entered--Lisp error: (wrong-type-argument sequencep #<subr lisp-mode>)
  append(#<subr lisp-mode> nil)
  ilisp-byte-code-to-list(#<subr lisp-mode>)
  ilisp-set-doc(lisp-mode "Major mode for interacting with an inferior Lisp p...")
  byte-code("\301\302\10\"\210\301\303\10\"\207" [ilisp-documentation ilisp-set-doc ilisp-mode lisp-mode] 3)
  load("ilisp-mod" nil nil)
  load-with-code-conversion("/home/cblaudeau/pvsdir/emacs/ilisp/ilisp.el" "/home/cblaudeau/pvsdir/emacs/ilisp/ilisp.el" nil nil)
  load("ilisp" nil nil)
  byte-code("\305\306!\210\307\310\311\10#\210\307\312\311\10#\210\307\313\311\10#\210\307\314\311\10#\210\307\315\311\10#\210\307\316\311\10#\210\307\317\311\10#\210\307\320\311\10..." [noninteractive emacs-major-version emacs-minor-version pvs-original-load-path load-path make-variable-buffer-local pvs-buffer-kind load "ilisp" nil "pvs-ilisp" "pvs-mode" "pvs-view" "pvs-file-list" "pvs-browser" "pvs-utils" "pvs-cmds" (error) "pvs-prelude-files-and-regions" "pvs-print" "pvs-proofstate" "pvs-prover" "pvs-abbreviations" boundp 20 19 29 "pvs-menu" "pvs-tcl" "pvs-prover-helps" "pvs-eval" "pvs-pvsio" "pvs-prover-manip" "manip-debug-utils" "prooflite" "newcomment" t put comment-region pvs-command editing global-set-key "\3;"] 4)
  load("pvs-load" nil nil nil)
  load-with-code-conversion("/home/cblaudeau/pvsdir/e..." "/home/cblaudeau/Documents/pvsdir/e..." nil t)
  command-line-1(("-load" "/home/cblaudeau/pvsdir/emacs/go-pvs.el"))
  command-line()
  normal-top-level()

Commenting the line 69 makes the ./install-sh go through, and .pvs runs normally. However, as soon as I quit it and rerun it, I get the error above.

Am I doing something wrong ?
Thank you for your help

@samowre
Copy link
Contributor

samowre commented Mar 30, 2023 via email

@clementblaudeau
Copy link
Author

Hi Sam,
Thank you for you answer. I don't see any errors when running emacs alone (emacs --debug-init does not output anything). The result of M-x emacs-version is

GNU Emacs 28.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-28

PVSEMACS is not set. I'm on Fedora 37, uname -a gives :

Linux [username] 6.1.12-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 15 04:35:34 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Should I try reinstalling emacs ?
Thank you for your help

@jamesjer
Copy link
Contributor

jamesjer commented Apr 3, 2023

I had to make a number of changes to the Emacs files to avoid this and other issues when Emacs 28 was released. Those changes are included in the Fedora pvs-sbcl package. If you want to see what I did, take a look at this patch: https://src.fedoraproject.org/rpms/pvs-sbcl/blob/rawhide/f/pvs-emacs.patch. I wasn't sure if any of those changes would break Emacs versions < 28, which is why I haven't opened any pull requests yet.

@jedbrown
Copy link

I'm also hitting this with emacs-29 and emacs-30. The patch linked above is now 404 because the package has been removed from Fedora. I salvaged the patch file from this commit.
Unfortunately, I see lots of failed hunks (which seems odd since the file hasn't changed) when trying to build on Arch (cf. #91) so probably need to go through them one at a time. It would be helpful for the maintainers to specify which Emacs versions are supported (which would also clarify when support for legacy versions can be removed).

@clementblaudeau
Copy link
Author

I've managed to get it (half) working on Fedora by :

  1. Adding the -q option in the install.sh file (line 39)
  2. Using the patch pvs-emacs.zip (re-attached here as indeed the link is dead) by running patch -p1 --dry-run < ../pvs-emacs.patch (remove --dry-run if everything works).
    However, this is only "half-working" as pvs works only once. After I close and restard pvs I get the error :
Debugger entered--Lisp error: (void-variable common-lisp)
  byte-code("..." [removed] 25)
  load("ilisp-cl" nil nil)
  byte-code("..." [removed] 4)
  load("ilisp" nil nil)
  byte-code("\305\306!\210\307\310\311\10#\210\307\312\311\10#\210\307\313\311\10#\210\307\314\311\10#\210\307\315\311\10#\210\307\316\311\10#\210\307\317\311\10#\210\307\320\311\10..." [noninteractive emacs-major-version emacs-minor-version pvs-original-load-path load-path make-variable-buffer-local pvs-buffer-kind load "ilisp" nil "pvs-ilisp" "pvs-mode" "pvs-view" "pvs-file-list" "pvs-browser" "pvs-utils" "pvs-cmds" (error) "pvs-prelude-files-and-regions" "pvs-print" "pvs-proofstate" "pvs-prover" "pvs-abbreviations" boundp 20 19 29 "pvs-menu" "pvs-tcl" "pvs-prover-helps" "pvs-eval" "pvs-pvsio" "pvs-prover-manip" "manip-debug-utils" "prooflite" "newcomment" t put comment-region pvs-command editing global-set-key "\3;" ad-add-advice kill-emacs (pvs-batch-control (protect) t (advice lambda nil (exit-pvs-process))) before ad-activate] 5)
  load("pvs-load" nil nil nil)
  load-with-code-conversion("/home/user/pvsdir/emac..." "/home/user/pvsdir/emac..." nil t)
  command-line-1(("-load" "/home/user/pvsdir/emacs/go-pvs.el"))
  command-line()
  normal-top-level()

Re-installing pvs allows me to run it once, so I have to basically reinstall it every time...

@samowre
Copy link
Contributor

samowre commented May 24, 2024 via email

@jedbrown
Copy link

Hi 👋, thanks for looking into this. Have you gotten a chance to make progress or would scripting around Clément's solution be the recommended short-term workaround?

@samowre
Copy link
Contributor

samowre commented Jun 11, 2024 via email

@jedbrown
Copy link

Thanks for looking into this. Do you have a recommendation for emacs 29 or 30? I could revert to an older version if needed, though would need to keep it isolated since my configuration (.emacs, etc.) tracks current versions.

@samowre
Copy link
Contributor

samowre commented Jul 11, 2024 via email

@jedbrown
Copy link

jedbrown commented Aug 1, 2024

Thanks, sorry about my slow reply. This is on latest master (17d4f50).

$ ./install-sh
Setting PVSPATH in the "pvs", "pvsio", "proveit", and "provethem"
  shell scripts to /home/jed/src/pvs
If this is not the right path, edit the scripts before using them.
\nByte compiling emacs files using /home/jed/bin/emacs: GNU Emacs 30.0.50
  if this is not the right Emacs, set PVSEMACS
  otherwise the byte compiled files will cause an error
see byte-compile.log for details (mostly warnings)
!!! Something went wrong - see the end of byte-compile.log
$ PVSEMACS=/bin/emacs ./install-sh
Setting PVSPATH in the "pvs", "pvsio", "proveit", and "provethem"
  shell scripts to /home/jed/src/pvs
If this is not the right path, edit the scripts before using them.
\nByte compiling emacs files using /bin/emacs: GNU Emacs 29.4
  if this is not the right Emacs, set PVSEMACS
  otherwise the byte compiled files will cause an error
see byte-compile.log for details (mostly warnings)
!!! Something went wrong - see the end of byte-compile.log

byte-compile.log

@samowre
Copy link
Contributor

samowre commented Aug 1, 2024 via email

@jedbrown
Copy link

jedbrown commented Aug 1, 2024

Yeah, it's attached in the comment above. Feel free to move this to email if you prefer.

@samowre
Copy link
Contributor

samowre commented Aug 2, 2024 via email

@jedbrown
Copy link

jedbrown commented Aug 2, 2024

This is in the repo in which I tried applying the patch discussed above.

$ ./pvs -batch -q -l emacs/pvs-set-prelude-info.el -f set-prelude-files-and-regions
No executable available in /home/jed/src/pvs/bin/ix86_64-Linux
$ tree bin/ix86_64-Linux
bin/ix86_64-Linux
├── runtime
├── yices1 -> ../../yices/ix86_64-Linux/yices-1.0.40/bin/yices
└── yices2 -> ../../yices/ix86_64-Linux/yices-2.6.4/bin/yices

2 directories, 2 files

Or if I start over git clean -fxd ., I get

$ ./install-sh
Setting PVSPATH in the "pvs", "pvsio", "proveit", and "provethem"
  shell scripts to /home/jed/src/pvs
If this is not the right path, edit the scripts before using them.
chmod: cannot access 'pvs': No such file or directory
chmod: cannot access 'pvsio': No such file or directory
chmod: cannot access 'proveit': No such file or directory
chmod: cannot access 'provethem': No such file or directory
./install-sh: line 14: pvs: No such file or directory
mv: cannot stat 'tmp.1609412': No such file or directory
./install-sh: line 16: pvsio: No such file or directory
mv: cannot stat 'tmp.1609412': No such file or directory
./install-sh: line 18: proveit: No such file or directory
mv: cannot stat 'tmp.1609412': No such file or directory
./install-sh: line 20: provethem: No such file or directory
mv: cannot stat 'tmp.1609412': No such file or directory
chmod: cannot access 'pvs': No such file or directory
chmod: cannot access 'pvsio': No such file or directory
chmod: cannot access 'proveit': No such file or directory
chmod: cannot access 'provethem': No such file or directory
\nByte compiling emacs files using /home/jed/bin/emacs: GNU Emacs 30.0.50
  if this is not the right Emacs, set PVSEMACS
  otherwise the byte compiled files will cause an error
see byte-compile.log for details (mostly warnings)
!!! Something went wrong - see the end of byte-compile.log

byte-compile.log

In this case, ./pvs does not exist.

@jedbrown
Copy link

jedbrown commented Aug 2, 2024

My mistake above, as I forgot to re-run ./configure after cleaning (it creates the ./pvs executable). In any case, I get the same error and

$ /pvs -batch -q -l emacs/pvs-set-prelude-info.el -f set-prelude-files-and-regions
No executable available in /home/jed/src/pvs/bin/ix86-Linux

with that directory not existing.

@samowre
Copy link
Contributor

samowre commented Aug 2, 2024 via email

@jedbrown
Copy link

jedbrown commented Aug 2, 2024

I initially had an error Package ASDF does not exist., but search indicated I should create ~/.sbclrc and put (require 'asdf) there, which got me to an error about BABEL missing. I installed cl-babel from my package manager, then (ql:quickload :clack) and same for websocket-driver, hunchentoot, anaphora, lparallel, and cl-json. Then I got the following log:

pvs-asd.log

It looks like packages.lisp has this dependency logic and maybe it was missed because I hadn't set up ~/.sbclrc ahead of time.

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

No branches or pull requests

4 participants