<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=utf-8">
<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;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 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;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle19
{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"><span style="color:#1F497D">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks to everyone who responded. I realized that Erlang/OTP package has to be installed on build system to cross compile. I had to dig into ‘configure’ to make things work. It is not clear from INSTALL document.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Mark.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Dmitry Kolesnikov [mailto:dmkolesnikov@gmail.com]
<br>
<b>Sent:</b> Wednesday, April 02, 2014 2:13 PM<br>
<b>To:</b> Stoutchinine, Mark<br>
<b>Cc:</b> erlang-questions@erlang.org<br>
<b>Subject:</b> Re: [erlang-questions] cross compile of Erlang/OTP<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hello,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Just to double check...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Have you used ./otp_build configure \ --xcomp-conf=... and make noboot to build things.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">What environment your are trying to build it and what compiler ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
Best Regards,<o:p></o:p></p>
<div>
<p class="MsoNormal">Dmitry<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">>-|-|-(*><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
On 02 Apr 2014, at 18:54, "Stoutchinine, Mark" <<a href="mailto:Mark.Stoutchinine@imaginecommunications.com">Mark.Stoutchinine@imaginecommunications.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt;-webkit-text-size-adjust: auto">
<div>
<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>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
______________________________________________________________________<br>
This email has been scanned by the Symantec Email Security.cloud service.<br>
For more information please visit <a href="http://www.symanteccloud.com">http://www.symanteccloud.com</a><br>
______________________________________________________________________<o:p></o:p></span></p>
</div>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt;-webkit-text-size-adjust: auto">
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><o:p></o:p></span></p>
</div>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
______________________________________________________________________<br>
This email has been scanned by the Symantec Email Security.cloud service.<br>
For more information please visit <a href="http://www.symanteccloud.com">http://www.symanteccloud.com</a><br>
______________________________________________________________________<o:p></o:p></span></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>