Hi Paul <div><br></div><div>I did tried running make install after cross compiling in gmp . But it did't helped. I saw one gmp.h file in in gmp directory and I manage to compile the openswan after included the path of it in Crosscompile.sh. Will test the output and update with results.</div>
<div><br></div><div>Thanks</div><div>_SP<br><div><br><div class="gmail_quote">On Thu, Sep 15, 2011 at 9:36 AM, satpal parmar <span dir="ltr"><<a href="mailto:systems.satpal@gmail.com">systems.satpal@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks for your input Paul. Please find my response below. <br><br><div class="gmail_quote"><div class="im">On Wed, Sep 14, 2011 at 8:49 PM, Paul Wouters <span dir="ltr"><<a href="mailto:paul@xelerance.com" target="_blank">paul@xelerance.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Wed, 14 Sep 2011, satpal parmar wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to cross compile openswan for ARM Board. For that I am<br>
following below steps:<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1. Cross compiled GMP. <br>
</blockquote>
<br>
</div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
c. Created a softlink to libgmp in the toolchain path<br>
</blockquote>
<br></div>
You also need to be able to find the gmp headers. Usually a "make install"<br>
after cross compile installs those somewhere in your toolchain</blockquote><div> </div></div><div><font color="#3366FF">Yes. You are right I have not run make Install. Can you please more specific about location I should specify while running make install.</font></div>
<div><font color="#3366FF">Will just running make install after make will sufficient. Any config file changes? </font></div><div class="im"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
a. Modified CROSSCOMPILE.sh as per my toolchain setttings<br>
<br>
export PREFIX=/usr/local/<u></u>CodeSourcery/Sourcery_G++_Lite<br>
export DESTDIR=/tmp/openswan.arm<br>
export ARCH=arm<br>
export CC=$PREFIX/bin/arm-none-linux-<u></u>gnueabi-gcc<br>
export GCC=$PREFIX/bin/arm-none-<u></u>linux-gnueabi-gcc<br>
export LD=$PREFIX/bin/arm-none-linux-<u></u>gnueabi-ld<br>
export RANLIB=$PREFIX/bin/arm-none-<u></u>linux-gnueabi-ranlib<br>
export AR=$PREFIX/bin/arm-none-linux-<u></u>gnueabi-ar<br>
export AS=$PREFIX/bin/arm-none-linux-<u></u>gnueabi-as<br>
export STRIP=$PREFIX/biin/arm-none-<u></u>linux-gnueabi-strip<br>
export<br>
LD_LIBRARY_PATH=$PREFIX/lib/<u></u>gcc/arm-none-linux-gnueabi/4.<u></u>3.3/<br>
</blockquote>
<br></div>
You left out the line from CROSSCOMPILE that adds the include file search<br>
path, eg:<br>
<br>
export USERCOMPILE="-Wl,-elf2flt -DCOMPILER_HAS_NO_PRINTF_LIKE -O3 -g ${PORTDEFI<br>
NE} -I$PREFIX/arm-elf/inc -L$PREFIX/lib/gcc-lib -DGCC_LINT -DLEAK_DETECTIVE -Dli<br>
nux -D__linux__"<br>
<br>
In this case the gmp.h and other headers was installed in $PREFIX/arm-elf/inc<div><br></div></blockquote></div><div><font color="#3366FF">Yes I do have this setting in CROSSCOMPILE.sh </font></div>
<div><font color="#3366FF"><br></font></div><div><div><font color="#3366FF">export USERCOMPILE="-Wl,-elf2flt -DCOMPILER_HAS_NO_PRINTF_LIKE -O3 -g ${PORTDEFINE} -I$PREFIX/arm-elf/inc -L$PREFIX/lib/gcc-lib -DGCC_LINT -DLEAK_DETECTIVE -Dlinux -D__linux__"</font></div>
</div><div><font color="#3366FF"><br></font></div><div><font color="#3366FF">I have a doubt here. For me I$PREFIX/arm-elf/inc expend to /usr/local/<u></u>CodeSourcery/Sourcery_G++_Lite/arm-elf/inc but I do not any arm-elf/inc.Is this something created after I do make install in GMP Or I should modify this to -I$PREFIX/arm-none-linux-gnueabi/include ?</font> </div>
<div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
from openswan/openswan-2.6.33/lib/<u></u>libopenswan/id.c:39:<br>
openswan/openswan-2.6.33/<u></u>include/secrets.h:20:41: error: gmp.h: No such<br>
file or directory<br>
</blockquote>
<br></div>
It needs the gmp.h from the crosscompile, not the system one.<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Now from openswan site I got that libgmp is required for openswan<br>
compilation. Since I have already crosscomplied and softlinked I am not<br>
able to understand what is missing.<br>
</blockquote>
<br></div>
What's missing is the header files for that ARM architecture, which are<br>
normally installed running "make install" on the cross compiled libgmp.<br><font color="#888888">
<br></font></blockquote></div><div><font color="#3366FF">Do do need to specify any location or other details while running make install after make in cross compiling GMP stage? </font></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font color="#888888">
Paul<br>
</font></blockquote></div><br>
</blockquote></div><br></div></div>