<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hello all,</div>
<div>&nbsp;</div>
<div>I am a first time user of OKL4 &amp; OK Linux and have been able to successfully compile the latest OK Linux &amp; OKL4 to run on the gumstix environment (via skyeye). I am now trying to compile &amp; run a program in addition to the default OK Linux setup (targeting
the gumstix architecture). I have followed the steps in wiki article &#8220;Tutorial: Develop an OK Linux Application&#8221; (<a href="http://wiki.ok-labs.com/DevelopOKLinuxApp">http://wiki.ok-labs.com/DevelopOKLinuxApp</a>) with one change; my build command specified
&#8216;machine=gumstix&#8217;.</div>
<div>&nbsp;</div>
<div>Everything compiled okay however when I execute &#8216;hello&#8217; I get the following error: /bin/hello: 1: Syntax error: &quot;(&quot; unexpected.</div>
<div>Furthermore I have tried executing the compiled hello program on my laptop&#8217;s native environment (Ubuntu 8.04 x86) and it actually worked. This leads me to think that the hello program is not being cross compiled and instead being compiled for my native
system.</div>
<div>&nbsp;</div>
<div>I tried to figure out how to properly change the SConscript and/or Makefiles to support cross-compiling with the ARM toolchain however I could not.</div>
<div>&nbsp;</div>
<div>Anyone have any thoughts or hints?</div>
<div>&nbsp;</div>
<div>Thank you,</div>
<div> Kevin</div>
<div>&nbsp;</div>
<div>Source of Make and SConscript:</div>
<div><font face="Courier New, monospace" size="2">&nbsp;</font></div>
<div><font face="Courier New, monospace" size="2"># cat Makefile</font></div>
<div><font face="Courier New, monospace" size="2">all: hello</font></div>
<div><font face="Courier New, monospace" size="2">install:</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; install hello $(PREFIX)/bin</font></div>
<div>&nbsp;</div>
<div><font face="Courier New, monospace" size="2">#cat linux/apps/hello/SConscript</font></div>
<div><font face="Courier New, monospace" size="2">Import(&quot;*&quot;)</font></div>
<div><font face="Courier New, monospace" size="2">import os</font></div>
<div><font face="Courier New, monospace" size="2">build_dir = Dir(env.builddir &#43; &quot;/hello&quot;).abspath</font></div>
<div><font face="Courier New, monospace" size="2">inst_dir = Dir(env.builddir &#43; &quot;/install&quot;).abspath</font></div>
<div><font face="Courier New, monospace" size="2">def b(file_name):</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp; return os.path.join(build_dir, file_name)</font></div>
<div><font face="Courier New, monospace" size="2">def i(file_name):</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp; return os.path.join(inst_dir, file_name)</font></div>
<div><font face="Courier New, monospace" size="2">env.scons_env[&quot;MAKE&quot;] = &quot;make&quot;</font></div>
<div><font face="Courier New, monospace" size="2">hello = env.Command(b(&quot;hello&quot;),</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [] ,</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;PREFIX=%s ZLIB=no $MAKE -j %d -C linux/apps/hello&quot;</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %(inst_dir, GetOption('num_jobs')))</font></div>
<div><font face="Courier New, monospace" size="2">hello_install = env.Command(i(&quot;bin/hello&quot;),</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hello,</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;PREFIX=%s $MAKE -C linux/apps/hello install&quot;</font></div>
<div><font face="Courier New, monospace" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; % (inst_dir))</font></div>
<div><font face="Courier New, monospace" size="2">Return(&quot;hello_install&quot;)</font></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</font>
</body>
</html>