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

CircleCI should fail when loading NIF module fails #637

Closed
Noarkhh opened this issue Oct 6, 2023 · 1 comment
Closed

CircleCI should fail when loading NIF module fails #637

Noarkhh opened this issue Oct 6, 2023 · 1 comment
Assignees
Labels

Comments

@Noarkhh
Copy link
Contributor

Noarkhh commented Oct 6, 2023

when CircleCi runs mix compile --force --warnings-as-errors in membrane_portaudio_plugin the following error occus yet the step completes successfully. Output:

Bundlex: Building natives: sink, source

11:14:59.870 [debug] redirecting to https://github.com/membraneframework-precompiled/precompiled_portaudio/releases/download/v19.7.0/portaudio_linux.tar.gz

11:14:59.962 [debug] redirecting to https://objects.githubusercontent.com/github-production-release-asset-2e65be/691488165/98a2f596-092c-4eba-9e8d-c6f745516bbc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231006%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231006T111459Z&X-Amz-Expires=300&X-Amz-Signature=10fa5fbeebd94e867b8b87352b2e26d386634a0d6992950674b8cca54f2d1228&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=691488165&response-content-disposition=attachment%3B%20filename%3Dportaudio_linux.tar.gz&response-content-type=application%2Foctet-stream
Compiling 6 files (.ex)

11:15:01.269 [error] Process #PID<0.271.0> raised an exception
** (RuntimeError) Bundlex cannot load nif :sink of app :membrane_portaudio_plugin
from "/root/project/_build/test/lib/membrane_portaudio_plugin/priv/bundlex/nif/sink", check bundlex.exs file for information about nifs.
Reason: :load_failed, Failed to load NIF library /root/project/_build/test/lib/membrane_portaudio_plugin/priv/bundlex/nif/sink: 'libdb-18.1.so: cannot open shared object file: No such file or directory'

    lib/membrane_portaudio_plugin/sink_native.ex:1: Membrane.PortAudio.Sink.Native.Nif.load_nif/0
    (kernel 9.0.2) code_server.erl:1332: anonymous fn/1 in :code_server.handle_on_load/5

11:15:01.271 [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 \"/root/project/_build/test/lib/membrane_portaudio_plugin/priv/bundlex/nif/sink\", check bundlex.exs file for information about nifs.\nReason: :load_failed, Failed to load NIF library /root/project/_build/test/lib/membrane_portaudio_plugin/priv/bundlex/nif/sink: 'libdb-18.1.so: 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: 1332]}
 ]}


11:15:01.359 [error] Process #PID<0.291.0> raised an exception
** (RuntimeError) Bundlex cannot load nif :source of app :membrane_portaudio_plugin
from "/root/project/_build/test/lib/membrane_portaudio_plugin/priv/bundlex/nif/source", check bundlex.exs file for information about nifs.
Reason: :load_failed, Failed to load NIF library /root/project/_build/test/lib/membrane_portaudio_plugin/priv/bundlex/nif/source: 'libdb-18.1.so: cannot open shared object file: No such file or directory'

    lib/membrane_portaudio_plugin/source_native.ex:1: Membrane.PortAudio.Source.Native.Nif.load_nif/0
    (kernel 9.0.2) code_server.erl:1332: anonymous fn/1 in :code_server.handle_on_load/5

11:15:01.360 [warning] The on_load function for module Elixir.Membrane.PortAudio.Source.Native.Nif returned:
{%RuntimeError{
   message: "Bundlex cannot load nif :source of app :membrane_portaudio_plugin\nfrom \"/root/project/_build/test/lib/membrane_portaudio_plugin/priv/bundlex/nif/source\", check bundlex.exs file for information about nifs.\nReason: :load_failed, Failed to load NIF library /root/project/_build/test/lib/membrane_portaudio_plugin/priv/bundlex/nif/source: 'libdb-18.1.so: cannot open shared object file: No such file or directory'\n"
 },
 [
   {Membrane.PortAudio.Source.Native.Nif, :load_nif, 0,
    [
      file: ~c"lib/membrane_portaudio_plugin/source_native.ex",
      line: 1,
      error_info: %{...}
    ]},
   {:code_server, :"-handle_on_load/5-fun-0-", 1,
    [file: ~c"code_server.erl", line: 1332]}
 ]}

Generated membrane_portaudio_plugin app
@Noarkhh Noarkhh added the bug label Oct 6, 2023
@Noarkhh Noarkhh added this to Smackore Oct 6, 2023
@Noarkhh Noarkhh moved this to Backlog in Smackore Oct 6, 2023
@mat-hek mat-hek changed the title CircleCI should fail when precompiled build fails CircleCI should fail when loading NIF module fails Jan 19, 2024
@mat-hek mat-hek moved this from Backlog to Todo in Smackore Jan 30, 2024
@varsill varsill self-assigned this Feb 8, 2024
@varsill varsill moved this from Todo to In Progress in Smackore Feb 8, 2024
@varsill varsill moved this from In Progress to In Review in Smackore Feb 8, 2024
@varsill varsill moved this from In Review to Done in Smackore Feb 9, 2024
@mat-hek
Copy link
Member

mat-hek commented Feb 13, 2024

@mat-hek mat-hek closed this as completed Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants