Package Details: liquidsoap 1.4.4-2

Git Clone URL: https://aur.archlinux.org/liquidsoap.git (read-only, click to copy)
Package Base: liquidsoap
Description: A swiss-army knife for multimedia streaming, notably used for netradios and webtvs
Upstream URL: https://www.liquidsoap.info
Keywords: language liquidsoap streaming
Licenses: GPL
Conflicts: liquidsoap-full, liquidsoap-git
Submitter: mefistofeles
Maintainer: robertfoster
Last Packager: robertfoster
Votes: 13
Popularity: 0.001399
First Submitted: 2009-02-14 21:32
Last Updated: 2021-03-16 14:30

Pinned Comments

robertfoster commented on 2021-03-10 11:02

1.4.4 now builds successfully.

Before any compilation error report, please rebuild the related ocaml-* packages

Latest Comments

1 2 3 4 5 6 ... Next › Last »

pvagner commented on 2021-03-12 17:51

It builds fine but I am afraid it can't find the default libraries...

$ liquidsoap 'out(playlist("playlist.m3u"))' At line 1, char 0-4: Error 4: Undefined variable out

robertfoster commented on 2021-03-10 11:02

1.4.4 now builds successfully.

Before any compilation error report, please rebuild the related ocaml-* packages

robertfoster commented on 2021-03-09 22:07

@pvagner I updated all the new released tags for linked ocaml packages. No way for now

here some tests:

https://github.com/M0Rf30/PKGBUILD/tree/20b42b08b80f159a778c0004cf8d1a38324b2304/liquidsoap

pvagner commented on 2021-03-09 17:08

Does opam also install non ocaml specific dependencies e.g. alsa-lib and flac? Edit: ocaml-flac 0.3.0 which I can't convert to dune project on my own because of stubs has just been released. Might this address the issue once built properly?

robertfoster commented on 2021-03-08 20:33

@pvagner I managed to fix alsa issues with this:

From 5d7f810694caaf181e8fe97c14b836ca86e47cd5 Mon Sep 17 00:00:00 2001
From: Romain Beauxis <toots@rastageeks.org>
Date: Mon, 5 Oct 2020 09:27:07 -0500
Subject: [PATCH] Backport support for newest alsa.

DEPS=ocaml-alsa#master
---
 src/io/alsa_io.ml       | 22 +++++++++++-----------
 src/outputs/alsa_out.ml |  2 +-
 src/sources/alsa_in.ml  |  6 ++++--
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/io/alsa_io.ml b/src/io/alsa_io.ml
index 8f5bbca7d..58f383506 100644
--- a/src/io/alsa_io.ml
+++ b/src/io/alsa_io.ml
@@ -71,12 +71,12 @@ class virtual base ~kind dev mode =
                 (fun pcm buf ofs len ->
                   let sbuf = Bytes.create (2 * len * Array.length buf) in
                   Audio.S16LE.of_audio buf ofs sbuf 0 len;
-                  Pcm.writei pcm (Bytes.unsafe_to_string sbuf) 0 len);
+                  Pcm.writei pcm sbuf 0 len);
               read <-
                 (fun pcm buf ofs len ->
-                  let sbuf = String.make (2 * 2 * len) (Char.chr 0) in
+                  let sbuf = Bytes.make (2 * 2 * len) (Char.chr 0) in
                   let r = Pcm.readi pcm sbuf 0 len in
-                  Audio.S16LE.to_audio sbuf 0 buf ofs r;
+                  Audio.S16LE.to_audio (Bytes.unsafe_to_string sbuf) 0 buf ofs r;
                   r)
             with Alsa.Invalid_argument ->
               self#log#severe "Falling back on non-interleaved S16LE";
@@ -87,25 +87,25 @@ class virtual base ~kind dev mode =
                 (fun pcm buf ofs len ->
                   let sbuf =
                     Array.init channels (fun _ ->
-                        String.make (2 * len) (Char.chr 0))
+                        Bytes.make (2 * len) (Char.chr 0))
                   in
                   for c = 0 to Audio.channels buf - 1 do
-                    Audio.S16LE.of_audio
-                      [| buf.(c) |]
-                      ofs
-                      (Bytes.of_string sbuf.(c))
-                      0 len
+                    Audio.S16LE.of_audio [| buf.(c) |] ofs sbuf.(c) 0 len
                   done;
                   Pcm.writen pcm sbuf 0 len);
               read <-
                 (fun pcm buf ofs len ->
                   let sbuf =
                     Array.init channels (fun _ ->
-                        String.make (2 * len) (Char.chr 0))
+                        Bytes.make (2 * len) (Char.chr 0))
                   in
                   let r = Pcm.readn pcm sbuf 0 len in
                   for c = 0 to Audio.channels buf - 1 do
-                    Audio.S16LE.to_audio sbuf.(c) 0 [| buf.(c) |] ofs len
+                    Audio.S16LE.to_audio
+                      (Bytes.unsafe_to_string sbuf.(c))
+                      0
+                      [| buf.(c) |]
+                      ofs len
                   done;
                   r) ) );
         handle "channels" (Pcm.set_channels dev params) channels;
diff --git a/src/outputs/alsa_out.ml b/src/outputs/alsa_out.ml
index 29373d49e..0b38b5ceb 100644
--- a/src/outputs/alsa_out.ml
+++ b/src/outputs/alsa_out.ml
@@ -87,7 +87,7 @@ class output ~kind ~clock_safe ~infallible ~on_stop ~on_start ~start dev source
                     (fun pcm buf ofs len ->
                       let sbuf = Bytes.create (2 * len * Array.length buf) in
                       Audio.S16LE.of_audio buf ofs sbuf 0 len;
-                      Pcm.writei pcm (Bytes.unsafe_to_string sbuf) 0 len) );
+                      Pcm.writei pcm sbuf 0 len) );
               Pcm.set_channels dev params buffer_chans;
               alsa_rate <-
                 Pcm.set_rate_near dev params samples_per_second Dir_eq;
diff --git a/src/sources/alsa_in.ml b/src/sources/alsa_in.ml
index 47984b906..3ee8fa16c 100644
--- a/src/sources/alsa_in.ml
+++ b/src/sources/alsa_in.ml
@@ -97,9 +97,11 @@ class mic ~kind ~clock_safe device =
                 Pcm.set_format dev params Pcm.Format_s16_le;
                 read_fun <-
                   (fun pcm buf ofs len ->
-                    let sbuf = String.make (2 * 2 * len) (Char.chr 0) in
+                    let sbuf = Bytes.make (2 * 2 * len) (Char.chr 0) in
                     let r = Pcm.readi pcm sbuf 0 len in
-                    Audio.S16LE.to_audio sbuf 0 buf ofs r;
+                    Audio.S16LE.to_audio
+                      (Bytes.unsafe_to_string sbuf)
+                      0 buf ofs r;
                     r)
             end;
             sample_freq <- Pcm.set_rate_near dev params sample_freq Dir_eq;

But a flac issue appears. That's why I didn't upload yet the updated PKGBUILD

brolin commented on 2021-03-08 18:42

Finally, I ended up installing liquidsoap via opam.

pvagner commented on 2021-03-08 17:12

I've tried to update the package to the recently released version 1.4.4 but the alsa related error still persists. Has anyone an idea on how to overcome this? If possible I'd be happy if we had build without alsa support if this is the only way on how to get rid of this error.

toaru_yousei commented on 2020-07-28 17:42

@brolin Don't know why, but switching to release version of ocaml-ffmpeg helps to avoid this build error. Also changing ocaml-ffmpeg version to 0.4.2 is required, because 0.4.1 doesn't build with current ffmpeg from [Extra].

But liquidsoap doesn't building anyway, there is one more error:

OCAMLOPT -c sources/alsa_in.ml
File "sources/alsa_in.ml", line 101, characters 42-46:
101 |                     let r = Pcm.readi pcm sbuf 0 len in
^^^^
Error: This expression has type string but an expression was expected of type
bytes

Don't know how fix that...

brolin commented on 2020-06-09 22:45

Can someone helpme to understand this build error? thanks in advance:

OCAMLOPT -c tools/ffmpeg_config.ml File "tools/ffmpeg_config.ml", line 38, characters 9-36: 38 | FFmpeg.Avutil.Log.set_level verbosity; ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: Unbound module FFmpeg make[2]: [../Makefile.rules:125: tools/ffmpeg_config.cmx] Error 2 make[2]: se sale del directorio '/home/brolin/.cache/yay/liquidsoap/src/liquidsoap-1.4.2/src' make[1]: [../Makefile.rules:67: all-auto-ocaml-prog] Error 2 make[1]: se sale del directorio '/home/brolin/.cache/yay/liquidsoap/src/liquidsoap-1.4.2/src' make: *** [Makefile.rules:27: all-subdirs] Error 2 ==> ERROR: Se produjo un fallo en build(). Cancelando... Error making: liquidsoap

robertfoster commented on 2020-04-18 11:02

@netzego updated ocaml-dtools-git uploaded right now. Please give it a try. I will not switch to ocaml-dtools cause to not up-to-date package