Hi all;<div><br></div><div>I am trying to cross compile openswan for ARM Board. For that I am following below steps:</div><div><br></div><div>1. Cross compiled GMP. </div><div> a. Wget gmp-4.3.2.tar.gz . Untared.</div>
<div> b. Run ./configure --host=arm-none-linux-gnueabi . I got .libs/libgmp.so</div><div><br></div><div><div> openswan/gmp-4.3.2/.libs$ <b>file libgmp.so</b></div><div> libgmp.so: symbolic link to `libgmp.so.3.5.2'</div>
<div><br></div><div> openswan/gmp-4.3.2/.libs$ <b>file libgmp.so.3.5.2</b></div><div> libgmp.so.3.5.2: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped</div><div><br></div>
<div> c. Created a softlink to libgmp in the toolchain path</div><div><br></div><div> @ubuntu:/usr/local/CodeSourcery/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.3.3$ <b>pwd</b></div><div><br></div><div> /usr/local/CodeSourcery/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.3.3</div>
<div><br></div><div> @ubuntu:/usr/local/CodeSourcery/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.3.3$<b> ls -la libgmp.so</b></div><div><b><br></b></div><div> lrwxrwxrwx 1 root root 69 2011-09-14 16:55 libgmp.so -> /openswan/gmp-4.3.2/.libs/libgmp.so</div>
<div><br></div><div>2. wget <a href="http://www.openswan.org/download/openswan-2.6.33.tar.gz">http://www.openswan.org/download/openswan-2.6.33.tar.gz</a></div><div><br></div><div> a. Modified CROSSCOMPILE.sh as per my toolchain setttings</div>
<div><br></div><div> export PREFIX=/usr/local/CodeSourcery/Sourcery_G++_Lite</div><div> export DESTDIR=/tmp/openswan.arm</div><div> export ARCH=arm</div><div> export CC=$PREFIX/bin/arm-none-linux-gnueabi-gcc</div>
<div> export GCC=$PREFIX/bin/arm-none-linux-gnueabi-gcc</div><div> export LD=$PREFIX/bin/arm-none-linux-gnueabi-ld</div><div> export RANLIB=$PREFIX/bin/arm-none-linux-gnueabi-ranlib</div><div> export AR=$PREFIX/bin/arm-none-linux-gnueabi-ar</div>
<div> export AS=$PREFIX/bin/arm-none-linux-gnueabi-as</div><div> export STRIP=$PREFIX/biin/arm-none-linux-gnueabi-strip</div><div> export LD_LIBRARY_PATH=$PREFIX/lib/gcc/arm-none-linux-gnueabi/4.3.3/</div><div>
<br></div><div> b. Run make programs. I am getting errors.</div><div><br></div><div> In file included from /openswan/openswan-2.6.33/include/certs.h:24,</div><div> from openswan/openswan-2.6.33/lib/libopenswan/id.c:39:</div>
<div>openswan/openswan-2.6.33/include/secrets.h:20:41: error: gmp.h: No such file or directory</div><div>In file included from openswan/openswan-2.6.33/include/certs.h:24,</div><div> from openswan/openswan-2.6.33/lib/libopenswan/id.c:39:</div>
<div>openswan/openswan-2.6.33/include/secrets.h:43: error: expected specifier-qualifier-list before 'MP_INT'</div><div>openswan/openswan-2.6.33/include/secrets.h:54: error: expected specifier-qualifier-list before 'MP_INT'</div>
<div>make[3]: *** [id.o] Error 1</div><div>make[3]: Leaving directory `openswan/openswan-2.6.33/OBJ.linux.arm/lib/libopenswan'</div><div>make[2]: *** [programs] Error 1</div><div>make[2]: Leaving directory `openswan/openswan-2.6.33/OBJ.linux.arm/lib'</div>
<div>make[1]: *** [programs] Error 1</div><div>make[1]: Leaving directory `openswan/openswan-2.6.33/OBJ.linux.arm'</div><div><br></div><div> </div><div>Now from openswan site I got that libgmp is required for openswan compilation. Since I have already crosscomplied and softlinked I am not able to understand what is missing. Do I need any other tools? How to check if my crosscompiled libgmp is working fine? I did tried running make check on libgmp but all 9 test cases were failed. I have little clue how to proceed further. </div>
<div><br></div><div>Can anyone see anything missing here. Any help in this regard is highly appreciated.</div><div><br></div><div>-SP </div></div>