[erlang-questions] HiPE on ARM Build Issue
Sat Apr 14 10:12:47 CEST 2012
On 04/14/2012 09:24 AM, Andrew Wiley wrote:
> On Sat, Apr 14, 2012 at 12:43 AM, Andrew Wiley <
> <mailto:>> wrote:
> I'm trying to get Erlang with HiPE to build on an ARMv7 box (a
> Trimslice - http://trimslice.com/ <http://trimslice.com/web/> ), and
> I'm getting an undefined reference to am_arm. I'm building R15B01,
> and the build commands I'm using are:
> ./otp_build autoconf
> ./configure --enable-native-libs --enable-hipe
> --prefix=/usr --enable-smp-support --enable-threads
> ./otp_build boot
> The build failure looks like this:
> It looks like am_x86 is declared in
> erts/emulator/armv7l-unknown-linux-gnu/erl_atom_table.h; should
> am_arm be in there as well?
> I'm not sure what else would be helpful to diagnose this, but here's
> `uname -a`:
> Linux tseng 3.2.1-1-ARCH #1 SMP PREEMPT Sun Jan 22 06:37:13 UTC 2012
> armv7l ARMv7 Processor rev 0 (v7l) trimslice GNU/Linux
> Just saw
> http://erlang.org/pipermail/erlang-bugs/2006-December/000268.html and it
> looks like I'm having the same issue. Are there any plans to try to fix
> configure.in <http://configure.in> so that ARM builds like this either
> work or produce an error?
In the HiPE team we would very much like to support the ARM architecture
but the problem these days - for quite some time actually - is that we
do not have access to any machine with an ARM processor. It's very
painful to be testing ARM using QEMU, esp. all sorts of different ARMs
that exist these days. Hence, occasionally code tends to rot or, as in
this case which involves a newer ARMv7, code has never been tested on
(I do not know what sort of access to ARM machines the Erlang/OTP team
at Ericsson has, but I suspect that they do not have access to all
possible ARMs either.)
In this particular case, I would recommend that you extend the following
lines in erts/configure.in
with the line that corresponds to your newer armv7 and test to see what
happens. If all goes well, please submit a patch using git.
Also, since you are on an unexplored territory, I would recommend to
build Erlang/OTP in two steps. First do:
./configure --enable-hipe ...
which will test if Erlang/OTP can be built with HiPE support, and only
if that works do:
make clean // or start from a fresh copy, for extra safety
./configure --enable-hipe ... --enable-native-libs
which will additionally test that the HiPE compiler generates correct
native code and is able to self-compile itself (as well as many of the
Erlang/OTP libraries: currently kernel, stdlib, compiler, syntax_tools,
hipe, dialyzer, and typer).
In any case, please report your findings here.
PS. We welcome support, for example, donations of ARM-based machines
that we can be using to test the HiPE compiler or its newer LLVM-based
back-end (see http://erllvm.softlab.ntua.gr/) more regularly. Similar
with other exotic architectures that people these days care about.
Minimally, if you want native code for some configuration other than x86
and x86_64-based machines, give us some form of remote access to it.
More information about the erlang-questions