Cannot compile unicode_util_compat

Hi All,

I am fairly new to Elixir and I am just want to do some light weight project.
I’d like to use timex package but after added it to my deps and tried to run my tests I got a compile error.

** (Mix) Could not compile dependency :unicode_util_compat, "/home/gergelyorosz/.mix/rebar3 bare compile --paths "/home/gergelyorosz/Devel/MyStuff/Elixir/date_utils/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile unicode_util_compat", update it with "mix deps.update unicode_util_compat" or clean it with "mix deps.clean unicode_util_compat"

Herer is the DEBUG=1 mix command output:

===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{default,app_discovery},
===> Evaluating config script "/home/gergelyorosz/Devel/MyStuff/Elixir/date_utils/deps/unicode_util_compat/rebar.config.script"
===> Evaluating config script "/home/gergelyorosz/Devel/MyStuff/Elixir/date_utils/deps/unicode_util_compat/rebar.config.script"
===> Compiling unicode_util_compat
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: badarg
===> Stack trace to the error location:
===> When submitting a bug report, please include the output of `rebar3 report "your command"`

And also the rebar3 report:

Rebar3 report
 version 3.3.6
 generated at 2017-07-08T09:38:15+00:00
Please submit this along with your issue at (and feel free to edit out private information, if any)
Task: mix
Entered as:
Operating System: x86_64-redhat-linux-gnu
ERTS: Erlang/OTP 19 [erts-8.3.5] [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]
Root Directory: /usr/lib64/erlang
Library directory: /usr/lib64/erlang/lib
Loaded Applications:
bbmustache: 1.3.0
certifi: 0.4.0
cf: 0.2.2
compiler: 7.0.4
crypto: 3.7.4
cth_readable: 1.2.4
erlware_commons: 1.0.0
eunit_formatters: 0.3.1
getopt: 0.8.2
inets: 6.3.9
kernel: 5.2
providers: 1.6.0
public_key: 1.4
relx: 3.22.3
sasl: 3.0.3
snmp: 5.2.5
ssl_verify_fun: 1.1.1
stdlib: 3.3
syntax_tools: 2.1.1
tools: 2.9.1

Escript path: /home/gergelyorosz/.mix/rebar3
  app_discovery as clean compile compile cover ct deps dialyzer do edoc escriptize eunit get-deps help install install_deps list lock new path pkgs release relup report shell state tar tree unlock update upgrade upgrade upgrade version xref

I also tried to the following steps:

  • mix local.rebar
  • rm -rf _build
  • rm -rf deps
  • mix deps.get

But the result was the same.

OS: Fedora 25 4.11.8-200.fc25.x86_64
Erlang version" Erlang/OTP 19 [erts-8.3.5] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

I don’t know has any body else had this problem before or what should be my next step

Thank you for any advise

Best Regard
Gergely Orosz (Greg)

Can you provide your mix.exs in a gist? We can attempt to reproduce it locally. Alternatively, you can try to use the calendar library instead of timex.

This is the mix.exs file:
Nothing extra just the one created by mix new command

I have tried calendar as you suggested but get the same error with unicode_util_compat

Thanks @georosz. Unfortunately I could not reproduce the error. Everything compiled just fine locally. I would suggest running mix local.rebar and trying again. If that doesn’t work, please fill a bug report on rebar3’s issues tracker.


Will do that and thank you for your help and time

Managed to solve the problem by completely remove elixir and erlang
After the re-install I could compile all dependencies

Sorry I haven’t tried this obvious solution before

Thanks again for the help


1 Like

FYI, just ran into this exact problem while setting up a new dev instance. Turns out I had MIX_HOME set to “./.mix” via direnv, and that broke the script that builds unicode_util_compat which seems to need an absolute path. Fixed by redefining MIX_HOME to “$(pwd)/.mix” in my .envrc