Build from source error on 2.3.0-rc
periode opened this issue · 8 comments
Description
I've installed all opam dependencies, then run make
from the liquidsoap-2.3.0-rc1
and I get:
fatal: not a git repository (or any of the parent directories): .git
File "src/core/tools/utils.ml", line 290, characters 13-33:
290 | Re.replace (Pcre.regexp "%(.)") ~f:subst str
^^^^^^^^^^^^^^^^^^^^
Error: This expression has type Pcre.regexp
but an expression was expected of type Re__Core.re
make: *** [Makefile:4: build] Error 1
Steps to reproduce
- download https://github.com/savonet/liquidsoap/archive/refs/tags/v2.3.0-rc1.tar.gz
- install all build dependencies
- run
make
Expected behavior
It builds liquidsoap
Liquidsoap version
liquidsoap-2.3.0-rc1
Liquidsoap build config
Not sure it's relevant, since it's not built?
Installation method
From source/self-built
Additional Info
A bit of an aside, but is there an easy way with opam to install all dev dependencies at once? Something like package.json
or cargo.toml
?
My approach was to:
make
- see where it fails
opam install
the missing lib- rinse and repeat
Hi @periode,
Could you please provide a detailed explanation of how you installed opam, ocaml, and other libraries?
A bit of an aside, but is there an easy way with opam to install all dev dependencies at once? Something like package.json or cargo.toml?
You may want to check the installation guide at https://www.liquidsoap.info/doc-2.2.5/build.html.
But here's a tl;dr version of it.
wget https://github.com/savonet/liquidsoap/archive/refs/tags/v2.3.0-rc1.tar.gz -O liquidsoap.tar.gz;
tar -xf liquidsoap.tar.gz;
cd liquidsoap;
opam pin .;
opam install liquidsoap;
The opam
files should have the versioning restrictions although sometimes they get out of date.
Hi @vitoyucepi
I installed Opam, along with the OCaml compiler using yay -Syyu opam
then opam switch create 5.0.0
and then opam install [library name]
for libraries
Thanks for the tl;dr! I read the installation guide with the build from source, and then I read the Dependencies section as if it was only about listing dependencies and their information, not installing them. The next section, Compiling, reads "Once you have all dependencies installed, you should be able to compile via..."
So I assumed one should just install them in whatever way. So maybe it would be useful to have a last paragraph added to the Dependencies section along the lines of:
Once you have pinned the liquidsoap you want to build, you can run
opam install liquidsoap
to install all dependencies and the pinned version ofliquidsoap
.
Thanks!
Glad you're making progress! At this time we do not recommend using OCaml 5 or above. We've been seeing high memory usage with these, unfortunately. For production, we are sticking to OCaml 4.14.x
.
Got it!
After opam switch 4.14.1
, and opam pin .
, I get:
opam pin .
This will pin the following packages: liquidsoap-core, liquidsoap-js, liquidsoap-lang, liquidsoap-libs-extra, liquidsoap-libs, liquidsoap-mode, liquidsoap, prometheus-liquidsoap, sdl-liquidsoap, tls-liquidsoap. Continue? [y/n] y
liquidsoap-core is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 2.3.0-rc1)
liquidsoap-js is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 2.3.0-rc1)
liquidsoap-lang is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 2.3.0-rc1)
liquidsoap-libs-extra is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 2.3.0-rc1)
liquidsoap-libs is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 2.3.0-rc1)
liquidsoap-mode is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 2.3.0-rc1)
liquidsoap is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 2.3.0-rc1)
prometheus-liquidsoap is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 2)
sdl-liquidsoap is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 3)
tls-liquidsoap is now pinned to file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1 (version 1)
[ERROR] Package conflict!
* Missing dependency:
- duppy >= 0.9.4
no matching version
[NOTE] Pinning command successful, but your installed packages may be out of sync.
opam install duppy
gives:
[NOTE] Package duppy is already installed (current version is 0.9.2).
Seems like the highest duppy
version available with the 4.14.1
compiler is 0.9.3
?
0.9.4
has been release to opam
: https://opam.ocaml.org/packages/duppy/
Maybe you have a pinned version already in this switch?
opam pin list
# See if you need to:
opam unpin duppy.0.9.2
# Also maybe:
opam update
# To install a specific version:
opam install duppy.0.9.4
opam update
did the trick for the duppy
dependencies.
Now, opam pin . && opam install liquidsoap
fails with:
[ERROR] The compilation of liquidsoap.2.3.0-rc1 failed at "dune build -p liquidsoap -j 7 --promote-install-files=false @install".
#=== ERROR while compiling liquidsoap.2.3.0-rc1 ===============================#
# context 2.2.1 | linux/x86_64 | ocaml.4.14.1 | pinned(file:///home/pierre/code/playground/liquidsoap/2.3-rc/liquidsoap-2.3.0-rc1)
# path ~/.opam/default/.opam-switch/build/liquidsoap.2.3.0-rc1
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p liquidsoap -j 7 --promote-install-files=false @install
# exit-code 1
# env-file ~/.opam/log/liquidsoap-883588-7c399e.env
# output-file ~/.opam/log/liquidsoap-883588-7c399e.out
### output ###
# [...]
# Error: Program pandoc-include not found in the tree or in PATH
# (context: default)
# File "doc/dune.inc", line 435, characters 11-25:
# 435 | (run pandoc-include --directory content/liq)
# ^^^^^^^^^^^^^^
# Error: Program pandoc-include not found in the tree or in PATH
# (context: default)
# File "doc/dune.inc", line 309, characters 11-25:
# 309 | (run pandoc-include --directory content/liq)
# ^^^^^^^^^^^^^^
# Error: Program pandoc-include not found in the tree or in PATH
# (context: default)
Then opam install pandoc-include && opam install liquidsoap
and now it installed successfully ✨! (But still not sure why I had to manually install pandoc-include
)