michaelwa

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

mat-hek

Membrane Core Team

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

Where Next?

Popular in Questions Top

ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44139 214
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement