Clang with GnuPG 2.1.0
Robert J. Hansen
rjh at sixdemonbag.org
Fri Nov 7 19:53:35 CET 2014
A great way to find hidden GNUisms is to use a non-GNU compiler, which
is why I generally prefer to compile things with Clang -- it's a nice
sanity check on code. GnuPG 2.1.0 is refusing to build on a
freshly-updated Fedora 20 box using Clang 3.4.
(It compiles just fine with GCC, incidentally.)
=====
make[3]: Entering directory `/home/rjh/gnupg-2.1.0/common'
clang -DHAVE_CONFIG_H -I. -I.. -I../gl -I../intl
-DLOCALEDIR=\"/home/rjh/share/locale\"
-DGNUPG_BINDIR="\"/home/rjh/bin\""
-DGNUPG_LIBEXECDIR="\"/home/rjh/libexec\""
-DGNUPG_LIBDIR="\"/home/rjh/lib/gnupg\""
-DGNUPG_DATADIR="\"/home/rjh/share/gnupg\""
-DGNUPG_SYSCONFDIR="\"/home/rjh/etc/gnupg\""
-DGNUPG_LOCALSTATEDIR="\"/home/rjh/var\"" -I/home/rjh/include
-I/home/rjh/include -I/home/rjh/include -I/home/rjh/include
-DWITHOUT_NPTH=1 -g -O2 -Wall -Wno-pointer-sign -Wpointer-arith -MT
libcommon_a-logging.o -MD -MP -MF .deps/libcommon_a-logging.Tpo -c -o
libcommon_a-logging.o `test -f 'logging.c' || echo './'`logging.c
In file included from logging.c:51:
In file included from /usr/include/netinet/in.h:22:
In file included from ../gl/stdint.h:83:
/usr/include/inttypes.h:290:8: error: unknown type name 'intmax_t'
extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
^
/usr/include/inttypes.h:290:26: error: unknown type name 'intmax_t'
extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
^
/usr/include/inttypes.h:293:27: error: unknown type name 'intmax_t'
extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
^
/usr/include/inttypes.h:293:45: error: unknown type name 'intmax_t'
extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
^
/usr/include/inttypes.h:297:8: error: unknown type name 'intmax_t'
extern intmax_t strtoimax (const char *__restrict __nptr,
^
/usr/include/inttypes.h:301:8: error: unknown type name 'uintmax_t'
extern uintmax_t strtoumax (const char *__restrict __nptr,
^
/usr/include/inttypes.h:305:8: error: unknown type name 'intmax_t'
extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
^
/usr/include/inttypes.h:310:8: error: unknown type name 'uintmax_t'
extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
^
/usr/include/inttypes.h:323:17: error: unknown type name 'intmax_t'
__extern_inline intmax_t
^
/usr/include/inttypes.h:324:1: error: expected identifier or '('
__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,
^
/usr/include/sys/cdefs.h:57:22: note: expanded from macro '__NTH'
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
^
In file included from logging.c:51:
In file included from /usr/include/netinet/in.h:22:
In file included from ../gl/stdint.h:83:
/usr/include/inttypes.h:335:17: error: unknown type name 'uintmax_t'
__extern_inline uintmax_t
^
/usr/include/inttypes.h:336:1: error: expected identifier or '('
__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,
^
/usr/include/sys/cdefs.h:57:22: note: expanded from macro '__NTH'
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
^
In file included from logging.c:51:
In file included from /usr/include/netinet/in.h:22:
In file included from ../gl/stdint.h:83:
/usr/include/inttypes.h:347:17: error: unknown type name 'intmax_t'
__extern_inline intmax_t
^
/usr/include/inttypes.h:348:1: error: expected identifier or '('
__NTH (wcstoimax (const __gwchar_t *__restrict nptr,
^
/usr/include/sys/cdefs.h:57:22: note: expanded from macro '__NTH'
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
^
In file included from logging.c:51:
In file included from /usr/include/netinet/in.h:22:
In file included from ../gl/stdint.h:83:
/usr/include/inttypes.h:361:17: error: unknown type name 'uintmax_t'
__extern_inline uintmax_t
^
/usr/include/inttypes.h:362:1: error: expected identifier or '('
__NTH (wcstoumax (const __gwchar_t *__restrict nptr,
^
/usr/include/sys/cdefs.h:57:22: note: expanded from macro '__NTH'
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
^
In file included from logging.c:54:
/usr/include/unistd.h:267:20: error: cannot combine with previous
'type-name'
declaration specifier
typedef __intptr_t intptr_t;
^
../gl/stdint.h:229:23: note: expanded from macro 'intptr_t'
#define intptr_t long int
^
In file included from logging.c:54:
/usr/include/unistd.h:267:20: error: 'long type-name' is invalid
../gl/stdint.h:229:18: note: expanded from macro 'intptr_t'
#define intptr_t long int
^
18 errors generated.
More information about the Gnupg-users
mailing list