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

improve camlp4+system installation experience #2900

Closed
edwintorok opened this issue Oct 20, 2014 · 1 comment
Closed

improve camlp4+system installation experience #2900

edwintorok opened this issue Oct 20, 2014 · 1 comment

Comments

@edwintorok
Copy link
Contributor

  1. On CentOS/Fedora please suggest to install ocaml-camlp4-devel

    This would be the equivalent of camlp4-extra in Debian.
    The current message is:

    # * Debian/Ubuntu: sudo apt-get install camlp4-extra
    # * RHEL/CentOS/Fedora: sudo yum install ocaml-camlp4
    
  2. Please suggest reinstalling ocamlfind, or fix ocamlfind automatically

    See the report on the mailing list and the solution.
    It'd be best if installing the camlp4+system package would do whatever is needed for ocamlfind to find the package:

    • could it install the required META files for camlp4?
    • should it suggest to the user to manually run opam reinstall ocamlfind? (probably not desirable as it involves recompiling almost everything)
    • should it trigger the rebuild of ocamlfind on its own? (not sure if its even possible, and see previous point)
  3. Improve the check-camlp4.sh script

    To also check that ocamlfind can find the camlp4 package.

Testcase using docker (original report is about Arch, I use CentOS7 here for simplicity),
see how ocamlfind query camlp4 only works after ocaml-camlp4-devel system package is installed, camlp4 opam package is installed, and ocamlfind is reinstalled:

$ cat >Dockerfile <<EOF
FROM centos:latest
RUN cd /etc/yum.repos.d/ &&\
    curl -L -O http://download.opensuse.org/repositories/home:ocaml/CentOS_7/home:ocaml.repo &&\
    yum install -y ocaml opam m4 make patch gcc git
RUN opam init -y
RUN opam install ocamlfind
RUN yum install -y ocaml-camlp4
RUN opam install camlp4 || yum install -y ocaml-camlp4-devel
RUN opam config exec -- ocamlfind query camlp4 || opam reinstall ocamlfind
RUN opam config exec -- ocamlfind query camlp4
EOF
$ sudo docker rmi test-camlp4; sudo docker build -t test-camlp4 .

Output is available in this gist

@diml: thoughts?

@samoht
Copy link
Member

samoht commented Sep 27, 2016

Can you report that issue in the camlp4 bug tracker? Thanks!

@samoht samoht closed this as completed Sep 27, 2016
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

2 participants