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

Failed on MacOS #1

Open
mrinalwadhwa opened this issue Jul 9, 2021 · 3 comments
Open

Failed on MacOS #1

mrinalwadhwa opened this issue Jul 9, 2021 · 3 comments

Comments

@mrinalwadhwa
Copy link

Very cool project @wojtekmach !
I tried it on a mac and got the below error, thought I'd leave a note here .. maybe it'll be helpful.

On my machine libcrypto is at /Users/mrinal/.homebrew/opt/[email protected]/lib/libcrypto.1.1.dylib and not at /usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib

» curl --fail -L -o elixir-run https://github.com/wojtekmach/elixir-run/raw/main/bin/elixir-run-macos-x86_64
» chmod u+x elixir-run
» ./elixir-run version

=ERROR REPORT==== 8-Jul-2021::22:57:58.772985 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library: 'dlopen(/Users/mrinal/Library/Caches/Bakeware/49C6B246FEDE58B13D5D9D7F5056C0B66922E96E/lib/crypto-5.0.2/priv/lib/crypto.so, 2): Library not loaded: /usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib
  Referenced from: /Users/mrinal/Library/Caches/Bakeware/49C6B246FEDE58B13D5D9D7F5056C0B66922E96E/lib/crypto-5.0.2/priv/lib/crypto.so
  Reason: image not found'"
OpenSSL might not be installed on this system.

=SUPERVISOR REPORT==== 8-Jul-2021::22:57:58.773260 ===
    supervisor: {local,kernel_sup}
    errorContext: start_error
    reason: {on_load_function_failed,crypto}
    offender: [{pid,undefined},
               {id,kernel_safe_sup},
               {mfargs,{supervisor,start_link,
                                   [{local,kernel_safe_sup},kernel,safe]}},
               {restart_type,permanent},
               {significant,false},
               {shutdown,infinity},
               {child_type,supervisor}]

=CRASH REPORT==== 8-Jul-2021::22:57:58.775023 ===
  crasher:
    initial call: supervisor:kernel/1
    pid: <0.954.0>
    registered_name: []
    exception exit: {on_load_function_failed,crypto}
      in function  init:run_on_load_handlers/0
      in call from kernel:init/1 (kernel.erl, line 189)
      in call from supervisor:init/1 (supervisor.erl, line 330)
      in call from gen_server:init_it/2 (gen_server.erl, line 423)
      in call from gen_server:init_it/6 (gen_server.erl, line 390)
    ancestors: [kernel_sup,<0.935.0>]
    message_queue_len: 0
    messages: []
    links: [<0.937.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 376
    stack_size: 29
    reductions: 228
  neighbours:

=CRASH REPORT==== 8-Jul-2021::22:57:59.774830 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.934.0>
    registered_name: []
    exception exit: {{shutdown,
                         {failed_to_start_child,kernel_safe_sup,
                             {on_load_function_failed,crypto}}},
                     {kernel,start,[normal,[]]}}
      in function  application_master:init/4 (application_master.erl, line 142)
    ancestors: [<0.933.0>]
    message_queue_len: 1
    messages: [{'EXIT',<0.935.0>,normal}]
    links: [<0.933.0>,<0.932.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 29
    reductions: 166
  neighbours:

=INFO REPORT==== 8-Jul-2021::22:57:59.777073 ===
    application: kernel
    exited: {{shutdown,
                 {failed_to_start_child,kernel_safe_sup,
                     {on_load_function_failed,crypto}}},
             {kernel,start,[normal,[]]}}
    type: permanent

{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,crypto}}},{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,crypto}}},{kernel,start,[normal,[]]}}})

Crash dump is being written to: erl_crash.dump...done
@wojtekmach
Copy link
Owner

Thanks for the report. This is because the OTP used in that executable dynamically links openssl from homebrew, the paths must match exactly.

I'm working on getting proper macOS images upstream, see erlang/otp#5036.

@wojtekmach
Copy link
Owner

And thanks for trying out elixir-run! Just fyi, there are some problems with the current design. Because we are building a release, only the OTP apps that we specify ahead of time would be available in the release. So we'd need to include all of them in case the user wants to use them. The release runs in embedded mode by default whereas we more likely want to run in interactive mode. Both of these issues are hurdles to "just use Elixir" like in your dev machine. I have some ideas how to solve them though, stay tuned!

@toni-kargo
Copy link

@wojtekmach any update on this? Also wanna to try this cools project

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

No branches or pull requests

3 participants