maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [Announce] Strongswan 4.5.0 - VPN (https://talk.maemo.org/showthread.php?t=68705)

mveplus 2011-01-21 06:03

[Announce] Strongswan 4.5.0 - VPN
 
1 Attachment(s)
BIG THANKS to (Strongswan) Tobias Brunner, we have the letest/greatest ipsec/VPN solution brought to Maemo!

See post #2

Hi all gurus and geeks.
I'm trying to build DEB package StorngSwan v.4.5.0 form source for maemo.
My system is LinuxMint Debian - latest, scratchbox installed manually according wiki.maemo.org, much help borrowd also form Jebba, Mohammad7410, and many various places.

I'm stuck in last step of quick test build of StrongSwan -
Code:

dpkg-buildpackage -rfakeroot -b -uc
get the fallowing error :
Code:

.................................
.Tpo -c aes_crypter.c -o aes_crypter.o >/dev/null 2>&1
mv -f .deps/aes_crypter.Tpo .deps/aes_crypter.Plo
/bin/sh ../../../../libtool --tag=CC  --mode=link arm-linux-gnueabi-gcc -rdynamic -Wall -g -O2 -module -avoid-version -Wl,-z,defs -o libstrongswan-aes.la -rpath /usr/libexec/ipsec/plugins aes_plugin.lo aes_crypter.lo 
libtool: link: arm-linux-gnueabi-gcc -shared  .libs/aes_plugin.o .libs/aes_crypter.o    -Wl,-z -Wl,defs  -Wl,-soname -Wl,libstrongswan-aes.so -o .libs/libstrongswan-aes.so
.libs/aes_plugin.o: In function `aes_plugin_create':
/home/mven/VPN/ipsec/strongswan-4.5.0/src/libstrongswan/plugins/aes/aes_plugin.c:61: undefined reference to `lib'
.libs/aes_plugin.o: In function `destroy':
/home/mven/VPN/ipsec/strongswan-4.5.0/src/libstrongswan/plugins/aes/aes_plugin.c:40: undefined reference to `lib'
collect2: ld returned 1 exit status
make[6]: *** [libstrongswan-aes.la] Error 1
make[6]: Leaving directory `/home/mven/VPN/ipsec/strongswan-4.5.0/src/libstrongswan/plugins/aes'
make[5]: *** [install-recursive] Error 1
make[5]: Leaving directory `/home/mven/VPN/ipsec/strongswan-4.5.0/src/libstrongswan'
make[4]: *** [install] Error 2
make[4]: Leaving directory `/home/mven/VPN/ipsec/strongswan-4.5.0/src/libstrongswan'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/mven/VPN/ipsec/strongswan-4.5.0/src'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/mven/VPN/ipsec/strongswan-4.5.0'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/mven/VPN/ipsec/strongswan-4.5.0'
make: *** [install-arch] Error 2
[sbox-FREMANTLE_ARMEL: ~/VPN/ipsec/strongswan-4.5.0] >

Building the package classical way work's fine:
Code:

wget http://download.strongswan.org/strongswan-4.5.0.tar.bz2
tar jxvf strongswan-4.5.0.tar.bz2
cd strongswan-4.5.0
./configure --prefix=/usr --sysconfdir=/etc --enable-maemo
make
fakeroot make install

Before I reach this level there was some missing dependency for lgmp which I compiled and installed form source and for osso-af-settings which is Hildon-desktop package installed form repocitories.

If I manage to build this package with your help it will work only with kernel 2.6.28-10power46 + kernel-power-headers
all requited modules are build in kernel already except
IPv6: Multiple Routing Tables [CONFIG_IPV6_MULTIPLE_TABLES] , which is not so important for initial launch and using IP4, can be included later...

I think it's missing some global environment variables but cannot figure it out.

The only thing that I edited after dh_make, was adding i Debian/Rules - section CFLAGS
Code:

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif

config.status: configure
        dh_testdir
        # Add here commands to configure the package.
      --prefix=/usr
        --sysconfdir=/etc
        --enable-maemo

        ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"

I'm very newbie in cross-compilation for memo, any help will be appreciate.
Thank you!

strongswan 2011-02-08 17:30

Re: [HELP BUILDING DEB] Strongswan 4.5.0 - VPN
 
Quote:

Originally Posted by mveplus (Post 925178)
get the fallowing error :
Code:

.libs/aes_plugin.o: In function `aes_plugin_create':
/home/mven/VPN/ipsec/strongswan-4.5.0/src/libstrongswan/plugins/aes/aes_plugin.c:61: undefined reference to `lib'


I suppose this error is caused by your LDFLAGS (-Wl,-z,defs). Try removing them from the debian/rules file.

For an easier way to use strongSwan on your N900 you can try the packages I just uploaded to extras/testing.
There is a package for strongSwan and one for a configuration/statusbar applet. The latter allows to easily set up IKEv2 connections with EAP authentication (username/password). In our Wiki you'll find an example configuration for the gateway.

mveplus 2011-02-09 04:16

Re: [HELP BUILDING DEB] Strongswan 4.5.0 - VPN
 
Quote:

Originally Posted by strongswan (Post 939179)
I suppose this error is caused by your LDFLAGS (-Wl,-z,defs). Try removing them from the debian/rules file.

For an easier way to use strongSwan on your N900 you can try the packages I just uploaded to extras/testing.
There is a package for strongSwan and one for a configuration/statusbar applet. The latter allows to easily set up IKEv2 connections with EAP authentication (username/password). In our Wiki you'll find an example configuration for the gateway.

Hi Tobias,

you make my day - just perfect, I'm start playing with it!


All times are GMT. The time now is 16:46.

vBulletin® Version 3.8.8