Since upgrading to erlang 27 my projects which import the syslog library fail to compile. This can be trivially reproduced with
- mix new test
- edit mix.exs to include dependency on: {:syslog, “~> 1.1.0”},
- mix compile - will now error with:
===> Fetching pc v1.13.0
===> Analyzing applications...
===> Compiling pc
===> Compiling _build/default/plugins/pc/src/pc_port_env.erl failed
_build/default/plugins/pc/src/pc_port_env.erl:190:10: code:lib_dir/2 is deprecated; this functionality will be removed in a future release
===> Errors loading plugin pc. Run rebar3 with DEBUG=1 set to see errors.
===> Analyzing applications...
===> Compiling pc
===> Analyzing applications...
===> Compiling syslog
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
** (Mix) Could not compile dependency :syslog, "/Users/edward/.mix/elixir/1-17/rebar3 bare compile --paths /Users/edward/Documents/src/elixir/temp/test_syslog/_build/dev/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile syslog --force", update it with "mix deps.update syslog" or clean it with "mix deps.clean syslog"
I cannot make head nor tail of the debug or error reports. For completeness, here is the output from rebar3.crashdump (edit, it’s too long for the post. Here are the first few lines)
Error: undef
[{pc_port_env,construct,
[{state_t,
"/Users/edward/Documents/src/elixir/temp/test_syslog/deps/syslog",
{dict,13,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],
[[{deps,default}],
[{plugins,default},pc],
[{project_plugins,default}]],
[[base_dir,47,85,115,101,114,115,47,101,100,119,97,114,100,47,
68,111,99,117,109,101,110,116,115,47,115,114,99,47,101,108,
105,120,105,114,47,116,101,109,112,47,116,101,115,116,95,
115,121,115,108,111,103,47,100,101,112,115,47,115,121,115,
108,111,103,47,95,98,117,105,108,100],
[deps_dir,108,105,98]],
[[erl_opts,debug_info,warn_untyped_record,
{platform_define,"^[0-9]+",namespaced_types}],
[plugins,pc],
[artifacts,"priv/syslog_drv.so"],
[provider_hooks,
{post,[{compile,{pc,compile}},{clean,{pc,clean}}]}],
[overrides],
[profiles,
{test,
[{erl_opts,[{d,'TEST'}]},
{extra_src_dirs,[{"test",[{recursive,false}]}]}]}]],