Hi all,

As of 4.3.6 strongSwan gives a compile error on the openWRT cross
compiler: "utils/identification.c:801: error: conflicting types for 'clone'"

Further study showed that a small name change was made in the source code.

I've added a patch that works for me, i.e., it compiles now. However I
have not yet tested it in a working environment! It is based on 4.3.5
however, so I fully expect this to work.

Besides the patch, the error that prompted this is also provided as an
attachment.

Hope this helps and can be placed in some kind of knowledge base. I
figure as this seems a openWRT related issue integrating this patch into
master is unnecessary.

Kind Regards,

Jan Willem Beusink
make[9]: Entering directory 
`/local/myHomeDir/trunk14/build_dir/target-mipsel_uClibc-0.9.30.1/strongswan-4.4.0dr1/src/libstrongswan'
/bin/bash ../../libtool  --tag=CC   --mode=compile 
mipsel-openwrt-linux-uclibc-gcc -DPACKAGE_NAME=\"strongSwan\" 
-DPACKAGE_TARNAME=\"strongswan\" -DPACKAGE_VERSION=\"4.4.0dr1\" 
-DPACKAGE_STRING=\"strongSwan\ 4.4.0dr1\" -DPACKAGE_BUGREPORT=\"\" 
-DPACKAGE_URL=\"\" -DPACKAGE=\"strongswan\" -DVERSION=\"4.4.0dr1\" 
-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_CLOCK_GETTIME=1 -DHAVE_DLADDR=1 -DHAVE_PTHREAD_CONDATTR_INIT=1 
-DHAVE_PTHREAD_CANCEL=1 -DHAVE_PTHREAD_RWLOCK_INIT=1 -DHAVE_PRCTL=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_PRINTF_FUNCTION=1 -I. -I../../src/libstrongswan  
-I/local/myHomeDir/trunk14/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include
 -I/local/myHomeDir/trunk14/staging_dir/target-mipsel_uClibc-0.9.30.1/include 
-I/local/myHomeDir/trunk14/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include
 
-I/local/myHomeDir/trunk14/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include
  -DIPSEC_DIR=\"/usr/lib/ipsec\" -DPLUGINDIR=\"/usr/lib/ipsec/plugins\" 
-DSTRONGSWAN_CONF=\"/etc/strongswan.conf\"    -Os -pipe -mips32 -mtune=mips32 
-funit-at-a-time -fhonour-copts -msoft-float  -MT identification.lo -MD -MP -MF 
.deps/identification.Tpo -c -o identification.lo `test -f 
'utils/identification.c' || echo './'`utils/identification.c
libtool: compile:  mipsel-openwrt-linux-uclibc-gcc 
-DPACKAGE_NAME=\"strongSwan\" -DPACKAGE_TARNAME=\"strongswan\" 
-DPACKAGE_VERSION=\"4.4.0dr1\" "-DPACKAGE_STRING=\"strongSwan 4.4.0dr1\"" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"strongswan\" 
-DVERSION=\"4.4.0dr1\" -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_CLOCK_GETTIME=1 -DHAVE_DLADDR=1 
-DHAVE_PTHREAD_CONDATTR_INIT=1 -DHAVE_PTHREAD_CANCEL=1 
-DHAVE_PTHREAD_RWLOCK_INIT=1 -DHAVE_PRCTL=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_PRINTF_FUNCTION=1 -I. -I../../src/libstrongswan 
-I/local/myHomeDir/trunk14/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include
 -I/local/myHomeDir/trunk14/staging_dir/target-mipsel_uClibc-0.9.30.1/include 
-I/local/myHomeDir/trunk14/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include
 
-I/local/myHomeDir/trunk14/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include
 -DIPSEC_DIR=\"/usr/lib/ipsec\" -DPLUGINDIR=\"/usr/lib/ipsec/plugins\" 
-DSTRONGSWAN_CONF=\"/etc/strongswan.conf\" -Os -pipe -mips32 -mtune=mips32 
-funit-at-a-time -fhonour-copts -msoft-float -MT identification.lo -MD -MP -MF 
.deps/identification.Tpo -c utils/identification.c  -fPIC -DPIC -o 
.libs/identification.o
utils/identification.c:801: error: conflicting types for 'clone'
/local/myHomeDir/trunk14/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/sys-include/bits/sched.h:74:
 error: previous declaration of 'clone' was here
make[9]: *** [identification.lo] Error 1
make[9]: Leaving directory 
`/local/myHomeDir/trunk14/build_dir/target-mipsel_uClibc-0.9.30.1/strongswan-4.4.0dr1/src/libstrongswan'
make[8]: *** [install-recursive] Error 1
make[8]: Leaving directory 
`/local/myHomeDir/trunk14/build_dir/target-mipsel_uClibc-0.9.30.1/strongswan-4.4.0dr1/src/libstrongswan'
make[7]: *** [install] Error 2
make[7]: Leaving directory 
`/local/myHomeDir/trunk14/build_dir/target-mipsel_uClibc-0.9.30.1/strongswan-4.4.0dr1/src/libstrongswan'
make[6]: *** [install-recursive] Error 1
make[6]: Leaving directory 
`/local/myHomeDir/trunk14/build_dir/target-mipsel_uClibc-0.9.30.1/strongswan-4.4.0dr1/src'
make[5]: *** [install-recursive] Error 1
make[5]: Leaving directory 
`/local/myHomeDir/trunk14/build_dir/target-mipsel_uClibc-0.9.30.1/strongswan-4.4.0dr1'
make[4]: *** [install] Error 2
make[4]: Leaving directory 
`/local/myHomeDir/trunk14/build_dir/target-mipsel_uClibc-0.9.30.1/strongswan-4.4.0dr1'
make[3]: *** 
[/local/myHomeDir/trunk14/build_dir/target-mipsel_uClibc-0.9.30.1/strongswan-4.4.0dr1/.built]
 Error 2
make[3]: Leaving directory 
`/local/myHomeDir/package_strongswan-4.4.0dr1.2-noClonePatch'
make[2]: *** [package/package_strongswan-4.4.0dr1.2-noClonePatch/compile] Error 
2
make[2]: Leaving directory `/local/myHomeDir/trunk14'
make[1]: *** 
[/local/myHomeDir/trunk14/staging_dir/target-mipsel_uClibc-0.9.30.1/stamp/.package_compile]
 Error 2
make[1]: Leaving directory `/local/myHomeDir/trunk14'
make: *** [world] Error 2
--- ./src/libstrongswan/utils/identification.c.old	2010-01-06 01:03:47.000000000 +0100
+++ ./src/libstrongswan/utils/identification.c	2010-02-22 14:25:40.000000000 +0100
@@ -798,7 +798,7 @@
 	return print_in_hook(dst, len, "%*s", spec->width, buf);
 }
 
-METHOD(identification_t, clone, identification_t*,
+METHOD(identification_t, clone_, identification_t*,
 	private_identification_t *this)
 {
 	private_identification_t *clone = malloc_thing(private_identification_t);
@@ -830,7 +830,7 @@
 			.get_encoding = _get_encoding,
 			.get_type = _get_type,
 			.create_part_enumerator = _create_part_enumerator,
-			.clone = _clone,
+			.clone = _clone_,
 			.destroy = _destroy,
 		},
 		.type = type,
_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev

Reply via email to