Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 624090

Summary: sys-apps/fwupd-0.9.5 fails to build with gcc-4.9.4
Product: Gentoo Linux Reporter: Jan Fikar <j.fikar>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED WONTFIX    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 495124    
Attachments: initial build.log
build.log with -std=gnu11

Description Jan Fikar 2017-07-07 09:27:33 UTC
Is fwupd supposed to work with gcc-4.9? The problem is that gcc-5 default C mode is -std=gnu11 instead of -std=gnu89. Perhaps we need to supply CFLAGS=-std=gnu11 to make it work with gcc-4.9?

Relevant part of build.log:
...
../fwupd-0.9.5/plugins/unifying/fu-plugin-unifying.c: In function 'fu_plugin_unifying_device_added':
../fwupd-0.9.5/plugins/unifying/fu-plugin-unifying.c:71:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (guint i = 0; i < guids->len; i++) {
  ^
../fwupd-0.9.5/plugins/unifying/fu-plugin-unifying.c:71:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
...

With -std=gnu11 I'm getting another error, so it is apparently not that simple:
...
/fwupd-0.9.5/plugins/amt/fu-plugin-amt.c
../fwupd-0.9.5/plugins/amt/fu-plugin-amt.c:239:52: error: initializer element is not constant
     0xac, 0xa8, 0x46, 0xe0, 0xff, 0x65, 0x81, 0x4c);
...
Comment 1 Jan Fikar 2017-07-07 09:28:25 UTC
Created attachment 481496 [details]
initial build.log
Comment 2 Jan Fikar 2017-07-07 09:29:29 UTC
Created attachment 481498 [details]
build.log with -std=gnu11
Comment 3 Andreas Sturmlechner gentoo-dev 2019-02-25 23:27:41 UTC
Closing this as anything below <gcc-6.4.0-r1 has been masked and is unsupported.