Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to install on Ubuntu 19.10 #1

Open
tristan-nel opened this issue Apr 6, 2020 · 3 comments
Open

Failing to install on Ubuntu 19.10 #1

tristan-nel opened this issue Apr 6, 2020 · 3 comments

Comments

@tristan-nel
Copy link

Aim:
Use in liquidsoap for output.srt

To replicate:
opam depext srt
Output: https://pastebin.com/C6guXPsq
opam install srt
Output: https://pastebin.com/XMhmG8Ze

Error:
It claims that libsrt-dev is not installed. I even tried installing SRT from the Git source, and from APT (sudo apt install livsrt-dev).

@toots
Copy link
Member

toots commented Apr 6, 2020

Thanks for your report. Unfortunately, I cannot reproduce. Something seems fishy in your install, this message, in particular:

# [...]
# srt_generated_stubs.c:30:5: warning: implicit declaration of function 'pthread_setspecific' [-Wimplicit-function-declaration]
#    30 |     pthread_setspecific(ocaml_c_thread_key,(void*)&initialized);
#       |     ^~~~~~~~~~~~~~~~~~~

I double-checked and the file should declare the right depdency on pthread.h as documented for instance here: https://linux.die.net/man/3/pthread_setspecific

I launched a clean docker image for ubuntu 19.04 and was able to install ocaml-srt without troubles. Steps to repro:

% docker run -t -i --entrypoint /bin/bash ubuntu:19.10
---- docker console ----
# apt-get install opam
# apt-get install libsrt-dev m4 pkg-config # This is what depext would install 
# adduser opam
# su opam
$ opam init --disable-sandboxing
$ eval $(opam env)
$ opam install srt
---- docker console ----

@tristan-nel
Copy link
Author

I followed the same steps as here on a fresh Ubuntu 19.10 VM, and it worked,
However the default installed version of OCaml on Ubuntu is an older version which then does not support liquidsoap, so to get liquidsoap in conjunction with srt, I find had to run:

opam switch create 4.10.0

before installing dependencies and srt & liquidsoap.

I haven't confirmed this yet - a bit busy - but I think what caused my initial failure to install srt was a residual

opam switch create 4.08.0

I had in my Makefile setup automation, at least its the main difference I could see - though you mentioned in slack it shouldn't be the cause.

Here is the original Makefile:

install:
    sudo apt install icecast2 -y;
    sudo add-apt-repository ppa:avsm/ppa;
    sudo apt update;
    sudo apt install opam;
    opam init;
    eval $(opam env);
    opam switch create 4.08.0;
    eval $(opam env);
    opam depext taglib mad lame vorbis cry samplerate magic opus ssl liquidsoap;
    opam install taglib mad lame vorbis cry samplerate magic opus ssl liquidsoap;
    sudo systemctl start icecast2;

@romainmp
Copy link

I had a similar problem today on a fresh install based on ubuntu jammy and ocaml 4.14.1

[ERROR] The compilation of conf-srt.2 failed at "pkg-config --exists srt".

Turns out libsrt is not the only dependency, pkg-conf with option --print-errors return the following
> $ pkg-config srt --print-errors Package openssl was not found in the pkg-config search path. Perhaps you should add the directory containing 'openssl.pc' to the PKG_CONFIG_PATH environment variable Package 'openssl', required by 'srt', not found

Then to solve the missing dependencies, you just need a few more libraries :
sudo apt install libssl-ocaml libssl-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants