[erlang-bugs] OTP-18.0 --enable-native-libs build failed on Ubuntu Server 14.04 LTS (HVM) and Amazon Linux AMI 2015.03 (HVM)
Bruno Matos Tavares
tavaresbm@REDACTED
Thu Aug 13 13:36:39 CEST 2015
Hi,
I’m trying to build Erlang 18.0 from the official tarball with --enable-native-libs and it fails (log at the bottom). After discussing the issue on erlang-questions (https://groups.google.com/forum/#!topic/erlang-programming/OnMkdZpml8E) --enable-native-libs seems not to be working at all on Ubuntu Server 14.04 LTS (HVM) and Amazon Linux AMI 2015.03 (HVM) (the ones I was able to test) but with a workaround only the HiPE applications gets the native libs treatment.
* without workaround
./configure --prefix=/usr/local \
--disable-debug \
--enable-silent-rules \
--enable-m64-build \
--enable-threads \
--enable-smp-support \
--enable-kernel-poll \
--enable-hipe \
--enable-native-libs \
--with-ssl=/usr/bin \
--without-docs \
--without-wx \
--without-javac \
—without-odbc
make
make[2]: Entering directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib/hipe'
Makefile:72: warning: overriding recipe for target `clean'
/home/ec2-user/tmp/tmp_1/otp_src_18.0/make/otp_subdir.mk:29: warning: ignoring old recipe for target `clean'
=== Entering application hipe
make[3]: Entering directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib/hipe/rtl'
ERLC ../ebin/hipe_rtl.beam
hipe_rtl.erl: internal error in native_compile;
crash reason: undef
in function hipe:compile/4
called as hipe:compile(hipe_rtl,[],
<<70,…,0>>,
[])
in call from compile:native_compile_1/1 (compile.erl, line 1361)
in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 295)
in call from compile:fold_comp/3 (compile.erl, line 321)
in call from compile:internal_comp/4 (compile.erl, line 305)
in call from compile:'-do_compile/2-anonymous-0-'/2 (compile.erl, line 155)
make[3]: *** [../ebin/hipe_rtl.beam] Error 1
make[3]: Leaving directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib/hipe/rtl'
make[2]: *** [opt] Error 2
make[2]: Leaving directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib/hipe'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib'
make: *** [libs] Error 2
* with the workaround
Drop —enable-m64-build and add CFLAGS=‘-O2 -m64'
CFLAGS=‘-O2 -m64' ./configure --prefix=/usr/local \
--disable-debug \
--enable-silent-rules \
--enable-threads \
--enable-smp-support \
--enable-kernel-poll \
--enable-hipe \
--enable-native-libs \
--with-ssl=/usr/bin \
--without-docs \
--without-wx \
--without-javac \
—without-odbc
1> code:is_loaded(gen_server).
{file,"/opt/erlang//lib/stdlib-2.5/ebin/gen_server.beam"}
2> code:is_loaded(gen_server).
{file,”/opt/erlang//lib/stdlib-2.5/ebin/gen_server.beam”}
3> gen_server:module_info(native).
false
Thank you,
Bruno.
More information about the erlang-bugs
mailing list