gfngfn / SATySFi

A statically-typed, functional typesetting system
GNU Lesser General Public License v3.0
1.17k stars 83 forks source link

Dune build fails when `camlimages.5.0.5` is installed #424

Open TonalidadeHidrica opened 9 months ago

TonalidadeHidrica commented 9 months ago

opam install satysfi fails by the following error.

❯ opam install satysfi
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[satysfi.0.0.10] synchronised (no changes)
The following actions will be performed:
  ∗ install satysfi 0.0.10*
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of satysfi.0.0.10 failed at "make -f Makefile
        PREFIX=/home/username/.opam/satysfi-switch".
#=== ERROR while compiling satysfi.0.0.10 =====================================#
# context     2.1.2 | linux/x86_64 | ocaml-base-compiler.4.14.1 | pinned(git+file:///home/username/dev/git/com/github/gfngfn/SATySFi#master#530ab470)
# path        ~/.opam/satysfi-switch/.opam-switch/build/satysfi.0.0.10
# command     ~/.opam/opam-init/hooks/sandbox.sh build make -f Makefile PREFIX=/home/username/.opam/satysfi-switch
# exit-code   2
# env-file    ~/.opam/log/satysfi-174420-08433b.env
# output-file ~/.opam/log/satysfi-174420-08433b.out
### output ###
# [...]
# 7 |             camlimages
#                 ^^^^^^^^^^
# Error: Library "camlimages" not found.
# -> required by library "satysfi" in _build/default/src
# -> required by _build/default/META.satysfi
# -> required by _build/install/default/lib/satysfi/META
# -> required by _build/default/satysfi.install
# -> required by alias install
# -> required by alias default
# Warning: one state has shift/reduce conflicts.
# Warning: one shift/reduce conflict was arbitrarily resolved.
# make: *** [Makefile:11: all] Error 1
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build satysfi 0.0.10
└─
╶─ No changes have been performed

But camlimages is indeed intaled:

❮ opam list
# Packages matching: installed
# Name                      # Installed   # Synopsis
(snip)
camlimages                  5.0.5         Image processing library
(snip)

@gfngfn reported that this does not occur when camlimages.5.0.4-1 is installed. So the workaround is to install that version manually before installing satysfi:

❯ opam install camlimages.5.0.4-1
The following actions will be performed:
  ↘ downgrade camlimages 5.0.5 to 5.0.4-1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved camlimages.5.0.4-1  (https://opam.ocaml.org/cache)
⊘ removed   camlimages.5.0.5
∗ installed camlimages.5.0.4-1
Done.

❯ opam install satysfi

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[satysfi.0.0.10] synchronised (no changes)

The following actions will be performed:
  ∗ install satysfi 0.0.10*

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed satysfi.0.0.10
Done.

Further investigation is wanted.

marmot1123 commented 8 months ago

I tried to install SATySFi on macOS according to the following URL but failed for the reasons given in this issue. I solved the problem with the solution described above. I confirmed that the PR above was merged to master, but I guess you forgot to replace the tag v0.0.10. Could you please check?

gfngfn commented 8 months ago

Ah yes, I haven't released v0.0.11 for a dozen days. I'll be sure to do it soon.

(Changing commits pointed at by an existing tag is not a good idea; we should create another tag instead)

The current workaround is, however, very ad-hoc, and @leque-san suggested a better cure. I would like to try it before releasing v0.0.11.

Thank you anyway for encouraging me!

gfngfn commented 8 months ago

Unfortunately, camlimages.5.0.5 per se seems to have some issues with its installation, and we couldn't solve them immediately. I thus released v0.0.11, which continues to do the workaround about the version constraint.