[strongSwan-dev] Linking Problem with xauth plugin on Android
tobias at strongswan.org
Tue Apr 26 11:27:04 CEST 2011
> I am trying compile and link on Android platform, the xauth plugin for
> pluto (..src/pluto/plugins/xauth..).
> The libstrongswan-xauth.so is created, but during runtime, dlopen()
> fails for this library with the following error:
What you need to know is that pluto is not officially supported on
Android. We never actually tried to even compile it ourselves.
For charon (the IKEv2 daemon) Android.mk files are provided to easily
integrate it with the Android build system (see  for details).
> plugin 'xauth' failed to load : Cannot load library:
> reloc_library: 1931 cannot locate 'get_xauth_secret'...
> It appears it's unable to load/link to symbols defined in pluto
How exactly are you compiling strongSwan? Do you use droid-gcc ?
Anyway, you will have to look for two things. First, since -rdynamic
does not seem to work, you have to add "-Wl,--export-dynamic" directly.
Second, you have to avoid that the "-Wl,--gc-sections" option is
added, as this will remove any unused symbols in pluto (or at least make
them local, thus unresolvable by plugins). If you use droid-gcc, add
the first option to and remove the second option from link_args.
More information about the Dev