[strongSwan-dev] Issue with Building an external plugin

krishna chaitanya krishnachaitanya.sanapala at gmail.com
Thu Aug 30 08:01:46 CEST 2012


Hi Tobias,

Sorry for posting a private mail.

I have been working on developing a plugin for which would directly take
configurations in run time and in that process I came across this styx
plugin which is filling the requirement. The styx plugin uses the JSON-RPC
for making remote call. This plugin is not part of stable release.

So I tried building it and was getting this following issue.


[root at localhost styx]# make
make[1]: Entering directory `/root/strongswan-5.0.0'
make[1]: Leaving directory `/root/strongswan-5.0.0'
make[1]: Entering directory `/root/strongswan-5.0.0'
make[1]: Leaving directory `/root/strongswan-5.0.0'
/bin/sh ../../../../libtool --tag=CC   --mode=compile gcc
-DPACKAGE_NAME=\"strongSwan\" -DPACKAGE_TARNAME=\"strongswan\"
-DPACKAGE_VERSION=\"5.0.0rc1\" -DPACKAGE_STRING=\"strongSwan\ 5.0.0rc1\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"strongswan\"
-DVERSION=\"5.0.0rc1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1
-DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_BACKTRACE=1 -DHAVE_CLOCK_GETTIME=1
-DHAVE_DLADDR=1 -DHAVE_CONDATTR_CLOCK_MONOTONIC=1
-DHAVE_PTHREAD_CONDATTR_INIT=1 -DHAVE_PTHREAD_CANCEL=1
-DHAVE_PTHREAD_RWLOCK_INIT=1 -DHAVE_GETTID=1 -DHAVE_SYS_GETTID=1
-DHAVE_PRCTL=1 -DHAVE_MALLINFO=1 -DHAVE_GETPASS=1 -DHAVE_GLOB_H=1
-DHAVE_LINUX_UDP_H=1 -DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY=1
-DHAVE_IN6ADDR_ANY=1 -DHAVE_IN6_PKTINFO=1 -DHAVE_IPSEC_MODE_BEET=1
-DHAVE_IPSEC_DIR_FWD=1 -DHAVE_RTA_TABLE=1 -DHAVE_GCC_ATOMIC_OPERATIONS=1
-DHAVE_PRINTF_SPECIFIER=1 -DHAVE_LIBGMP=1 -DUSE_IKEV1=1 -DUSE_IKEV2=1 -I.
-I../../../../src/libstrongswan -I../../../../src/libhydra
-I../../../../src/libcharon -I../../../../src/libfreeswan
-I../../../../src/stroke -I../../../../src   -rdynamic
-DIPSEC_PIDDIR=\"/var/run\" -DIPSEC_CONFDIR=\"/usr/local/etc\" -g -O2 -Wall
-Wno-format -Wno-pointer-sign -MT styx.lo -MD -MP -MF .deps/styx.Tpo -c -o
styx.lo styx.c
libtool: compile:  gcc -DPACKAGE_NAME=\"strongSwan\"
-DPACKAGE_TARNAME=\"strongswan\" -DPACKAGE_VERSION=\"5.0.0rc1\"
"-DPACKAGE_STRING=\"strongSwan 5.0.0rc1\"" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE_URL=\"\" -DPACKAGE=\"strongswan\" -DVERSION=\"5.0.0rc1\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1
-DHAVE_BACKTRACE=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_DLADDR=1
-DHAVE_CONDATTR_CLOCK_MONOTONIC=1 -DHAVE_PTHREAD_CONDATTR_INIT=1
-DHAVE_PTHREAD_CANCEL=1 -DHAVE_PTHREAD_RWLOCK_INIT=1 -DHAVE_GETTID=1
-DHAVE_SYS_GETTID=1 -DHAVE_PRCTL=1 -DHAVE_MALLINFO=1 -DHAVE_GETPASS=1
-DHAVE_GLOB_H=1 -DHAVE_LINUX_UDP_H=1
-DHAVE_STRUCT_SADB_X_POLICY_SADB_X_POLICY_PRIORITY=1 -DHAVE_IN6ADDR_ANY=1
-DHAVE_IN6_PKTINFO=1 -DHAVE_IPSEC_MODE_BEET=1 -DHAVE_IPSEC_DIR_FWD=1
-DHAVE_RTA_TABLE=1 -DHAVE_GCC_ATOMIC_OPERATIONS=1 -DHAVE_PRINTF_SPECIFIER=1
-DHAVE_LIBGMP=1 -DUSE_IKEV1=1 -DUSE_IKEV2=1 -I.
-I../../../../src/libstrongswan -I../../../../src/libhydra
-I../../../../src/libcharon -I../../../../src/libfreeswan
-I../../../../src/stroke -I../../../../src -rdynamic
-DIPSEC_PIDDIR=\"/var/run\" -DIPSEC_CONFDIR=\"/usr/local/etc\" -g -O2 -Wall
-Wno-format -Wno-pointer-sign -MT styx.lo -MD -MP -MF .deps/styx.Tpo -c
styx.c  -fPIC -DPIC -o .libs/styx.o
styx.c: In function ‘destroy’:
styx.c:404: error: ‘callback_job_t’ has no member named ‘cancel’
make: *** [styx.lo] Error 1


styx.c

METHOD(plugin_t, destroy, void,
    private_styx_plugin_t *this)
{
    close(this->socket);
    unlink(IPSEC_PIDDIR "/charon.json");
    this->list->destroy_offset(this->list, offsetof(peer_cfg_t, destroy));
    this->error_list->destroy_function(this->error_list, free);
    this->mutex->destroy(this->mutex);
    json_rpc_unregister_all();
    this->job->cancel(this->job);
    charon->backends->remove_backend(charon->backends,
&this->config->backend);
    this->config->destroy(this->config);
    free(this);
    fprintf(f, "-----styx destroyed-----\n");
    fclose(f);
}

Thanks,
Krishna Chaitanya S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/dev/attachments/20120830/c7310857/attachment.html>


More information about the Dev mailing list