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

last.fm appears to be broken in 2.0.0 / main #1680

Closed oranjebloom closed 3 years ago

oranjebloom commented 3 years ago

I have main installed / pinned via opam on Debian Buster. A very minimal script with lines of the last.fm code is attached below When the lines of last.fm code in the script are uncommented, the script won't start. However, if you comment out those lines, the script runs fine.

lastfm-enabled.liq.txt

I suspect there have been developments in main that aren't accounted for in the code I'm using in my script. Any help is appreciated.

toots commented 3 years ago

Hi!

Could you also send the logs? This script runs fine here:

s = blank()

def lastfm.submit(~user,~password,~source="broadcast",~length=false,m) =
  audioscrobbler.submit(
    user=user,password=password,
    source=source,length=length,
    host="post.audioscrobbler.com",port=80,m
  )
end

s.on_metadata(lastfm.submit(user="USERNAME",password="PASSWORD"))

output.dummy(s)
oranjebloom commented 3 years ago

Strange because it was working fine about 4 weeks ago. It won't log because the script is failing on startup... journalctl -xe doesn't show anything conclusive... Jun 09 07:06:09 systrum.net systemd[1]: min.liq-liquidsoap.service: Failed with result 'exit-code'. As far as I know, my dependencies are up to date. opam list shows...

base-bigarray           base
base-bytes              base        Bytes library distributed with the OCaml compiler
base-threads            base
base-unix               base
camomile                1.0.2       A Unicode library
conf-libpcre            1           Virtual package relying on a libpcre system installation
conf-libsamplerate      1           Virtual package relying on libsamplerate
conf-libssl             3           Virtual package relying on an OpenSSL library system installation
conf-pkg-config         2           Check if pkg-config is installed and create an opam switch local pkgconfig folder
conf-which              1           Virtual package relying on which
cry                     0.6.5       OCaml client for the various icecast & shoutcast source protocols
csexp                   1.5.1       Parsing and printing of S-expressions in Canonical form
depext                  transition  opam-depext transition package
dtools                  0.4.2       Library providing various helper functions to make daemons
dune                    2.8.5       Fast, portable, and opinionated build system
dune-configurator       2.8.5       Helper library for gathering system configuration
duppy                   0.9.0       Library providing monadic threads
gen                     0.5.3       Iterators for OCaml, both restartable and consumable
inotify                 2.3         Inotify bindings for ocaml.
lame                    0.3.4       MP3 encoding library
lastfm                  0.3.3       The lastfm library is an implementation of the API used by the last.fm to keep count of played songs
liquidsoap              2.0.0       pinned to version 2.0.0 at git+file:///home/db/liquidsoap#main
mad                     0.5.0       Mad decoding library
magic                   0.7.3       Bindings for libmagic (to determine the type of files)
menhir                  20210419    An LR(1) parser generator
menhirLib               20210419    Runtime support library for parsers generated by Menhir
menhirSdk               20210419    Compile-time library for auxiliary tools related to Menhir
mm                      0.7.1       The mm library contains high-level to create and manipulate multimedia streams (audio, video, MIDI)
ocaml                   4.08.0      The OCaml compiler (virtual package)
ocaml-base-compiler     4.08.0      Official release 4.08.0
ocaml-compiler-libs     v0.12.3     OCaml compiler libraries repackaged
ocaml-config            1           OCaml Switch Configuration
ocaml-migrate-parsetree 2.1.0       Convert OCaml parsetrees between different versions
ocamlbuild              0.14.0      OCamlbuild is a build system with builtin rules to easily build most OCaml projects.
ocamlfind               1.9.1       A library manager for OCaml
opam-depext             1.1.5       install OS distribution packages
pcre                    7.4.6       Bindings to the Perl Compatibility Regular Expressions library
ppx_derivers            1.2.1       Shared [@@deriving] plugin registry
ppxlib                  0.22.0      Standard library for ppx rewriters
result                  1.5         Compatibility Result module
samplerate              0.1.5       Samplerate audio conversion library
sedlex                  2.3         An OCaml lexer generator for Unicode
sexplib0                v0.14.0     Library containing the definition of S-expressions and some base converters
ssl                     0.5.10      Bindings for OpenSSL
stdlib-shims            0.3.0       Backport some of the new stdlib features to older compiler
taglib                  0.3.6       Bindings for the taglib library which provides functions for reading tags in headers of audio files
topkg                   1.0.3       The transitory OCaml software packager
uchar                   0.0.2       Compatibility library for OCaml's Uchar module
xmlm                    1.3.0       Streaming XML codec for OCaml
xmlplaylist             0.1.5       Library to parse various file playlists in XML format
oranjebloom commented 3 years ago

@toots, perhaps the version of last.fm that I installed via opam and the pinned version of liquidsoap (main) are not compatible? I installed all dependencies via opam with a compiler version 4.08.0. I then pinned main after cloning from GitHub. Could the installation method is the problem?

dhannyz commented 3 years ago

Is this due to the shift to ocurl? I had that issue earlier.

toots commented 3 years ago

Is this due to the shift to ocurl? I had that issue earlier.

Yeah that's probably what it is. @oranjebloom have you installed ocurl via opam?

oranjebloom commented 3 years ago

yep, that was it. Installing ocurl fixed it. Thanks @toots and @dhannyz