0

I am trying to build this (https://github.com/dch/rebar/) rebar.


C:\Projects\rebar>bootstrap
Recompile: src/rebar_core
==> rebar (compile)
Uncaught error in rebar_core: {'EXIT',
                               {badarg,
                                [{re,split,
                                  [[85,83,69,82,68,79,77,65,73,78,61,65,108,
                                    101,120,45,1055,1050],
                                   "=",
                                   [{return,list},{parts,2}]],
                                  [{file,"re.erl"},{line,154}]},
                                 {rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
                                  1,
                                  [{file,"src/rebar_port_compiler.erl"},
                                   {line,371}]},
                                 {rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
                                  1,
                                  [{file,"src/rebar_port_compiler.erl"},
                                   {line,372}]},
                                 {rebar_port_compiler,os_env,0,
                                  [{file,"src/rebar_port_compiler.erl"},
                                   {line,371}]},
                                 {rebar_port_compiler,setup_env,1,
                                  [{file,"src/rebar_port_compiler.erl"},
                                   {line,150}]},
                                 {rebar_core,'-setup_envs/2-lc$^0/1-0-',2,
                                  [{file,"src/rebar_core.erl"},{line,364}]},
                                 {rebar_core,'-setup_envs/2-lc$^0/1-0-',2,
                                  [{file,"src/rebar_core.erl"},{line,365}]},
                                 {rebar_core,setup_envs,2,
                                  [{file,"src/rebar_core.erl"},{line,364}]}]}}
Alexander
  • 497
  • 3
  • 9
  • 23

1 Answers1

1

I have not the same version of erlang as you (line 154 of re.erl is not the split function) so I cannot finish the analysis. But you can try to understand from where come these weird characters [1055,1050] at the end of the answer from windows to the function os:getenv(). It seems it crash the re:split.

Pascal
  • 13,977
  • 2
  • 24
  • 32
  • The error is in the next row: `Os = [list_to_tuple(re:split(S, "=", [{return, list}, {parts, 2}])) || S <- os:getenv()]`, but in the basho rebar the same string looks like `Os = [list_to_tuple(re:split(S, "=", ReOpts)) || S <- os:getenv()],`. Can the issue be around there? – Alexander Aug 04 '13 at 17:03
  • The line above in basho rebar defines ReOpts as ReOpts = [{return, list}, {parts, 2}, unicode],. The unicode element maybe important, specially dealing with the character I mentioned in my answer. – Pascal Aug 04 '13 at 21:23
  • 1
    It is a correction in the last commit of basho/rebar (61c353dcfdafb87107cc5472709d229c26a8cb6c) – Pascal Aug 09 '13 at 14:30
  • Is there any way to ask you a few questions about the Erlang personally? – Alexander Aug 10 '13 at 10:59
  • It would be with pleasure, but I will have no access to the internet the next 2 weeks. On the other hand you have a chance that, maybe, R. Virding answer to your questions on that forum, and I believe he has a little knowledge on this topic :o) – Pascal Aug 10 '13 at 12:51
  • finally, I have a - very limited - access to internet. You can use the mail in my profile. – Pascal Aug 14 '13 at 19:26