michaelwa
Error running Membrane Pipeline tutorial
I am running through the initial membrane tutorial:
I have installed the two required libraries:
❯ apt list --installed | grep "libmad0-dev"
libmad0-dev/focal,now 0.15.1b-10ubuntu1 amd64 [installed]
❯ apt list --installed | grep "portaudio19-dev"
portaudio19-dev/focal,now 19.6.0-1build1 amd64 [installed]
I started an iex session and ran the code snippet code in separate blocks. All is well until the last block calling “start_link”, then there is a warning and an error:
7:14:06.609 [warning] The on_load function for module Elixir.Membrane.PortAudio.Sink.Native.Nif returned:
{%RuntimeError{
message: "Bundlex cannot load nif :sink of app :membrane_portaudio_plugin\nfrom \"/home/michael_intandem/.cache/mix/installs/elixir-1.16.0-erts-14.1.1/296ba109bd28b18599af0e6d5e8838bb/_build/dev/lib/membrane_portaudio_plugin/priv/bundlex/nif/sink\", check bundlex.exs file for information about nifs.\nReason: :load_failed, Failed to load NIF library /home/michael_intandem/.cache/mix/installs/elixir-1.16.0-erts-14.1.1/296ba109bd28b18599af0e6d5e8838bb/_build/dev/lib/membrane_portaudio_plugin/priv/bundlex/nif/sink: 'libssl.so.3: cannot open shared object file: No such file or directory'\n"
},
[
{Membrane.PortAudio.Sink.Native.Nif, :load_nif, 0,
[
file: ~c"lib/membrane_portaudio_plugin/sink_native.ex",
line: 1,
error_info: %{...}
]},
{:code_server, :"-handle_on_load/5-fun-0-", 1,
[file: ~c"code_server.erl", line: 1398]}
]}
07:14:06.586 [error] Process #PID<0.313.0> raised an exception
** (RuntimeError) Bundlex cannot load nif :sink of app :membrane_portaudio_plugin
from "/home/michael_intandem/.cache/mix/installs/elixir-1.16.0-erts-14.1.1/296ba109bd28b18599af0e6d5e8838bb/_build/dev/lib/membrane_portaudio_plugin/priv/bundlex/nif/sink", check bundlex.exs file for information about nifs.
Reason: :load_failed, Failed to load NIF library /home/michael_intandem/.cache/mix/installs/elixir-1.16.0-erts-14.1.1/296ba109bd28b18599af0e6d5e8838bb/_build/dev/lib/membrane_portaudio_plugin/priv/bundlex/nif/sink: 'libssl.so.3: cannot open shared object file: No such file or directory'
(membrane_portaudio_plugin 0.18.3) lib/membrane_portaudio_plugin/sink_native.ex:1: Membrane.PortAudio.Sink.Native.Nif.load_nif/0
(kernel 9.1) code_server.erl:1398: anonymous fn/1 in :code_server.handle_on_load/5
I am running:
❯ asdf current
elixir 1.16.0-otp-26 /home/michael/.tool-versions
erlang 26.1.2 /home/michael/.tool-versions
I also tried an earlier 1.15 version with the same result.
Most Liked
mat-hek
Ok, so it seems possible to make it work with OpenSSL 1.1, however, Ubuntu 20.04 uses an old version of GlibC as well, which is harder to support. Thus, it seems that until you upgrade the OS, you need to disable the precompiled deps completely:
config :bundlex, :disable_precompiled_os_deps, true
^ This is possible since the latest release of Bundlex, 1.4.5, so make sure it’s up to date. Then, install all the dependencies manually. For the example in the tutorial, you’ll need:
sudo apt install pkg-config alsa portaudio19-dev libmad0-dev







