[Openswan Users] Cross compiling openswan for ARM

satpal parmar systems.satpal at gmail.com
Wed Sep 14 09:53:58 EDT 2011


Hi all;

I am trying to cross compile openswan for ARM Board. For that I am
 following below steps:

1. Cross compiled GMP.
    a. Wget gmp-4.3.2.tar.gz . Untared.
    b. Run ./configure --host=arm-none-linux-gnueabi . I got .libs/libgmp.so

       openswan/gmp-4.3.2/.libs$ *file libgmp.so*
       libgmp.so: symbolic link to `libgmp.so.3.5.2'

       openswan/gmp-4.3.2/.libs$ *file libgmp.so.3.5.2*
       libgmp.so.3.5.2: ELF 32-bit LSB shared object, ARM, version 1 (SYSV),
dynamically linked, not stripped

   c. Created a softlink to libgmp in the toolchain path


  @ubuntu:/usr/local/CodeSourcery/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.3.3$
*pwd*


 /usr/local/CodeSourcery/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.3.3


 @ubuntu:/usr/local/CodeSourcery/Sourcery_G++_Lite/lib/gcc/arm-none-linux-gnueabi/4.3.3$
* ls -la libgmp.so*
*
*
         lrwxrwxrwx 1 root root 69 2011-09-14 16:55 libgmp.so ->
/openswan/gmp-4.3.2/.libs/libgmp.so

2.  wget http://www.openswan.org/download/openswan-2.6.33.tar.gz

    a. Modified CROSSCOMPILE.sh as per my toolchain setttings

      export PREFIX=/usr/local/CodeSourcery/Sourcery_G++_Lite
      export DESTDIR=/tmp/openswan.arm
      export ARCH=arm
      export CC=$PREFIX/bin/arm-none-linux-gnueabi-gcc
      export GCC=$PREFIX/bin/arm-none-linux-gnueabi-gcc
      export LD=$PREFIX/bin/arm-none-linux-gnueabi-ld
      export RANLIB=$PREFIX/bin/arm-none-linux-gnueabi-ranlib
      export AR=$PREFIX/bin/arm-none-linux-gnueabi-ar
      export AS=$PREFIX/bin/arm-none-linux-gnueabi-as
      export STRIP=$PREFIX/biin/arm-none-linux-gnueabi-strip
      export LD_LIBRARY_PATH=$PREFIX/lib/gcc/arm-none-linux-gnueabi/4.3.3/

    b. Run make programs. I am getting errors.

         In file included from /openswan/openswan-2.6.33/include/certs.h:24,
                 from openswan/openswan-2.6.33/lib/libopenswan/id.c:39:
openswan/openswan-2.6.33/include/secrets.h:20:41: error: gmp.h: No such file
or directory
In file included from openswan/openswan-2.6.33/include/certs.h:24,
                 from openswan/openswan-2.6.33/lib/libopenswan/id.c:39:
openswan/openswan-2.6.33/include/secrets.h:43: error: expected
specifier-qualifier-list before 'MP_INT'
openswan/openswan-2.6.33/include/secrets.h:54: error: expected
specifier-qualifier-list before 'MP_INT'
make[3]: *** [id.o] Error 1
make[3]: Leaving directory
`openswan/openswan-2.6.33/OBJ.linux.arm/lib/libopenswan'
make[2]: *** [programs] Error 1
make[2]: Leaving directory `openswan/openswan-2.6.33/OBJ.linux.arm/lib'
make[1]: *** [programs] Error 1
make[1]: Leaving directory `openswan/openswan-2.6.33/OBJ.linux.arm'


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.

Can anyone see anything missing here. Any help in this regard is highly
appreciated.

-SP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openswan.org/pipermail/users/attachments/20110914/bb970adc/attachment-0001.html 


More information about the Users mailing list