<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I’ve tested on Ubuntu Server 14.04 LTS (HVM) (Amazon EC2) and I have the same result. It feels is a bug. I’ll send it to the bug mailing list.</div><div class=""><br class=""></div><div class="">Thank you,</div><div class="">Bruno. </div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 13 Aug 2015, at 10:05, Mikael Pettersson <<a href="mailto:mikpelinux@gmail.com" class="">mikpelinux@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Bruno Matos Tavares writes:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Hi Mikael,<br class=""><br class="">I’ve tried 1. and 2. and it compiles but not with native libs.<br class=""><br class="">1> code:is_loaded(gen_server).<br class="">{file,"/opt/erlang//lib/stdlib-2.5/ebin/gen_server.beam"}<br class="">2> code:is_loaded(gen_server).<br class="">{file,”/opt/erlang//lib/stdlib-2.5/ebin/gen_server.beam"}<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">The .beam file also contains the native code, so this is expected.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Try calling Mod:module_info() or Mod:module_info(native) instead.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">However, trying that I see that only the HiPE application gets the</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">native libs treatment, which may be what dialyzer users want but may</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">not be enough for other users.  You could report that as a bug in the</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">erlang-bugs mailing list.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">/Mikael</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">Thank you,<br class="">Bruno.<br class=""><br class=""><br class=""><blockquote type="cite" class="">On 11 Aug 2015, at 21:00, Mikael Pettersson <<a href="mailto:mikpelinux@gmail.com" class="">mikpelinux@gmail.com</a>> wrote:<br class=""><br class="">Bruno Matos Tavares writes:<br class=""><blockquote type="cite" class="">Hi,<br class=""><br class="">I'm trying to build Erlang on Amazon Linux AMI 2015.03 (HVM) (c3.4xlarge) without success.<span class="Apple-converted-space"> </span><br class=""><br class="">After some research I've bumped into this post <a href="https://groups.google.com/forum/#!searchin/erlang-programming/enable-native-libs/erlang-programming/qFJmWtUQHuA/EBHC750-4UYJ" class="">https://groups.google.com/forum/#!searchin/erlang-programming/enable-native-libs/erlang-programming/qFJmWtUQHuA/EBHC750-4UYJ</a> <<a href="https://groups.google.com/forum/#!searchin/erlang-programming/enable-native-libs/erlang-programming/qFJmWtUQHuA/EBHC750-4UYJ" class="">https://groups.google.com/forum/#!searchin/erlang-programming/enable-native-libs/erlang-programming/qFJmWtUQHuA/EBHC750-4UYJ</a>> but the recipe doesn't work either.  <br class=""><br class="">./configure --prefix=/usr/local \<br class="">--disable-debug \<br class="">--enable-silent-rules \<br class="">--enable-m64-build \<br class="">--enable-threads \<br class="">--enable-smp-support \<br class="">--enable-kernel-poll \<br class="">--enable-hipe \<br class="">--enable-native-libs \<br class="">--with-ssl=/usr/bin \<br class="">--without-docs \<br class="">--without-wx \<br class="">--without-javac \<br class="">--without-odbc<br class=""><br class=""><br class="">make[2]: Entering directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib/hipe'<br class="">Makefile:72: warning: overriding recipe for target `clean'<br class="">/home/ec2-user/tmp/tmp_1/otp_src_18.0/make/otp_subdir.mk:29: warning: ignoring old recipe for target `clean'<br class="">=== Entering application hipe<br class="">make[3]: Entering directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib/hipe/rtl'<br class="">ERLC   ../ebin/hipe_rtl.beam<br class="">hipe_rtl.erl: internal error in native_compile;<br class="">crash reason: undef<br class=""><br class="">in function  hipe:compile/4<br class="">   called as hipe:compile(hipe_rtl,[],<br class=""><<70,79,82,49,0,0,235,184,66,69,65,77,65,116,111,109,0,0,12,228,0,0,1,36,8,<br class=""> 104,105,112,101,95,114,116,108,6,109,107,95,114,116,108,3,114,116,108,7,114,<br class=""> 116,108,95,102,117,110,10,114,116,108,95,112,97,114,97,109,115,14,114,116,<br class=""> 108,95,105,115,95,99,108,111,115,117,114,101,11,114,116,108,95,105,115,95,<br class=""> 108,101,97,102,8,114,116,108,95,99,111,100,101,15,114,116,108,95,99,111,100,<br class=""> 101,95,117,112,100,97,116,101,6,101,114,108,97,110,103,10,115,101,116,101,<br class=""> 108,101,109,101,110,116,5,101,114,114,111,114,8,114,116,108,95,100,97,116, [..]<br class="">57,201,58,201,59,201,60,201,69,201,70,201,71,201,72,201,73,201,74,201,75,<br class=""> 201,76,201,77,201,142,201,117,201,87,201,199,201,202,201,207,201,208,201,<br class=""> 211,201,213,201,214,201,215,201,217,201,218,201,219,201,227,201,228,201,225,<br class=""> 201,232,201,235,201,236,201,240,201,242,201,247,233,2,233,6,233,10,233,12,<br class=""> 233,22,233,23,233,25,233,28,233,30,41,199,0,0>>,<br class="">[])<br class="">in call from compile:native_compile_1/1 (compile.erl, line 1361)<br class="">in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 295)<br class="">in call from compile:fold_comp/3 (compile.erl, line 321)<br class="">in call from compile:internal_comp/4 (compile.erl, line 305)<br class="">in call from compile:'-do_compile/2-anonymous-0-'/2 (compile.erl, line 155)<br class="">make[3]: *** [../ebin/hipe_rtl.beam] Error 1<br class="">make[3]: Leaving directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib/hipe/rtl'<br class="">make[2]: *** [opt] Error 2<br class="">make[2]: Leaving directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib/hipe'<br class="">make[1]: *** [opt] Error 2<br class="">make[1]: Leaving directory `/home/ec2-user/tmp/tmp_1/otp_src_18.0/lib'<br class="">make: *** [libs] Error 2<br class=""><br class="">However when I just use `enable-native-libs' it does `make'.<br class=""><br class="">Is it something wrong with my config or some limitation on AWS Linux that I'm not aware of.<br class=""><br class="">Thank you,<br class="">Bruno.<br class=""><br class="">full log (configure + make):<br class="">[ tmp_1]$ cat output.log<br class="">Ignoring the --cache-file argument since it can cause the system to be erroneously configured<br class="">Disabling caching<br class="">checking build system type... x86_64-unknown-linux-gnu<br class="">checking host system type... x86_64-unknown-linux-gnu<br class="">checking for gcc... gcc<br class=""></blockquote><br class="">I can reproduce this error on Fedora 20 Linux / x86_64: it's triggered by the --enable-m64-build<br class="">option, which is totally weird:<br class=""><br class="">- gcc on x86_64-linux defaults to -m64 (except on obscure systems defaulting to -x32)<br class="">so the -m64 added by --enable-m64-build shouldn't have any effect, but it does; and<br class=""><br class="">- building with a fake gcc script that prepends -m64 to the command line arguments doesn't<br class="">cause this (or any other) error.<br class=""><br class="">I tried comparing the bin/ and erts/ directories from builds with and without --enable-m64-build,<br class="">but every single object file diffed, and numerous generated files also diffed (like symbolic<br class="">constants being listed in different order and with different values).<br class=""><br class="">Anyway, there are three easy workarounds:<br class=""><br class="">1. Drop the --enable-m64-build option, it's unnecessary on normal systems.<br class="">2. ./configure without the option but with CFLAGS='-O2 -m64' in the environment<br class="">3. adjust PATH to point to a 'gcc' script that contains<br class="">==snip==<br class="">#!/bin/sh<br class="">exec /usr/bin/gcc -m64 "@*"<br class="">==snip==<br class="">(replace /usr/bin/ if needed) then ./configure without the option and make.<br class=""><br class="">/Mikael<br class=""></blockquote></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">--<span class="Apple-converted-space"> </span></span></div></blockquote></div><br class=""></body></html>