Description of problem: With GCC update to version 7, I'm not able to build the newest squid only on arm arch. On all other archs, build succeeded. https://koji.fedoraproject.org/koji/taskinfo?taskID=18814683 Version-Release number of selected component (if applicable): gcc-c++-7.0.1-0.13.fc27.armv7hl How reproducible: Try to build newest squid package in Fedora RAWHIDE Steps to Reproduce: 1. fedpkg clone squid 2. fedpkg build --scratch 3. Actual results: Squid build fails only on ARM Expected results: Squid build succeeded on all archs Additional info: Problem also occurred, when I reserved ARM machine and manually tried to compile HttpMsg.cc: # make HttpMsg.o armv7hl-redhat-linux-gnueabi-g++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/etc/squid/squid.conf\" -DDEFAULT_SQUID_DATA_DIR=\"/usr/share/squid\" -DDEFAULT_SQUID_CONFIG_DIR=\"/etc/squid\" -I.. -I../include -I../lib -I../src -I../include -I../src -I/usr/include/libxml2 -I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Woverloaded-virtual -Werror -pipe -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fPIC -save-temps -c -o HttpMsg.o HttpMsg.cc armv7hl-redhat-linux-gnueabi-g++: warning: -pipe ignored because -save-temps specified In file included from http/one/Parser.h:12:0, from HttpMsg.cc:13: ../src/anyp/ProtocolVersion.h: In constructor ‘HttpMsg::HttpMsg(http_hdr_owner_type)’: ../src/anyp/ProtocolVersion.h:34:83: error: ‘<anonymous>’ is used uninitialized in this function [-Werror=uninitialized] ProtocolVersion(ProtocolType which, unsigned int aMajor, unsigned int aMinor) : protocol(which) { ^ ../src/anyp/ProtocolVersion.h: In constructor ‘HttpMsg::HttpMsg(http_hdr_owner_type)’: ../src/anyp/ProtocolVersion.h:34:83: error: ‘<anonymous>’ is used uninitialized in this function [-Werror=uninitialized] ProtocolVersion(ProtocolType which, unsigned int aMajor, unsigned int aMinor) : protocol(which) { ^ cc1plus: all warnings being treated as errors I'm attaching HttpMsg.cc , HttpMsg.ii and /src/anyp/ProtocolVersion.h files.
Created attachment 1269339 [details] HttpMsg.ii
Don't use -Werror if you are not prepared to deal with warnings? Some warnings have even false positives, if you use -Werror, you need to be prepared to work around those too.
Created attachment 1269341 [details] HttpReply.ii
Created attachment 1269343 [details] ProtocolVersion.h
This option is in this project enabled by default and it is NOT recommended to remove this option by upstream. It was working with this options for many years, and with update to GCC7 it stopped. If it is error raised on all arches, It would be weird and I could try to find a workaround, but in this case, this "false-positive" warning is thrown only on arm arch. I'm not sure, if it is correct approach, to disable -Werror only because there is just one weird error on arm arch. Even I tried to look at that warning, but I was not able to find anything, what could cause this warning. If I disable -Werror even for ARM arch, I can overlook some true warnings on this arch.
I opened PR80344 which has the reduced testcase.
Should be fixed already in gcc-7.1.1-1.fc{26,27}.
gcc-7.1.1-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-553e01aac0
gcc-7.1.1-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-553e01aac0
gcc-7.1.1-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.