[Swan-dev] Bug#853947: libreswan FTBFS on mips and mipsel: error: "_ABI64" is not defined [-Werror=undef]

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Feb 3 18:57:22 UTC 2017


On Thu 2017-02-02 20:26:26 -0500, Paul Wouters wrote:
> Can you try the attached patch?
>
> Totally untested, because I don't have that build environment, and based
> on some random googling :)
>
> Paul
> diff --git a/lib/libswan/nss_copies.c b/lib/libswan/nss_copies.c
> index b90bbf0..16976db 100644
> --- a/lib/libswan/nss_copies.c
> +++ b/lib/libswan/nss_copies.c
> @@ -3,6 +3,10 @@
>   * file, You can obtain one at http://mozilla.org/MPL/2.0/.
>   */
>  
> +#ifdef _MIPS_SIM
> +# include <sgidefs.h>
> +#endif
> +
>  #include <cert.h>
>  #include <secder.h>
>  #include "nss_copies.h"

I've tried this as
bugfix-853947/0010-Try-to-include-the-correct-headers-on-MIPS.patch in
3.19-2, and it does not seem to resolve the build problems on mips and
mipsel:

https://buildd.debian.org/status/fetch.php?pkg=libreswan&arch=mips&ver=3.19-2&stamp=1486145635&raw=0

ends with:

cc -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -fstack-protector-strong -Wformat -Werror=format-security -I/«PKGBUILDDIR»/lib/libcrypto/libsha2 -I/«PKGBUILDDIR»/lib/libcrypto/libaes_xcbc -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I. -I/«PKGBUILDDIR»/linux/net/ipsec -I/«PKGBUILDDIR»/linux/include -I/«PKGBUILDDIR» -DPFKEYV2  -I/usr/include/nss -I/usr/include/nspr -I/«PKGBUILDDIR»/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -std=gnu99  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-all -fno-strict-aliasing -fPIE -DPIE -DFORCE_PR_ASSERT -DDNSSEC -DLIBCURL -DLDAP_VER=3 -DHAVE_NM -DUSE_MD5 -DUSE_SHA2 -DUSE_SHA1 -DUSE_AES -DUSE_3DES -DUSE_CAMELLIA -DUSE_SERPENT -DUSE_TWOFISH -DUSE_CAST -DUSE_RIPEMD -DFIPSPRODUCTCHECK=\"/etc/system-fips\" -DIPSEC_CONF=\"/etc/ipsec.conf\" -DIPSEC_CONFDDIR=\"/etc/ipsec.d\" -DIPSEC_NSSDIR=\"/var/lib/ipsec/nss\" -DIPSEC_CONFDIR=\"/etc\" -DIPSEC_EXECDIR=\"/usr/lib/ipsec\" -DIPSEC_SBINDIR=\"/usr/sbin\" -DIPSEC_VARDIR=\"/var\" -DPOLICYGROUPSDIR=\"/etc/ipsec.d/policies\" -DIPSEC_SECRETS_FILE=\"/etc/ipsec.secrets\" -DRETRANSMIT_INTERVAL_DEFAULT="500" -DUSE_FORK=1 -DUSE_VFORK=0 -DUSE_DAEMON=0 -DUSE_PTHREAD_SETSCHEDPRIO=1 -DGCC_LINT -DALLOW_MICROSOFT_BAD_PROPOSAL -Werror -Wall -Wextra -Wformat -Wformat-nonliteral -Wformat-security -Wundef -Wmissing-declarations -Wredundant-decls -Wnested-externs  -I/«PKGBUILDDIR»/lib/libcrypto/libsha2 -I/«PKGBUILDDIR»/lib/libcrypto/libaes_xcbc -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I. -I/«PKGBUILDDIR»/linux/net/ipsec -I/«PKGBUILDDIR»/linux/include -I/«PKGBUILDDIR» -DPFKEYV2  -I/usr/include/nss -I/usr/include/nspr -I/«PKGBUILDDIR»/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -std=gnu99  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-all -fno-strict-aliasing -fPIE -DPIE -DFORCE_PR_ASSERT -DDNSSEC -DLIBCURL -DLDAP_VER=3 -DHAVE_NM -DUSE_MD5 -DUSE_SHA2 -DUSE_SHA1 -DUSE_AES -DUSE_3DES -DUSE_CAMELLIA -DUSE_SERPENT -DUSE_TWOFISH -DUSE_CAST -DUSE_RIPEMD -DFIPSPRODUCTCHECK=\"/etc/system-fips\" -DIPSEC_CONF=\"/etc/ipsec.conf\" -DIPSEC_CONFDDIR=\"/etc/ipsec.d\" -DIPSEC_NSSDIR=\"/var/lib/ipsec/nss\" -DIPSEC_CONFDIR=\"/etc\" -DIPSEC_EXECDIR=\"/usr/lib/ipsec\" -DIPSEC_SBINDIR=\"/usr/sbin\" -DIPSEC_VARDIR=\"/var\" -DPOLICYGROUPSDIR=\"/etc/ipsec.d/policies\" -DIPSEC_SECRETS_FILE=\"/etc/ipsec.secrets\" -DRETRANSMIT_INTERVAL_DEFAULT="500" -DUSE_FORK=1 -DUSE_VFORK=0 -DUSE_DAEMON=0 -DUSE_PTHREAD_SETSCHEDPRIO=1 -DGCC_LINT -DALLOW_MICROSOFT_BAD_PROPOSAL -Werror -Wall -Wextra -Wformat -Wformat-nonliteral -Wformat-security -Wundef -Wmissing-declarations -Wredundant-decls -Wnested-externs  -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include -I/«PKGBUILDDIR»/ports/linux/include  \
	-MMD -MF ./base64_rsa_pubkey.d \
	-o ./base64_rsa_pubkey.o \
	-c /«PKGBUILDDIR»/lib/libswan/base64_rsa_pubkey.c
In file included from /usr/include/nspr/prtypes.h:26:0,
                 from /usr/include/nss/seccomon.h:17,
                 from /usr/include/nss/nss.h:34,
                 from /«PKGBUILDDIR»/lib/libswan/base64_rsa_pubkey.c:21:
/usr/include/nspr/prcpucfg.h:511:18: error: "_ABI64" is not defined [-Werror=undef]
 #if _MIPS_SIM == _ABI64
                  ^~~~~~
cc1: all warnings being treated as errors
../../../mk/depend.mk:28: recipe for target 'base64_rsa_pubkey.o' failed


and it's the same thing on mipsel:

https://buildd.debian.org/status/fetch.php?pkg=libreswan&arch=mipsel&ver=3.19-2&stamp=1486145643&raw=0

        --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20170203/24203095/attachment.sig>


More information about the Swan-dev mailing list