【发布时间】:2017-01-23 11:45:46
【问题描述】:
我最近在 Virtualbox vm 上安装了 Ubuntu 16.04 Server。之后我想使用以下脚本安装 erlang:
#!/bin/sh
DESTDIR="$HOME/workspace/erlang"
ACTIVATE=". $DESTDIR/activate"
KERL_CONFIGURE_DISABLE_APPLICATIONS="odbc"
KERL_CONFIGURE_OPTIONS="--enable-dirty-schedulers --enable-hipe --with-openssl"
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod a+x kerl
./kerl update releases
mkdir -p "$DESTDIR"
./kerl build 19.0 erlang.19.0.dirty_sched.ssl
./kerl install erlang.19.0.dirty_sched.ssl "$DESTDIR"
echo "$ACTIVATE" >> "$HOME/.bashrc"
"$ACTIVATE"
脚本运行良好,但即使我明确启用了 hipe,erlang vm 也会在没有 hipe 支持的情况下启动:
$ erl
Erlang/OTP 19 [erts-8.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [kernel-poll:false]
Eshell V8.0 (abort with ^G)
1>
我尝试在 kerl 构建目录中手动 ./configure 和 make otp,并且似乎启用了 hipe 支持。但是,手动构建仍然存在相同的问题:
~/.kerl/builds/erlang.19.0.dirty_sched.ssl/otp_src_19.0/bin$ ./erl
Erlang/OTP 19 [erts-8.0] [source] [64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]
Eshell V8.0 (abort with ^G)
1>
我在物理 Ubuntu 主机上使用相同的设置,并且 hipe 可以无缝工作,所以我开始怀疑这是否与这台机器是虚拟化的事实有关:hipe 是否需要任何 cpu 功能?我错过了什么?
【问题讨论】:
-
您是否安装了 GNU
m4?尝试运行sudo apt-get install m4并重新安装。 -
非常感谢,这就是问题所在!你能描述一下hipe需要m4做什么吗?添加答案,以便我接受!
-
顺便说一句。 github.com/erlang/otp/wiki/Installation 没有将 m4 列为依赖项,但无论如何它似乎已经过时了。应该看github.com/erlang/otp/blob/maint/HOWTO/INSTALL.md。
标签: ubuntu erlang virtualbox hipe kerl