[Swan-dev] problems with Libreswan 3.1[56] build for Linux 3.14

Neal P. Murphy neal.p.murphy at alum.wpi.edu
Thu Mar 3 05:25:11 UTC 2016


I am trying to build libreswan for the next version of Smoothwall Express.

With v3.15, even though I include KERNELSRC=... on the make command line, it still tried to build ipsec.ko using the build host's kernel version, and thus doesn't build it at all. The 3.15 programs all seem to build OK.

Since 3.16 is out, I figured I'd bump to it. But now a new problem crops up before the ipsec module is built.

Given Makefile.inc.local content of:
----
INITSYSTEM = sysvinit
USE_LIBCURL = false
USE_XAUTHPAM = false
INC_USRLOCAL = /usr
----

the program(s) should be built without PAM support; this did work for v3.15. Alas, the v3.16 pluto build now fails:
----
cc  -m64 -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-all -fno-strict-aliasing -fPIE -DPIE -DFORCE_PR_ASSERT -DDNSSEC -DKLIPS -DUSE_MD5 -DHAVE_NM -DUSE_SHA2 -DUSE_SHA1 -DFIPSPRODUCTCHECK=\"/etc/system-fips\" -DIPSEC_CONF=\"/etc/ipsec.conf\" -DIPSEC_CONFDDIR=\"/etc/ipsec.d\" -DIPSEC_NSSDIR=\"/etc/ipsec.d\" -DIPSEC_CONFDIR=\"/etc\" -DIPSEC_EXECDIR=\"/usr/libexec/ipsec\" -DIPSEC_SBINDIR=\"/usr/sbin\" -DIPSEC_VARDIR=\"/var\" -DPOLICYGROUPSDIR=\"/etc/ipsec.d/policies\" -DSHARED_SECRETS_FILE=\"/etc/ipsec.secrets\" -DRETRANSMIT_INTERVAL_DEFAULT="500" -DGCC_LINT -DALLOW_MICROSOFT_BAD_PROPOSAL  -Wall -Wextra -Wformat -Wformat-nonliteral -Wformat-security -Wundef -Wmissing-declarations -Wredundant-decls -Wnested-externs -I/build/sources/libreswan/libreswan-3.16/ports/linux/include -I/build/sources/libreswan/libreswan-3.16/ports/linux/include -I/build/sources/libreswan/libreswan-3.16/ports/linux/include -I/build/sources/libreswan/libreswan-3.16/ports/linu!
 x/include  -I/build/sources/libreswan/libreswan-3.16/programs/pluto/linux26 -I/build/sources/libreswan/libreswan-3.16/include -I/build/sources/libreswan/libreswan-3.16/lib/libcrypto -I/build/sources/libreswan/libreswan-3.16/linux/include      -DNETKEY_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES -DPFKEY  -DUSE_TWOFISH -DUSE_SERPENT -DKLIPS -DPFKEY    -DUSE_AES -DUSE_3DES -DUSE_SHA2 -DUSE_SHA1 -DUSE_MD5 -DUSE_CAMELLIA        -DHAVE_LIBCAP_NG -DHAVE_NM -I/usr/include/nss -I/usr/include/nspr   -O2 -m64 -fPIC -fno-strict-aliasing  \
        -MMD -MF ./ikev1_xauth.d \
        -o ./ikev1_xauth.o \
        -c /build/sources/libreswan/libreswan-3.16/programs/pluto/ikev1_xauth.c
/build/sources/libreswan/libreswan-3.16/programs/pluto/ikev1_xauth.c: In function 'ikev1_do_pam_authentication':
/build/sources/libreswan/libreswan-3.16/programs/pluto/ikev1_xauth.c:1190:24: error: storage size of 'parg' isn't known
/build/sources/libreswan/libreswan-3.16/programs/pluto/ikev1_xauth.c:1205:2: warning: implicit declaration of function 'do_pam_authentication' [-Wimplicit-function-declaration]
/build/sources/libreswan/libreswan-3.16/programs/pluto/ikev1_xauth.c:1205:2: warning: nested extern declaration of 'do_pam_authentication' [-Wnested-externs]
/build/sources/libreswan/libreswan-3.16/programs/pluto/ikev1_xauth.c:1190:24: warning: unused variable 'parg' [-Wunused-variable]
/build/sources/libreswan/libreswan-3.16/programs/pluto/ikev1_xauth.c: At top level:
/build/sources/libreswan/libreswan-3.16/programs/pluto/ikev1_xauth.c:1185:13: warning: 'ikev1_do_pam_authentication' defined but not used [-Wunused-function]
../../../mk/depend.mk:28: recipe for target 'ikev1_xauth.o' failed
make[4]: *** [ikev1_xauth.o] Error 1
make[4]: Leaving directory '/build/sources/libreswan/libreswan-3.16/OBJ.linux.x86_64/programs/pluto'
Makefile:426: recipe for target 'local-base' failed
make[3]: *** [local-base] Error 2
make[3]: Leaving directory '/build/sources/libreswan/libreswan-3.16/programs/pluto'
../mk/subdirs.mk:33: recipe for target 'base' failed
make[2]: *** [base] Error 2
make[2]: Leaving directory '/build/sources/libreswan/libreswan-3.16/programs'
/build/sources/libreswan/libreswan-3.16/mk/subdirs.mk:33: recipe for target 'base' failed
make[1]: *** [base] Error 2
make[1]: Leaving directory '/build/sources/libreswan/libreswan-3.16'
Makefile:35: recipe for target 'compile' failed
make: *** [compile] Error 2
make: Leaving directory '/build/sources/libreswan'
----

That "storage size of parg isn't known" is a silly gcc error that means that the struct used in the definition doesn't exist.

What did I do wrong, or overlook?

Thanks,
Neal


More information about the Swan-dev mailing list