comby
comby copied to clipboard
Building from source fails on Fedora 36 - "error while fetching sources from..."
Describe the bug
I'm following the instructions here to build from source. Once I get to the step opam install -t . --deps-only
and try to resolve the dependencies, several packages fail to fetch (all of them are from erratique.ch):
#=== ERROR while fetching sources for uutf.1.0.3 ==============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/uutf/releases/uutf-1.0.3.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/uutf.1.0.3/uutf-1.0.3.tbz.part -- https://erratique.ch/software/uutf/releases/uutf-1.0.3.tbz\" exited with code 60)")
#=== ERROR while fetching sources for topkg.1.0.5 =============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/topkg/releases/topkg-1.0.5.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/topkg.1.0.5/topkg-1.0.5.tbz.part -- https://erratique.ch/software/topkg/releases/topkg-1.0.5.tbz\" exited with code 60)")
#=== ERROR while fetching sources for rresult.0.7.0 ===========================#
OpamSolution.Fetch_fail("https://erratique.ch/software/rresult/releases/rresult-0.7.0.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/rresult.0.7.0/rresult-0.7.0.tbz.part -- https://erratique.ch/software/rresult/releases/rresult-0.7.0.tbz\" exited with code 60)")
#=== ERROR while fetching sources for react.1.2.2 =============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/react/releases/react-1.2.2.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/react.1.2.2/react-1.2.2.tbz.part -- https://erratique.ch/software/react/releases/react-1.2.2.tbz\" exited with code 60)")
#=== ERROR while fetching sources for ptime.1.0.0 =============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/ptime/releases/ptime-1.0.0.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/ptime.1.0.0/ptime-1.0.0.tbz.part -- https://erratique.ch/software/ptime/releases/ptime-1.0.0.tbz\" exited with code 60)")
#=== ERROR while fetching sources for mtime.1.4.0 =============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/mtime/releases/mtime-1.4.0.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/mtime.1.4.0/mtime-1.4.0.tbz.part -- https://erratique.ch/software/mtime/releases/mtime-1.4.0.tbz\" exited with code 60)")
#=== ERROR while fetching sources for logs.0.7.0 ==============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/logs/releases/logs-0.7.0.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/logs.0.7.0/logs-0.7.0.tbz.part -- https://erratique.ch/software/logs/releases/logs-0.7.0.tbz\" exited with code 60)")
#=== ERROR while fetching sources for jsonm.1.0.1 =============================#
OpamSolution.Fetch_fail("http://erratique.ch/software/jsonm/releases/jsonm-1.0.1.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/jsonm.1.0.1/jsonm-1.0.1.tbz.part -- http://erratique.ch/software/jsonm/releases/jsonm-1.0.1.tbz\" exited with code 60)")
#=== ERROR while fetching sources for fpath.0.7.3 =============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/fpath/releases/fpath-0.7.3.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/fpath.0.7.3/fpath-0.7.3.tbz.part -- https://erratique.ch/software/fpath/releases/fpath-0.7.3.tbz\" exited with code 60)")
#=== ERROR while fetching sources for fmt.0.9.0 ===============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/fmt/releases/fmt-0.9.0.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/fmt.0.9.0/fmt-0.9.0.tbz.part -- https://erratique.ch/software/fmt/releases/fmt-0.9.0.tbz\" exited with code 60)")
#=== ERROR while fetching sources for cmdliner.1.1.1 ==========================#
OpamSolution.Fetch_fail("https://erratique.ch/software/cmdliner/releases/cmdliner-1.1.1.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/cmdliner.1.1.1/cmdliner-1.1.1.tbz.part -- https://erratique.ch/software/cmdliner/releases/cmdliner-1.1.1.tbz\" exited with code 60)")
#=== ERROR while fetching sources for bos.0.2.1 ===============================#
OpamSolution.Fetch_fail("https://erratique.ch/software/bos/releases/bos-0.2.1.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/bos.0.2.1/bos-0.2.1.tbz.part -- https://erratique.ch/software/bos/releases/bos-0.2.1.tbz\" exited with code 60)")
#=== ERROR while fetching sources for astring.0.8.5 ===========================#
OpamSolution.Fetch_fail("https://erratique.ch/software/astring/releases/astring-0.8.5.tbz (Curl failed: \"~/anaconda2/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2 --user-agent opam/2.1.2 -L -o /home/nshaheed/.opam/4.09.0/.opam-switch/sources/astring.0.8.5/astring-0.8.5.tbz.part -- https://erratique.ch/software/astring/releases/astring-0.8.5.tbz\" exited with code 60)")
As far as I can tell this is because the certificate has expired for the website. I'm new to opam/ocaml but my understanding is that the normal solution for this is to pass the --insecure flag to curl via $OPAMFETCH, but this has not worked for me (I tried OPAMFETCH=curl --insecure %{out}% %{url}%
)
Reproducing
- building from scratch should cause this error Expected behavior Dependencies to be resolved without error
Additional context
I'm running fedora 36 on a laptop with an intel chip.
Interesting, don't know that I can be super helpful here since it seems a bit out of my control. The sources do seem available at those URLs, and I know someone built from source yesterday, and Fedora shouldn't matter in principle, so to help with this:
First question: what version of opam
are you running?
Second question: I'm guessing you did try OPAMFETCH="curl --insecure %{out}% %{url}%"
(with the quotes, because without quotes it probably doesn't work?). I've also seen OPAMFETCH=wget
float around, maybe that helps? Purely guessing.
I'm using version 2.1.2
I tried using wget directly to fetch one of the packages and that did work, however with some more investigating it looks like this is a bug with 2.1.2 where env vars aren't being fetched properly. So I'm not sure there's much that can be done until 2.2.0 gets released (aside from building opam from HEAD)