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

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

Other popular topics Top

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
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
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
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
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement