DevHeads.net

Camotics fails with default Fedora flags GCC9 (cbang)

Hi,

With a new version of GCC errors are blocking the build at various places. Not sure how serious the issue is. Should I just add the compiler flags to get through the build?

Upstream issue:
<a href="https://github.com/CauldronDevelopmentLLC/cbang/issues/29#issuecomment-459673777" title="https://github.com/CauldronDevelopmentLLC/cbang/issues/29#issuecomment-459673777">https://github.com/CauldronDevelopmentLLC/cbang/issues/29#issuecomment-4...</a>

Comments

Re: Camotics fails with default Fedora flags GCC9 (cbang)

By Jakub Jelinek at 02/02/2019 - 05:59

On Sat, Feb 02, 2019 at 08:57:42AM -0000, Samuel Rakitničan wrote:
Guess the important question is, is the warning correct or not?
If it is correct, certainly fix the code, if it is a false positive, either
find a workaround, turn the warning off (locally or globally) or don't build
wiht -Werror (or turn the particular warning into a warning only, say
-Werror -Wno-error=whatever). Warnings do have false positives and with
-Werror you need to be prepared to work around the warnings any time new
ones appear, typically -Werror is a good fit only for some projects and only
for development builds.

Jakub

Re: Camotics fails with default Fedora flags GCC9 (cbang)

By =?utf-8?q?Samue... at 02/02/2019 - 08:02

The easiest would be to just disable -Werror because it doesn't help me personally. Not sure if that is allowed by Fedora Packaging guidelines, though.

Re: Camotics fails with default Fedora flags GCC9 (cbang)

By Richard Shaw at 02/02/2019 - 09:06

On Sat, Feb 2, 2019 at 7:02 AM Samuel Rakitničan <

$ rpm -E %optflags
-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection

The only required one seems to be for "format-security"...

Thanks,
Richard

Re: Camotics fails with default Fedora flags GCC9 (cbang)

By =?utf-8?q?Samue... at 02/03/2019 - 14:29

Right, -Werror is added by build script with debug option turned on that I forgot about. Sorry for the noise.