[Openswan Users] Cross compiling openswan for ARM

satpal parmar systems.satpal at gmail.com
Thu Sep 15 00:06:14 EDT 2011

Thanks for your input Paul. Please find my response below.

On Wed, Sep 14, 2011 at 8:49 PM, Paul Wouters <paul at xelerance.com> wrote:

> On Wed, 14 Sep 2011, satpal parmar wrote:
>  I am trying to cross compile openswan for ARM Board. For that I am
>>  following below steps:
>  1. Cross compiled GMP.
>     c. Created a softlink to libgmp in the toolchain path
> You also need to be able to find the gmp headers. Usually a "make install"
> after cross compile installs those somewhere in your toolchain

Yes. You are right I have not  run make Install. Can you please more
specific about location I should specify while running make install.
Will just running make install after make will sufficient. Any config file

>      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/
> You left out the line from CROSSCOMPILE that adds the include file search
> path, eg:
> NE} -I$PREFIX/arm-elf/inc -L$PREFIX/lib/gcc-lib -DGCC_LINT -DLEAK_DETECTIVE
> -Dli
> nux -D__linux__"
> In this case the gmp.h and other headers was installed in
> $PREFIX/arm-elf/inc
> Yes I do have this setting in  CROSSCOMPILE.sh

${PORTDEFINE} -I$PREFIX/arm-elf/inc -L$PREFIX/lib/gcc-lib -DGCC_LINT
-DLEAK_DETECTIVE -Dlinux -D__linux__"

I have a doubt here. For me I$PREFIX/arm-elf/inc expend to
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 ?

>>                  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
> It needs the gmp.h from the crosscompile, not the system one.
>  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.
> What's missing is the header files for that ARM architecture, which are
> normally installed running "make install" on the cross compiled libgmp.
> Do do need to specify any location or other details while running make
install after make in cross compiling GMP stage?

> Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openswan.org/pipermail/users/attachments/20110915/b0542191/attachment-0001.html 

More information about the Users mailing list