[pkg-gnupg-maint] Bug#926984: gnupg2 FTBFS with gcc-9: dirmngr/dns.h:1058:24: error: lvalue required as unary '&' operand

Helmut Grohne helmut at subdivi.de
Sat Apr 13 08:25:50 BST 2019


Source: gnupg2
Version: 2.2.15-1
Severity: important
Tags: ftbfs patch upstream
User: helmutg at debian.org
Usertags: rebootstrap

gnupg2 fails to build from source with gcc-9, here is the relevant part
of a cross build log:

| aarch64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../dirmngr -I..  -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/lib/gnupg\"" -DGNUPG_LIBDIR="
| \"/usr/lib/aarch64-linux-gnu/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\""       -Wdate-time -D_FORTIFY_SOURCE=2
| -std=gnu99       -I/usr/include/p11-kit-1 -Wall -Wno-pointer-sign -Wpointer-arith -g -O2 -fdebug-prefix-map=/tmp/buildd/gnupg2/gnupg2-2.2.13=. -fstack-protector-strong -Wformat -Werror
| =format-security -c -o dns-stuff.o ../../dirmngr/dns-stuff.c
| In file included from ../../dirmngr/dns-stuff.c:57:
| ../../dirmngr/dns-stuff.c: In function 'libdns_res_open':
| ../../dirmngr/dns.h:1058:24: error: lvalue required as unary '&' operand
|  1058 | #define dns_opts(...) (&dns_quietinit((struct dns_options)DNS_OPTS_INIT(__VA_ARGS__)))
|       |                        ^
| ../../dirmngr/dns-stuff.c:719:23: note: in expansion of macro 'dns_opts'
|   719 |                       dns_opts (.socks_host     = &libdns.socks_host,
|       |                       ^~~~~~~~
| make[4]: Leaving directory '/tmp/buildd/gnupg2/gnupg2-2.2.13/build/dirmngr'
| make[4]: *** [Makefile:995: dns-stuff.o] Error 1
| make[3]: Leaving directory '/tmp/buildd/gnupg2/gnupg2-2.2.13/build'
| make[3]: *** [Makefile:616: all-recursive] Error 1
| make[2]: Leaving directory '/tmp/buildd/gnupg2/gnupg2-2.2.13/build'
| make[2]: *** [Makefile:536: all] Error 2
| dh_auto_build: cd build && make -j1 returned exit code 2
| make[1]: Leaving directory '/tmp/buildd/gnupg2/gnupg2-2.2.13'
| make[1]: *** [debian/rules:55: override_dh_auto_build-arch] Error 2
| make: *** [debian/rules:35: binary-arch] Error 2
| dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2

This problem also affects OE and Khem Raj has created a fix already:

https://patchwork.openembedded.org/patch/157377/

Can you cherry-pick that patch?

Helmut



More information about the pkg-gnupg-maint mailing list