Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 216809 - gnupg-2.0.7 + curl-7.18.1 + gcc-4.3
Summary: gnupg-2.0.7 + curl-7.18.1 + gcc-4.3
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Crypto team [DISABLED]
Depends on:
Blocks: gcc-4.3
  Show dependency tree
Reported: 2008-04-08 02:33 UTC by Ryan Hill (RETIRED)
Modified: 2008-04-24 01:57 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---

Gnupg patch for curl/gcc 4.3 (gnupg-2.0.9-curl.patch,437 bytes, patch)
2008-04-16 20:30 UTC,
Details | Diff
Ebuild patch for gnupg-2.0.9 (gnupg-2.0.9.ebuild.patch,361 bytes, text/plain)
2008-04-16 20:30 UTC,

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2008-04-08 02:33:02 UTC
Heys.  There is a compilation error building gnupg-2.0.9 using GCC
4.3 and curl-7.18.1.  The error appears to be the result of this change
from the curl release announcement:

- added type checking macros for curl_easy_setopt() and
curl_easy_getinfo(), watch out for new warnings in code using libcurl
(needs gcc-4.3 and currently only works in C mode)

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..   -I../gl -I../common -I../intl -DLOCALEDIR\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\""         -O2 -g -march=prescott -fomit-frame-pointer -pipe -fdirectives-only -Wall -Wno-pointer-sign -Wpointer-arith -MT gpg2keys_curl-gpgkeys_curl.o -MD -MP -MF .deps/gpg2keys_curl-gpgkeys_curl.Tpo -c -o gpg2keys_curl-gpgkeys_curl.o `test -f 'gpgkeys_curl.c' || echo './'`gpgkeys_curl.c
gpgkeys_curl.c: In function 'main':
gpgkeys_curl.c:303: error: 'typeof' applied to a bit-field

I've sent this to the gnupg-dev mailing list but I'm not sure if it went through.  I'll try again in a bit if it doesn't show up.

In the meantime, I don't know how to fix this correctly and haven't seen it reported elsewhere yet.  As you're probably more familiar with the codebase, let me know if you have any ideas.
Comment 1 Michel Ganguin 2008-04-10 12:21:24 UTC
Strange error!!! GCC error?

since the third param of curl_easy_setopt is boolean in this case (according to "man curl_easy_setopt") you can put a double not (!) to fix the compilation error.

Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2008-04-10 12:26:11 UTC
(In reply to comment #1)
> gpgkeys_curl.c:303:
> -curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,opt->flags.check_cert);
> +curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,!!opt->flags.check_cert);

Better solution would be:
+curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER, opt->flags.check_cert != 0);
Comment 3 2008-04-16 20:30:24 UTC
Created attachment 149978 [details, diff]
Gnupg patch for curl/gcc 4.3

Patch to correct gcc 4.3 compile error
Comment 4 2008-04-16 20:30:59 UTC
Created attachment 149979 [details]
Ebuild patch for gnupg-2.0.9

Ebuild patch
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2008-04-17 05:15:48 UTC
Fixed, thanks!
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2008-04-24 01:57:18 UTC
Just FYI, this is fixed upstream.