Closed glanotte closed 11 years ago
Same problem here.
› brew install elixir
==> Downloading https://github.com/elixir-lang/elixir/archive/v0.9.0.tar.gz
######################################################################## 100.0%
==> make
{rebar_core,process_dir,4,
[{file,"src/rebar_core.erl"},{line,130}]},
{rebar_core,process_commands,2,
[{file,"src/rebar_core.erl"},{line,83}]}]}}
make: *** [erlang] Error 1
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
Hello!
I think this is a bug in rebar. It was fixed some time ago but it is weird that is seems to be back. It usually happens when the PROMPT or another shell variable contains a utf-8 character.
@gianotta could you please try the following:
"PROMPT=hello" brew install elixir
In case it works, please paste your prompt here, so we can give it a try too:
echo $PROMPT
Wow, thank you so much, I cannot believe that worked. My prompt is heavily customized with a UTF-8 character.
$(machine_prefix)$(git_status)%{%(?.32.31)m%}✝%{%}
Thank you so much! I will let you close this or keep it open if you want to track it further.
@gianotte I will leave it open. We have fixed this issue a long time ago, I am surprised it still happens. :S
Ok, I can't reproduce the issue. I have updated rebar hoping that it will fix it. If you see it again, please let me know! :D @SaitoWu if it still doesn't work for you, let us know too!
Hey @josevalim
I tried to install elixir v0.9.1 and run into the same issue:
brew install elixir
==> Downloading https://github.com/elixir-lang/elixir/archive/v0.9.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/elixir-0.9.1.tar.gz
==> make
{rebar_core,'-setup_envs/2-fun-0-',2,[]},
{lists,foldl,3,
[{file,"lists.erl"},{line,1248}]},
{rebar_core,process_dir0,6,[]}]}}
make: *** [erlang] Error 1
And here my hell of a prompt => %{%}%{%}%{%}%1~%{%} %{%}$(prompt_wunjo_scm_branch)%{%}%{%}%{%}
I just thought I would be good to know that it still fail with this kind of a sick prompt. ;)
cheers
Problems here too:
elixir(master)
$ make
Uncaught error in rebar_core: {'EXIT',
{badarg,
[{re,split,
[[82,80,83,49,61,37,40,63,46,46,37,123,27,
91,51,56,59,53,59,49,54,48,109,37,125,37,
63,32,8629,41,37,123,27,91,48,48,109,37,
125],
"=",
[{return,list},{parts,2}]],
[{file,"re.erl"},{line,154}]},
{rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
1,[]},
{rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
1,[]},
{rebar_port_compiler,os_env,0,[]},
{rebar_port_compiler,setup_env,2,[]},
{rebar_core,'-setup_envs/2-fun-0-',2,[]},
{lists,foldl,3,
[{file,"lists.erl"},{line,1248}]},
{rebar_core,process_dir0,6,[]}]}}
make: *** [erlang] Error 1
$ echo $PROMPT
%{%}%~$(git_prompt_info)
$FG[046]$%{%}
$ PROMPT=hello brew install elixir 127 ↵
==> Downloading https://github.com/elixir-lang/elixir/archive/v0.9.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/elixir-0.9.1.tar.gz
==> make
{rebar_core,'-setup_envs/2-fun-0-',2,[]},
{lists,foldl,3,
[{file,"lists.erl"},{line,1248}]},
{rebar_core,process_dir0,6,[]}]}}
make: *** [erlang] Error 1
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
I found the problem.. I had installed the erlang with sudo
and tried to install elixir with my user. When I fixed erlang permissions I'd install elixir successfully. :smiley:
What specific permissions did you fix? I'm getting the same error and didn't install erlang with sudo. Just installed it through brew install erlang-r16
.
EDIT: (This to be more specific)
bash-3.2$ erl
Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
bash-3.2$ brew install elixir --verbose
==> Downloading https://github.com/elixir-lang/elixir/archive/v0.9.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/elixir-0.9.3.tar.gz
tar xf /Library/Caches/Homebrew/elixir-0.9.3.tar.gz
==> make
make
Uncaught error in rebar_core: {'EXIT',
{badarg,
[{re,split,
[[102,105,115,104,95,112,114,111,109,112,
116,95,103,105,116,95,115,116,97,116,117,
115,95,99,111,112,105,101,100,61,8658],
"=",
[{return,list},{parts,2}]],
[{file,"re.erl"},{line,154}]},
{rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
1,[]},
{rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
1,[]},
{rebar_port_compiler,os_env,0,[]},
{rebar_port_compiler,setup_env,2,[]},
{rebar_core,'-setup_envs/2-fun-0-',2,[]},
{lists,foldl,3,
[{file,"lists.erl"},{line,1248}]},
{rebar_core,process_dir0,6,[]}]}}
make: *** [erlang] Error 1
@terlar Have you tried the prompt solution mentioned above?
"PROMPT=hello" brew install elixir
Which shell are you running? Do you mean: PROMPT=hello brew install elixir
I have tried that and it makes no difference. Also my bash is zero-configured, so no fancy prompt going on.
Interesting. Because the failure that you see right now happens when rebar is trying to handle your environment variables. If you type export
in your shell, can you see any "weird" environment variable with unicode characters in it?
Okay, with this information I solved it.
I'm running fish-shell
but started bash
to just do this operation, and it had exported some variables with unicode characters. This was easily identifiable running export
and I just unset
these variables and it all went fine.
Thank you!
@terlar sorry, I don't know why but when I wrote that it was working. However when I read your message I tryed again and doen't work.With @josevalim solution works here too.
I also saw this issue with Elixir 0.9.3; my prompt does contain a unicode character (➜), and installing with PROMPT=hello
seems to resolve it.
heads up that this appears fully resolved in 0.10.0, thanks!
I am attempting to install on osx mountain lion. I first attempted through homebrew but received an error. I did then attempted to build from source.
When I run
rake test
I receive the following outputMy apologies if this is something simple, I could not find any information on how to troubleshoot this.
I did install erlang-r16 via homebrew prior to install.