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

Provide a convenient way to run examples with OPAM-install VST #615

Open
QinshiWang opened this issue Aug 1, 2022 · 10 comments
Open

Provide a convenient way to run examples with OPAM-install VST #615

QinshiWang opened this issue Aug 1, 2022 · 10 comments

Comments

@QinshiWang
Copy link
Contributor

A VST user runs into issue #614. I think he wants to install VST and run some examples. In order to run the examples, he needs to first make. But make in VST repo should be making VST from source code. Maybe it is worth improving the user experience.

@eleehiga
Copy link

eleehiga commented Aug 1, 2022

@QinshiWang Is it that make in the VST repo is making VST from coq-vst and not the source code currently?

@QinshiWang
Copy link
Contributor Author

make is making from source code, not from OPAM.

@mansky1
Copy link
Collaborator

mansky1 commented Aug 1, 2022

You shouldn't need to run make to start running examples, although you may encounter problems if you both install VST through OPAM and also try to clone the repo and compile the examples. Maybe we need to write instructions for checking out and compiling just the examples against an OPAM version of VST.

@eleehiga
Copy link

eleehiga commented Aug 1, 2022

@mansky1 That sounds good and how do I run the VST examples for the OPAM version of VST?

@mansky1
Copy link
Collaborator

mansky1 commented Aug 1, 2022

Once VST is installed through OPAM (and you're using the OPAM version of Coq/CoqIDE), if you just open the files and start running them, they should work. Depending on the example, you may need to run clightgen on the .c file first.

@eleehiga
Copy link

eleehiga commented Aug 1, 2022

Ah ok I understand, I remember though when I was trying to run verif_sumarray.v from the VST source that there was an error with the includes and I thought to get rid of those that I had to run make. Therefore, was wondering how you would recommend me to rid of those include errors without running make?

@mansky1
Copy link
Collaborator

mansky1 commented Aug 1, 2022

If I correctly understand the situation, the error with the includes was because you were running CoqIde from Snap and trying to load VST from OPAM. Once you uninstall the Snap package and/or run CoqIde from OPAM, that error should disappear. If it doesn't, we can investigate further. (It should also be possible to uninstall the OPAM version of Coq and make VST from scratch with the Snap version, but that's not the subject of this issue.)

@eleehiga
Copy link

eleehiga commented Aug 1, 2022

Ok that all sounds good and I will try run Coq and VST from OPAM

@eleehiga
Copy link

eleehiga commented Aug 1, 2022

Also, for your guys' installation instructions you guys should specify to install the OPAM version and not the Snap version of Coq

@andrew-appel
Copy link
Collaborator

@eleehiga Specifically, do you recommend adding the line with the # comment to the BUILD_ORGANIZATION.md file?

Install Method 2: use opam directly

If you install VST via opam, opam will try to install a
suitable version of CompCert, Flocq and other dependencies.
  opam install coq  # best to install coq by opam instead of some other method
  opam install coq-vst
  AND/OR
  opam install coq-vst-64

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