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

obsolete PPA/install path on linux ? #1164

Closed
yanntm opened this issue May 9, 2023 · 7 comments
Closed

obsolete PPA/install path on linux ? #1164

yanntm opened this issue May 9, 2023 · 7 comments

Comments

@yanntm
Copy link

yanntm commented May 9, 2023

Hi,

I'm having issues in recent linux (ubuntu 22 "jammy") following the instructions provided.

So the page proposes : https://github.com/ocaml/ocaml.org/blob/main/data/tutorials/gs_00_up_and_running.md?plain=1#L85-L88

To install from ppa at "ppa:avsm/ppa"

However, that repo is no longer really maintained it seems (last update 82 weeks ago) see https://launchpad.net/~avsm/+archive/ubuntu/ppa)

Looking up the error I got on CI https://github.com/yanntm/Octant/actions/runs/4799437220/jobs/8783946553#step:3:56

Leads to https://discuss.ocaml.org/t/getting-errors-on-wsl-trying-to-install-from-ppa-avsm-ppa/931

Where people are saying this way of deploying caml is obsolete.

However, previous experiments using ubuntu 20 with apt-get install unzip opam ocaml-dune libdune-ocaml-dev ocaml-doc did not work (see https://github.com/yanntm/Octant/actions/runs/4773056351/jobs/8485946730#step:4:1) without the ppa, I got errors with the system provided packages.

So I think either the ppa is still necessary and should be maintained if possible, i.e. someone could take over the maintenance of the avsm/ppa or the instructions on the main page should be updated to suggest simply apt install ocaml or such if you are at least some version, probably 22.04 jammy or higher. Please note that I did not test this path on jammy.

I'm a total noob at ocaml, and simply trying to setup CI to build someone else's code to a (static) binary which I need, so I apologize if any of this issue is actually irrelevant.

@cuihtlauac
Copy link
Collaborator

cuihtlauac commented May 9, 2023

Sorry the instruction does not work for you. You're correct, updates are missing. You're not irrelevant, not at all.

Have you tried apt-get install opam (like in the Debian instructions) or apt-get install --no-install-recommends opam?

Once you have installed opam you should be back on track.

BTW, are you in WSL?

@yanntm
Copy link
Author

yanntm commented May 11, 2023

I tried apt-get first, that is the normal path to deploy packages, but it did not work with ubuntu 20, so I had to use the ppa. I was targetting ubuntu20 to get older libc dependencies so the binary actually runs on my older machines of a cluster. When I finally was able to fully link static after playing a lot with flags, I just updated my target machine to ubuntu 22 and again it was broken because of the ppa.

This is all continuous integration (cf the links I put in my message), I'm using github actions, machines are linux VMs/dockers not WSL. My goal was to not install opam/ocaml on my cluster in particular.

See https://github.com/yanntm/Octant/blob/main/.github/workflows/linux.yml#L14-L17
commented part was broken on ubuntu 20; I couldn't get ocaml 4.14.1 with just apt-get. And the tool I'm building requires this up to date ocaml.

I'll try to remove the ppa and confirm that newer apt dependencies work on ubuntu 22.

@avsm
Copy link
Member

avsm commented May 15, 2023

However, previous experiments using ubuntu 20 with apt-get install unzip opam ocaml-dune libdune-ocaml-dev ocaml-doc did not work (see https://github.com/yanntm/Octant/actions/runs/4773056351/jobs/8485946730#step:4:1) without the ppa, I got errors with the system provided packages.

It's probably the opam -y install that's incorrect here (from reading the error in the CI logs). Just set OPAMYES=1 in the environment, and invoke it as opam install <packages> and see if that works.

The PPA hasn't been necessary for years, as a reasonably recent opam is included in upstream Ubuntu.

@cuihtlauac
Copy link
Collaborator

The PPA hasn't been necessary for years, as a reasonably recent opam is included in upstream Ubuntu.

Should we remove it from there? https://ocaml.org/docs/up-and-running

BTW, https://ocaml.org/install is online

@avsm
Copy link
Member

avsm commented May 16, 2023

It can be removed!

@yanntm
Copy link
Author

yanntm commented May 16, 2023

Hi, ok thanks @avsm for diagnosing that -y was the actual problem.
I didn't think of that since newer versions do take the flag with no complaints, and it's kind of homogeneous to apt flag -y so I did not think twice about it. Also it seems version dependent whether the flag is taken or not. I guess "OPAMYES=1" works with all versions of OPAM, so I'll switch to that instead of --yes, thanks for the tip.

I'm personally done with this issue, please close it whenever you want.

@cuihtlauac
Copy link
Collaborator

Closing as requested by @yanntm

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

No branches or pull requests

3 participants