savonet / liquidsoap

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
http://liquidsoap.info
GNU General Public License v2.0
1.4k stars 130 forks source link

Can't install `ogg` and `flac` packages from opam #3387

Closed vitoyucepi closed 1 year ago

vitoyucepi commented 1 year ago

Describe the bug Liquidsoap fails to compile if installed from opam alongside ogg and flac.

Log ``` # context 2.1.5 | linux/x86_64 | ocaml-base-compiler.5.0.0 | https://opam.ocaml.org#f3720b1c # path ~/.opam/5.0.0/.opam-switch/build/liquidsoap-core.2.2.0 # command ~/.opam/5.0.0/bin/dune build -p liquidsoap-core -j 5 --promote-install-files=false @install # exit-code 1 # env-file ~/.opam/log/liquidsoap-core-33879-60539a.env # output-file ~/.opam/log/liquidsoap-core-33879-60539a.out ### output ### # (cd _build/default && /root/.opam/5.0.0/bin/ocamlc.opt -w -40 -g -bin-annot -I src/core/.liquidsoap_ogg_flac.objs/byte -I /root/.opam/5.0.0/lib/angstrom -I /root/.opam/5.0.0/lib/bigstringaf -I /root/.opam/5.0.0/lib/bytes -I /root/.opam/5.0.0/lib/camlp-streams -I /root/.opam/5.0.0/lib/camomile/lib -I /root/.opam/5.0.0/lib/cry -I /root/.opam/5.0.0/lib/curl -I /root/.opam/5.0.0/lib/dtools -I /ro[...] # File "src/core/decoder/ogg_flac_duration.ml", line 47, characters 24-54: # 47 | let callbacks = Flac_ogg.Decoder.get_callbacks os (fun _ -> ()) in # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # Error: This function has type # Flac.Decoder.write -> Flac_ogg.Decoder.ogg Flac.Decoder.callbacks # It is applied to too many arguments; maybe you forgot a `;'. ```

To Reproduce

  1. docker run -it --rm debian:bookworm-slim bash
  2. apt-get update;
    apt-get dist-upgrade -y;
    apt-get install --no-install-recommends -y curl ca-certificates patch unzip bubblewrap git bzip2 gcc make libc6-dev;
    curl -sS -L -o /usr/local/bin/opam https://github.com/ocaml/opam/releases/download/2.1.5/opam-2.1.5-x86_64-linux;
    chmod +x /usr/local/bin/opam;
    opam init --bare --disable-sandboxing -n;
    opam switch create 5.0.0;
    eval $(opam env --switch=5.0.0);
    opam install --confirm-level=unsafe-yes liquidsoap ogg flac;

Expected behavior Liquidsoap from opam builds with ogg and flac support.

Version details

Install method opam

Common issues https://github.com/savonet/liquidsoap/discussions/3273#discussioncomment-6916933

toots commented 1 year ago

Thanks for reporting. https://github.com/ocaml/opam-repository/pull/24359 and https://github.com/ocaml/opam-repository/pull/24356 should take care of this. I'm gonna close here for now, feel free to follow the merge there.