我在安装piqic-erlang时遇到问题。 当我做'make'时,我明白了:
bash-3.2$ make
rebar compile
==> piqic-erlang (compile)
==> piqi-erlang (compile)
set -e; \
for i in piqi_rpc.piqi piqi_tools.piqi; do \
../piqic-erlang/piqic-erlang $i; \
done
escript: exception error: undefined function piqic_erlang:main/1
in function escript:run/2 (escript.erl, line 752)
in call from escript:start/1 (escript.erl, line 276)
in call from init:start_it/1
in call from init:start_em/1
make[1]: *** [piqi_rpc_piqi.erl] Error 127
ERROR: Command [compile] failed!
make: *** [all] Error 1
可能是什么问题?
更新: 感谢您的帮助,但“make”之前的“make deps”不起作用。我仍然得到同样的错误。现在我尝试直接从/ piqi-erlang / priv / bin运行脚本piqic-erlang,它再也找不到'main'函数了:
bash-3.2$ ./piqic-erlang
escript: exception error: undefined function piqic_erlang:main/1
in function erl_eval:local_func/5 (erl_eval.erl, line 544)
in call from escript:interpret/4 (escript.erl, line 781)
in call from escript:start/1 (escript.erl, line 276)
in call from init:start_it/1
in call from init:start_em/1
为什么escript没有看到'main'函数?
答案 0 :(得分:2)
piqic-erlang
未正确编译,因为其src
个erl文件是符号链接,因为它使用的filelib:fold_files/5
并未使用piqi-erlang
; t返回符号链接! (可能是错误introduced in R17.1和fixed in R17.1.2)
作为一种解决方法,您可以手动编译然后重新制作,这里是命令(假设您在cd piqic-erlang; erlc -o ebin src/*.erl; cd ..; make
root中):
{{1}}