Page MenuHome GnuPG

Does not build using gcc 9
Closed, InvalidPublic

Description

With prev version everything was fine.

make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/gnupg-2.2.14/dirmngr'
gcc -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib64/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\""        -DWITHOUT_NPTH=1  -std=gnu99   -I/usr/include/p11-kit-1  -I/usr/include/libassuan2   -Wall -Wno-pointer-sign -Wpointer-arith -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -c -o t_http_basic-dns.o `test -f 'dns.c' || echo './'`dns.c
dns.c:4282:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '#pragma'
 4282 | #pragma GCC   diagnostic ignored "-Wstrict-prototypes"
      |         ^~~
dns.c:4310:15: error: expected ';' before 'static'
 4310 | DNS_PRAGMA_POP  /*(-Wstrict-prototypes)*/
      |               ^
      |               ;
......
 4314 | static const struct dns_rrtype *dns_rrtype(enum dns_type type) {
      | ~~~~~~         
dns.c:6038:1: error: unknown type name 'DNS_PRAGMA_PUSH'
 6038 | DNS_PRAGMA_PUSH
      | ^~~~~~~~~~~~~~~
dns.c:6039:17: error: expected ';' before 'static'
 6039 | DNS_PRAGMA_QUIET
      |                 ^
      |                 ;
 6040 | 
 6041 | static int dns_nssconf_k2c(int k) {
      | ~~~~~~           
dns.c:6073:15: error: expected ';' before 'int'
 6073 | DNS_PRAGMA_POP
      |               ^
      |               ;
......
 6076 | int dns_nssconf_loadfile(struct dns_resolv_conf *resconf, FILE *fp) {
      | ~~~            
make[2]: *** [Makefile:1148: t_http_basic-dns.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/gnupg-2.2.14/dirmngr'

Details

Version
2.2.14

Event Timeline

werner added a subscriber: werner.

Will you be so kind and look into this?

Maybe we should get rid of the _Pragma operator in particular because it is not used often and we cond on compiler type later anyway.

With gcc-9 in Debian experimental, everything goes well.
Yes, the use of pragma is questionable, but let's see.

werner triaged this task as Normal priority.Apr 5 2019, 9:26 AM
werner added a project: toolchain.

So this seems to be a gcc bug, right. Then we should close this bug.

Why do you think that it is gcc bug?

@kloczek , it is not reproducible for us, so, we consider it may be a problem other than GnuPG itself, possibly, some specific build configuration parameter(s) for GCC, or something by unreleased code.
Please file a report with how to reproduce your problem.

What you mean " it is not reproducible for u"?
Did you try to use gcc 9 and you had no problems compiling gnupg or you don't have access to build env with gcc 9?
Try to google to "gcc 9 pragma" and you will find several discussions and patches done by people fixing similar issues.

BTW: fedora corp provides already free access to build envs with gcc 9 which can be easily integrated with CIs.

@gniibe already wrote: “With gcc-9 in Debian experimental, everything goes well.”

Which one version gcc 9 you've been using?
May I see gcc -v ?

For what I use, please refer: https://tracker.debian.org/pkg/gcc-9

It is a snapshot with Debian specific patches.

Your discussion would be better to do in GCC context (as a GCC bug), because it's not the issue of ours.

I'm closing this.