Bug 45272

Summary: Warning breaks wocky build on mingw32
Product: Wocky Reporter: Alvaro Soliverez <alvaro.soliverez>
Component: GeneralAssignee: Siraj Razick <siraj>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: Windows (All)   
URL: http://cgit.collabora.com/git/user/siraj/wocky.git/log/?h=mingw32-warn
Whiteboard:
i915 platform: i915 features:

Description Alvaro Soliverez 2012-01-26 07:15:13 UTC
It's throwing this error when building for Windows platform

make[2]: Entering directory `/var/lib/buildbot/telepathy/wocky-win/build/wocky'
/bin/bash ../libtool  --tag=CC   --mode=compile i686-pc-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security -Winit-self -Wno-missing-field-initializers -Wno-unused-parameter -Werror -Wno-error=missing-field-initializers -Wno-error=unused-parameter  -mms-bitfields -I/opt/mingw//usr/i686-pc-mingw32/include/glib-2.0 -I/opt/mingw//usr/i686-pc-mingw32/lib/glib-2.0/include   -DLIBXML_STATIC -I/opt/mingw/usr/i686-pc-mingw32/include/libxml2   -I/opt/mingw/usr/i686-pc-mingw32/include   -I/opt/mingw/usr/i686-pc-mingw32/include -DG_LOG_DOMAIN=\"wocky\" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -MT wocky-tls.lo -MD -MP -MF .deps/wocky-tls.Tpo -c -o wocky-tls.lo wocky-tls.c
libtool: compile:  i686-pc-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security -Winit-self -Wno-missing-field-initializers -Wno-unused-parameter -Werror -Wno-error=missing-field-initializers -Wno-error=unused-parameter -mms-bitfields -I/opt/mingw//usr/i686-pc-mingw32/include/glib-2.0 -I/opt/mingw//usr/i686-pc-mingw32/lib/glib-2.0/include -DLIBXML_STATIC -I/opt/mingw/usr/i686-pc-mingw32/include/libxml2 -I/opt/mingw/usr/i686-pc-mingw32/include -I/opt/mingw/usr/i686-pc-mingw32/include -DG_LOG_DOMAIN=\"wocky\" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -MT wocky-tls.lo -MD -MP -MF .deps/wocky-tls.Tpo -c wocky-tls.c  -DDLL_EXPORT -DPIC -o .libs/wocky-tls.o
wocky-tls.c: In function 'wocky_tls_session_verify_peer':
wocky-tls.c:691:9: error: declaration of '_stat' shadows a global declaration [-Werror=shadow]
cc1: all warnings being treated as errors

make[2]: *** [wocky-tls.lo] Error 1
make[2]: Leaving directory `/var/lib/buildbot/telepathy/wocky-win/build/wocky'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/var/lib/buildbot/telepathy/wocky-win/build/wocky'
make: *** [install-recursive] Error 1
program finished with exit code 2

See here the entire log: http://buildbot.telepathy.im:8010/builders/Wocky%20-%20default%20-%20windows/builds/0/steps/compile/logs/stdio
Comment 1 Siraj Razick 2012-01-26 08:07:44 UTC
(In reply to comment #0)
> It's throwing this error when building for Windows platform
> 
> make[2]: Entering directory `/var/lib/buildbot/telepathy/wocky-win/build/wocky'
> /bin/bash ../libtool  --tag=CC   --mode=compile i686-pc-mingw32-gcc -std=gnu99
> -DHAVE_CONFIG_H -I. -I..    -Wall -Wextra -Wdeclaration-after-statement
> -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare
> -Wnested-externs -Wpointer-arith -Wformat-security -Winit-self
> -Wno-missing-field-initializers -Wno-unused-parameter -Werror
> -Wno-error=missing-field-initializers -Wno-error=unused-parameter 
> -mms-bitfields -I/opt/mingw//usr/i686-pc-mingw32/include/glib-2.0
> -I/opt/mingw//usr/i686-pc-mingw32/lib/glib-2.0/include   -DLIBXML_STATIC
> -I/opt/mingw/usr/i686-pc-mingw32/include/libxml2  
> -I/opt/mingw/usr/i686-pc-mingw32/include  
> -I/opt/mingw/usr/i686-pc-mingw32/include -DG_LOG_DOMAIN=\"wocky\" -O2 -g -pipe
> -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4
> -mms-bitfields -MT wocky-tls.lo -MD -MP -MF .deps/wocky-tls.Tpo -c -o
> wocky-tls.lo wocky-tls.c
> libtool: compile:  i686-pc-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
> -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wstrict-prototypes
> -Wmissing-prototypes -Wsign-compare -Wnested-externs -Wpointer-arith
> -Wformat-security -Winit-self -Wno-missing-field-initializers
> -Wno-unused-parameter -Werror -Wno-error=missing-field-initializers
> -Wno-error=unused-parameter -mms-bitfields
> -I/opt/mingw//usr/i686-pc-mingw32/include/glib-2.0
> -I/opt/mingw//usr/i686-pc-mingw32/lib/glib-2.0/include -DLIBXML_STATIC
> -I/opt/mingw/usr/i686-pc-mingw32/include/libxml2
> -I/opt/mingw/usr/i686-pc-mingw32/include
> -I/opt/mingw/usr/i686-pc-mingw32/include -DG_LOG_DOMAIN=\"wocky\" -O2 -g -pipe
> -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4
> -mms-bitfields -MT wocky-tls.lo -MD -MP -MF .deps/wocky-tls.Tpo -c wocky-tls.c 
> -DDLL_EXPORT -DPIC -o .libs/wocky-tls.o
> wocky-tls.c: In function 'wocky_tls_session_verify_peer':
> wocky-tls.c:691:9: error: declaration of '_stat' shadows a global declaration
> [-Werror=shadow]
> cc1: all warnings being treated as errors
> 
> make[2]: *** [wocky-tls.lo] Error 1
> make[2]: Leaving directory `/var/lib/buildbot/telepathy/wocky-win/build/wocky'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/var/lib/buildbot/telepathy/wocky-win/build/wocky'
> make: *** [install-recursive] Error 1
> program finished with exit code 2
> 
> See here the entire log:
> http://buildbot.telepathy.im:8010/builders/Wocky%20-%20default%20-%20windows/builds/0/steps/compile/logs/stdio

this is due since -Werror is on, I'll fix this today..
Comment 2 Siraj Razick 2012-01-26 12:40:58 UTC
patch for fixing the warnings and

http://cgit.collabora.com/git/user/siraj/wocky.git/commit/?h=mingw32&id=add7ca67b174bf9c0917cc687950814461ae8640 fixes make check from a previous commit.
Comment 3 Siraj Razick 2012-01-27 05:12:26 UTC
updating the patch branch, as discussed on irc
Comment 4 Jonny Lamb 2012-02-01 10:37:27 UTC
Looks good.

I merged this for you as you apparently don't have access. Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.