<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello Everyone,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am looking for help with cross compilation. I am following the instruction on how to cross compile Erlang/OTP and it seems worked, I got bin/<TARGET>/. built and there are multiple utilities/apps/executables exist in it:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">>> ls -al<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 176653 Apr 2 11:19 epmd<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 108341 Apr 2 11:19 erlc<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 165065 Apr 2 11:19 erlexec<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 105782 Apr 2 11:19 escript<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 37746 Apr 2 11:19 heart<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 154805 Apr 2 11:19 inet_gethost<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 66273 Apr 2 11:19 run_erl<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 32142 Apr 2 11:19 to_erl<o:p></o:p></p>
<p class="MsoNormal">-rwxrwxr-x 1 mstoutch mstoutch 99598 Apr 2 11:19 typer<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">erlc is definetly cross compiled:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">>> file ./bin/powerpc-none-linux-gnu/erlc<o:p></o:p></p>
<p class="MsoNormal">./bin/powerpc-none-linux-gnu/erlc: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=0x07b32270e1dd4993ea729db6af2e3b42e1024c96, with unknown capability
0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70401, not stripped<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now at later stages when build process is trying to build some applications like asn1, it fails because it is trying to run cross built erlc on host system, which is incorrect – wrong architecture:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">…..<o:p></o:p></p>
<p class="MsoNormal">make[1]: Leaving directory `/home/shares/public/mstoutch/otp_src_R16B03-1/erts'<o:p></o:p></p>
<p class="MsoNormal">cd lib && \<o:p></o:p></p>
<p class="MsoNormal"> ERL_TOP=/home/shares/public/mstoutch/otp_src_R16B03-1 PATH=/home/shares/public/mstoutch/otp_src_R16B03-1/bootstrap/bin:"${PATH}" \<o:p></o:p></p>
<p class="MsoNormal"> make opt SECONDARY_BOOTSTRAP=true<o:p></o:p></p>
<p class="MsoNormal">make[1]: Entering directory `/home/shares/public/mstoutch/otp_src_R16B03-1/lib'<o:p></o:p></p>
<p class="MsoNormal">make[2]: Entering directory `/home/shares/public/mstoutch/otp_src_R16B03-1/lib/asn1/src'<o:p></o:p></p>
<p class="MsoNormal">erlc -W -bbeam -o../ebin +debug_info -I/home/shares/public/mstoutch/otp_src_R16B03-1/lib/stdlib -Werror -Dvsn=\"2.0.4\" asn1ct.erl<o:p></o:p></p>
<p class="MsoNormal">/home/shares/public/mstoutch/otp_src_R16B03-1/bootstrap/bin/erlc: 1: /home/shares/public/mstoutch/otp_src_R16B03-1/bootstrap/bin/erlc: Syntax error: end of file unexpected<o:p></o:p></p>
<p class="MsoNormal">make[2]: *** [../ebin/asn1ct.beam] Error 2<o:p></o:p></p>
<p class="MsoNormal">….<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does anyone know how to turn this off, configure the build not to do that, or maybe I am doing something wrong and it is not supposed to use host erlc? Or I need to rebuild these applications on target? Anyone had this problem before?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank a lot to everyone.<o:p></o:p></p>
<p class="MsoNormal">Mark<o:p></o:p></p>
</div>
<br clear="both">
______________________________________________________________________<BR>
This email has been scanned by the Symantec Email Security.cloud service.<BR>
For more information please visit http://www.symanteccloud.com<BR>
______________________________________________________________________<BR>
</body>
</html>