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

Add make switch fore easy installation of dependencies #98

Merged
merged 1 commit into from
May 10, 2024

Conversation

aqjune
Copy link
Contributor

@aqjune aqjune commented Apr 21, 2024

This patch adds make switch that

  • Creates a local OPAM switch under the current hol-light directory
  • Chooses the latest fully supported OCaml version (4.14 for now; would be great if it is 5.0 in the future!)
  • And installs dependencies that are needed by HOL Light.

This is to help beginners set the environment for HOL Light.

I also updated README to explain(recommend) this option. A separate 'DEPENDENCIES' chapter is added to explain the original, detailed steps.

thanks to Hendrik Tews, so installation of HOL Light and all its
prerequisites is as simple as

sudo apt-get install hol-light
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that the apt package of hol-light is not working anymore; should we remove this (as edited in this patch)?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree that we should probably delete this, unless someone volunteers to take over maintenance of the apt package. Direct HOL Light installation (thanks to this patch, among others) is now so much easier anyway.

@jrh13
Copy link
Owner

jrh13 commented May 9, 2024

I have tried this out on several machines and it mostly worked perfectly, thanks! One small suggestion:
On Mac OS I found that my opam complained about "ambiguity" (between ocaml-base-compiler and ocaml-system) in
opam switch create . 4.14.0, so I replaced it by opam switch create . ocaml-base-compiler.4.14.0, which seemed to work.

I still had trouble on an ARM-based Mac OS, apparently around the use of m4 in the opam installation process(?) However, I don't really understand the core problem since m4 should be installed (via homebrew). Probably not worth worrying about for now.

@jrh13
Copy link
Owner

jrh13 commented May 9, 2024

OK, I figured out the m4 problem, which was just the fact that the homebrew version of m4 wasn't in my PATH. So it all worked fine on the ARM-based machine too. So the only suggestion would be the "ocaml-base-compiler" change if you agree.

This patch adds `make switch` that
- Creates a local OPAM switch under the current hol-light directory
- Chooses the latest OCaml version (4.14 for now; would be great if it is 5.0 in the future!)
- And installs dependencies that are needed by HOL Light.

This is to help beginners set the environment for HOL Light.

I also updated README to explain(recommend) this option.
A separate 'DEPENDENCIES' chapter is added to explain the original, detailed steps.
@aqjune
Copy link
Contributor Author

aqjune commented May 9, 2024

On Mac OS I found that my opam complained about "ambiguity" (between ocaml-base-compiler and ocaml-system) in
opam switch create . 4.14.0, so I replaced it by opam switch create . ocaml-base-compiler.4.14.0, which seemed to work.

The two seemed identical to me because opam list printed identical lists of installed packages. I updated this patch to use ocaml-base-compiler.4.14.0.

@jrh13
Copy link
Owner

jrh13 commented May 10, 2024

Great, thank you I've already found it useful on an old machine where my system OCaml was in a weird state. I'll merge this in now.

@jrh13 jrh13 merged commit d836698 into jrh13:master May 10, 2024
2 checks passed
switch:; \
opam switch create . ocaml-base-compiler.4.14.0 ; \
eval $(opam env) ; \
opam install -y zarith camlp5 ledit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The camlp5 version should be explicitly given: camlp5.8.02.01. The current version of camlp5 (8.03) is not compatible with pa_j_4.xx_8.02.ml.

@aqjune
Copy link
Contributor Author

aqjune commented May 26, 2024 via email

@monadius
Copy link
Contributor

I tested Camlp5 8.00.03 and it works with OCaml 4.14.

aqjune added a commit to aqjune/hol-light that referenced this pull request May 28, 2024
…SUMS_TAC` help

To fix the failure mentioned in jrh13#98 ,
This updates `make switch` to pin the camlp5 version to 8.02.01.
I previously mentioned that this version was not available on some machine in the thread,
but it seems it was available unless the opam version itself was problematic.

Furthermore, to check that `make switch` is working okay, the CI check of HOL Light is
updated to use `make switch` to set up the environment.

Another small orthogonal update is fixing typos in the help doc of `NAME_ASSUMS_TAC`.
aqjune added a commit to aqjune/hol-light that referenced this pull request May 28, 2024
…SUMS_TAC` help

To fix the failure mentioned in jrh13#98 ,
This updates `make switch` to pin the camlp5 version to 8.02.01.
I previously mentioned that this version was not available on some machine in the thread,
but it seems it was available unless the opam version itself was problematic.

Furthermore, to check that `make switch` is working okay, the CI check of HOL Light is
updated to use `make switch` to set up the environment.

Another small orthogonal update is fixing typos in the help doc of `NAME_ASSUMS_TAC`.
aqjune added a commit to aqjune/hol-light that referenced this pull request May 28, 2024
…SUMS_TAC` help

To fix the failure mentioned in jrh13#98 ,
This updates `make switch` to pin the camlp5 version to 8.02.01.
I previously mentioned that this version was not available on some machine in the thread,
but it seems it was available unless the opam version itself was problematic.

Furthermore, to check that `make switch` is working okay, the CI check of HOL Light is
updated to use `make switch` to set up the environment.

Another small orthogonal update is fixing typos in the help doc of `NAME_ASSUMS_TAC`.
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

Successfully merging this pull request may close these issues.

3 participants