【问题标题】:Can't build rebar on Windows7无法在 Windows 7 上构建钢筋
【发布时间】:2013-08-05 07:44:00
【问题描述】:

我正在尝试构建这个 (https://github.com/dch/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}]}]}}

【问题讨论】:

  • 错误报告可能更合适...

标签: windows erlang rebar


【解决方案1】:

我没有和你一样的erlang版本(re.erl的第154行不是split函数)所以我无法完成分析。但是您可以尝试在从 windows 到函数 os:getenv() 的答案末尾了解这些奇怪的字符 [1055,1050] 是从哪里来的。 re:split 似乎崩溃了。

【讨论】:

  • 错误在下一行:Os = [list_to_tuple(re:split(S, "=", [{return, list}, {parts, 2}])) || S <- os:getenv()],但在 basho 钢筋中,相同的字符串看起来像 Os = [list_to_tuple(re:split(S, "=", ReOpts)) || S <- os:getenv()],。问题是否存在?
  • basho rebar 中的上述行将 ReOpts 定义为 ReOpts = [{return, list}, {parts, 2}, unicode],。 unicode 元素可能很重要,特别是处理我在回答中提到的字符。
  • 这是对 basho/rebar (61c353dcfdafb87107cc5472709d229c26a8cb6c) 上次提交的更正
  • 有什么方法可以亲自问你一些关于 Erlang 的问题吗?
  • 很高兴,但接下来的两周我将无法访问互联网。另一方面,你有机会,也许,R. Virding 在那个论坛上回答你的问题,我相信他对这个话题有一点了解:o)
猜你喜欢
  • 2012-09-17
  • 2013-12-08
  • 2016-08-05
  • 2011-09-16
  • 1970-01-01
  • 1970-01-01
  • 2016-03-23
  • 2016-08-28
  • 2012-06-26
相关资源
最近更新 更多