ytrstu / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

Building with GCC 4.7.3 on x86_32 fails due to warnings in lzo/minilzo.c #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

I'm trying to build distcc 'master' from SVN (r791), with GCC 4.7.3, on x86_32.

I get the following errors:

gcc -DHAVE_CONFIG_H -D_GNU_SOURCE -DSYSCONFDIR="\"/usr/etc\"" 
-DPKGDATADIR="\"/usr/share/distcc\"" -Isrc -I"./src" -I"./lzo" -I"./popt" 
-Werror -g -O2 -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith -Wcast-align 
-Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes 
-Wnested-externs -Wmissing-declarations -Wuninitialized -pthread -o 
lzo/minilzo.o -c lzo/minilzo.c
lzo/minilzo.c: In function '_lzo_config_check':
lzo/minilzo.c:1217:6: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]
lzo/minilzo.c:1240:6: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]
cc1: all warnings being treated as errors
make: *** [lzo/minilzo.o] Error 1

If I configure with --disable-Werror, the build succeeds, but obviously I'd 
prefer to not have to do this.

Original issue reported on code.google.com by sss...@gmail.com on 17 Apr 2014 at 2:46

GoogleCodeExporter commented 9 years ago
Same Problem on a virtual Ubuntu 14.04 x64 machine and on the RaspberryPi with 
Archlinux (Image from 2014-06-01). Any ideas?

Original comment by raphi.winti on 25 Jun 2014 at 12:08

GoogleCodeExporter commented 9 years ago
The work-around is to configure with --disable-Werror.

The way to fix it is to use memcpy() rather than type casting to do these 
copies.

Original comment by fer...@google.com on 25 Jun 2014 at 12:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r795.

Original comment by mand...@gmail.com on 29 Jul 2014 at 5:42