<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3750" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>As part of my
internship I am trying to build strongswan on Android
2.2.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>I have followed
these steps using the special HOWTO for android provided on the strongswan
website:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>-I have downloaded
the android 2.2.1 sources using repo</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>-I have built the
sources (without strongswan) using the arm-eabi-gcc cross-compiler provided by
the toolchain:</SPAN></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=325464116-21032011> </SPAN><SPAN
class=325464116-21032011>cd
/home/antoine/android-2.2.1</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011> .
build/envsetup.sh<BR> lunch
1</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011>
make</SPAN></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><SPAN
class=325464116-21032011></SPAN></FONT></FONT> </DIV>
<DIV><SPAN class=325464116-21032011><SPAN class=152011509-22032011><FONT
face=Arial size=2>-I have recovered the sources of the android-goldfish-2.6.29
branch of the kernel common project. Then I enabled the missing modules and
built the kernel.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=325464116-21032011><SPAN class=152011509-22032011><FONT
face=Arial size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=325464116-21032011><SPAN
class=152011509-22032011></SPAN></SPAN><FONT face=Arial size=2><SPAN
class=325464116-21032011>-Then I used droid-gcc to build the vstr library
adjusting DROID_ROOT to my concerned directory
(/home/antoine/android-2.2.1)</SPAN></FONT></DIV>
<DIV><SPAN class=325464116-21032011><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT></SPAN> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>-I have donwloaded
the last strongswan tarball (strongswan-4.5.1.tar.bz2) on the website and
extracted it in my DROID_ROOT/external </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>-Then when I try to
re-build the android source tree </SPAN></FONT><SPAN
class=325464116-21032011></SPAN></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011> cd
/home/antoine/android-2.2.1</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011>
make</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011><U>I get this
error:</U></SPAN></FONT></DIV><SPAN class=325464116-21032011>
<DIV><BR><FONT face=Arial
size=2>external/strongswan-4.5.1/src/libstrongswan/settings.c:23:18: error:
glob.h: No such file or
directory<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c: In function
'parse_files':<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:961:
error: 'glob_t' undeclared (first use in this
function)<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:961: error:
(Each undeclared identifier is reported only
once<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:961: error: for
each function it appears
in.)<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:961: error:
expected ';' before
'buf'<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:997: warning:
implicit declaration of function
'glob'<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:997: error:
'GLOB_ERR' undeclared (first use in this
function)<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:997: error:
'buf' undeclared (first use in this
function)<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:998: error:
'GLOB_NOMATCH' undeclared (first use in this
function)<BR>external/strongswan-4.5.1/src/libstrongswan/settings.c:1018:
warning: implicit declaration of function 'globfree'<BR>make: ***
[out/target/product/generic/obj/SHARED_LIBRARIES/libstrongswan_intermediates/settings.o]
Erreur</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>The compiler doesn't
find the glob.h file. Indeed this file is part of the glibc library of my linux
host system but is not present in the libc for android, provided in
DROID_ROOT/bionic. Android seems to have a partial support of the
glibc.</SPAN></FONT></SPAN><FONT face=Arial size=2><SPAN
class=325464116-21032011> </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>How could I fix this
error<SPAN class=152011509-22032011> and build
strongswan</SPAN>?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=325464116-21032011>Is there
something I did wrong?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011>Regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=325464116-21032011>Antoine</SPAN></FONT></DIV></DIV></BODY></HTML>