Control: clone 751054 -2 Control: reassign -2 pidgin-sipe 1.18.1-1 Control: severity -2 serious Control: retitle -2 pidgin-sip: FTBFS - uses -Werror -Wundef with third-party headers
> Michael Tautschnig <m...@debian.org> writes: > > > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -D_FORTIFY_SOURCE=2 > > -Werror -Wall -Wextra -Waggregate-return -Wcast-align > > -Wdeclaration-after-statement -Wdeprecated-declarations -Winit-self > > -Wmaybe-uninitialized -Wmissing-declarations -Wmissing-prototypes > > -Wnested-externs -Wpointer-arith -Wundef -Wunused-but-set-variable > > -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include > > -DLOCALEDIR=\"/usr/share/locale\" -I./../api -I/usr/include/mit-krb5 -g -O2 > > -fstack-protector --param=ssp-buffer-size=4 -Wformat > > -Werror=format-security -c sip-sec-gssapi.c -fPIC -DPIC -o > > .libs/libsipe_core_la-sip-sec-gssapi.o > > In file included from sip-sec-gssapi.c:42:0: > > /usr/include/mit-krb5/gssapi/gssapi.h:47:5: error: "TARGET_OS_MAC" is not > > defined [-Werror=undef] > > #if TARGET_OS_MAC > > ^ > > -Werror=undef is not really a sane compiler flag to try to build with if > you use random third-party headers. Most software does not have -Wundef > cleanliness as an explicit goal, and the machinations that you have to go > through to achieve this are often not trivial. > I tend to agree, hence cloned the bug to get pidgin-sipe to change (as well). > In this specific case, it would probably be fine for the MIT Kerberos code > base to change this line to instead be: > > #if !defined(TARGET_OS_MAC) ^ (Sure? I don't think negation is due here.) > > but it would surprise me if this is the last problem that you run into > along these lines. I would instead remove either -Werror or -Wundef from > your compiler flags or otherwise make -Wundef warnings not a fatal error. > So I do believe that ^\s*#\s*if\s+[a-zA-Z_][a-zA-Z0-9_]*\s*$ is almost always wrong as those should really be #ifdef ... or #if defined(...), but there may be more complex expressions that are wrong as well. Fixing this appears to be a worthwhile (but indeed possibly non-trivial) goal. Best, Michael
pgpgs6VDMPyIS.pgp
Description: PGP signature