processone / fast_tls

TLS / SSL OpenSSL-based native driver for Erlang / Elixir
https://www.ejabberd.im
Other
83 stars 37 forks source link

Compilation fails on OSX with Elixir 1.17 and OTP 27.0 #66

Open noozo opened 2 months ago

noozo commented 2 months ago
** (Mix) Could not compile dependency :fast_tls, "/Users/void/.asdf/installs/elixir/1.17.0/.mix/elixir/1-17/rebar3 bare compile --paths /Users/void/Development/web/_build/dev/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile fast_tls --force", update it with "mix deps.update fast_tls" or clean it with "mix deps.clean fast_tls"
> gits
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
> brew --prefix openssl
/opt/homebrew/opt/openssl@3
> DIAGNOSTIC=1 mix deps.compile fast_tls --force
===> Setting paths to [deps]
===> Compile (apps)
===> Setting paths to [plugins]
===> Setting paths to [deps]
===> Setting paths to [plugins]
===> Setting paths to [plugins]
===> Expanded command sequence to be run: []
===> Running provider: do
===> Expanded command sequence to be run: [app_discovery,{bare,compile}]
===> Running provider: app_discovery
===> Found top-level apps: [fast_tls]
    using config: [{src_dirs,["src"]},{lib_dirs,["apps/*","lib/*","."]}]
===> Setting paths to [deps]
===> Compile (apps)
===> Setting paths to [plugins]
===> Setting paths to [deps]
===> Setting paths to [plugins]
===> Setting paths to [plugins]
===> Not adding provider pc compile from module pc_prv_compile because it already exists from module pc_prv_compile
===> Not adding provider pc clean from module pc_prv_clean because it already exists from module pc_prv_clean
===> Running provider: {bare,compile}
===> Compile (untagged)
===> Running hooks for compile in app fast_tls (/Users/void/Development/web/deps/fast_tls) with configuration:
===> Setting paths to [plugins]
===>    {provider_hooks, [{pre, [{pc,compile}]}]}.
===> Running provider: {pc,compile}
===> Running hooks for {pc,compile} with configuration:
===>    {provider_hooks, []}.
===>    {pre_hooks, []}.
===> run_hooks("/Users/void/Development/web/deps/fast_tls", pre_hooks, {pc,
                                                                        compile}) -> no hooks defined

===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: undef
===> Stack trace to the error location:
[{pc_port_env,construct,
     [{state_t,"/Users/void/Development/web/deps/fast_tls",
          {dict,21,16,16,8,80,48,
              {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
              {{[],
                [[{deps,default},{p1_utils,"1.0.23"}],
                 [{plugins,default},pc],
                 [{project_plugins,default}],
                 [coveralls_coverdata,95,98,117,105,108,100,47,116,101,115,
                  116,47,99,111,118,101,114,47,101,117,110,105,116,46,99,111,
                  118,101,114,100,97,116,97]],
                [[base_dir,47,85,115,101,114,115,47,118,111,105,100,47,68,101,
                  118,101,108,111,112,109,101,110,116,47,119,101,98,47,100,
                  101,112,115,47,102,97,115,116,95,116,108,115,47,95,98,117,
                  105,108,100],
                 [deps_dir,108,105,98]],
                [[erl_opts,debug_info,{src_dirs,["src"]},{d,'REBAR3'}],
                 [provider_hooks,
                  {pre,[{compile,{pc,compile}},{clean,{pc,clean}}]}],
                 [plugins,pc],
                 [deps,{p1_utils,"1.0.23"}],
                 [port_specs,
                  {"priv/lib/fast_tls.so"

...

[default],
               default},
           {provider,compile,rebar_prv_bare_compile,
               {[],[]},
               false,
               [{default,app_discovery}],
               [],[],[],
               [{paths,112,"paths",string,
                    "Wildcard paths of ebin directories to add to code path, separated by a colon"},
                {separator,115,"separator",string,
                    "In case of multiple return paths, the separator character to use to join them."},
                {outdir,111,"outdir",string,
                    "Path where build artifacts are located. Defaults to the current directory."}],
               [default],
               bare},
           {provider,as,rebar_prv_as,
               {[],[]},
               true,[],
               "Higher order provider for running multiple tasks in a sequence as a certain profiles.",
               "Higher order provider for running multiple tasks in a sequence as a certain profiles.",
               "rebar3 as <profile1>,<profile2>,... <task1>, <task2>, ...",
               [{profile,undefined,undefined,string,"Profiles to run as."}],
               [default],
               default},
           {provider,app_discovery,rebar_prv_app_discovery,
               {[],[]},
               false,[],[],[],[],[],
               [default],
               default}],
          false},
      []],
     []},
 {pc_port_specs,port_opt,2,
     [{file,
          "/Users/void/Development/web/deps/fast_tls/_build/default/plugins/pc/src/pc_port_specs.erl"},
      {line,244}]},
 {pc_port_specs,'-get_port_spec/3-lc$^2/1-2-',2,
     [{file,
          "/Users/void/Development/web/deps/fast_tls/_build/default/plugins/pc/src/pc_port_specs.erl"},
      {line,197}]},
 {pc_port_specs,get_port_spec,3,
     [{file,
          "/Users/void/Development/web/deps/fast_tls/_build/default/plugins/pc/src/pc_port_specs.erl"},
      {line,197}]},
 {pc_port_specs,'-construct/1-lc$^0/1-1-',2,
     [{file,
          "/Users/void/Development/web/deps/fast_tls/_build/default/plugins/pc/src/pc_port_specs.erl"},
      {line,68}]},
 {pc_port_specs,construct,1,
     [{file,
          "/Users/void/Development/web/deps/fast_tls/_build/default/plugins/pc/src/pc_port_specs.erl"},
      {line,68}]},
 {pc_prv_compile,'-do/1-lc$^0/1-0-',2,
     [{file,
          "/Users/void/Development/web/deps/fast_tls/_build/default/plugins/pc/src/pc_prv_compile.erl"},
      {line,52}]},
 {pc_prv_compile,do,1,
     [{file,
          "/Users/void/Development/web/deps/fast_tls/_build/default/plugins/pc/src/pc_prv_compile.erl"},
      {line,54}]}]
noozo commented 2 months ago

openssl 3.3.1 / OSX Sonoma 14.5

prefiks commented 2 months ago

Can you see if executing /Users/void/.asdf/installs/elixir/1.17.0/.mix/elixir/1-17/rebar3 plugin upgrade allows you to compile after that successfully?

noozo commented 2 months ago
> /Users/void/.asdf/installs/elixir/1.17.0/.mix/elixir/1-17/rebar3 plugin upgrade
===> Command plugin not found
noozo commented 2 months ago

this?

> /Users/void/.asdf/installs/elixir/1.17.0/.mix/elixir/1-17/rebar3 upgrade --all
===> Verifying dependencies...

no changes

noozo commented 2 months ago

i "solved" it by going back on .asdf to elixir 1.16 and otp 26.x and compiling there. After it compiled moved back to 1.17 and it's good. But if i remove _build it will happen again :(

prefiks commented 2 months ago

Ah, sorry it should be /Users/void/.asdf/installs/elixir/1.17.0/.mix/elixir/1-17/rebar3 plugins upgrade --all You may also try upgrading rebar with mix local.rebar.

I am able to compile this module using r27/elixitr1.17.0.