Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 624090 - sys-apps/fwupd-0.9.5 fails to build with gcc-4.9.4
Summary: sys-apps/fwupd-0.9.5 fails to build with gcc-4.9.4
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.9
  Show dependency tree
 
Reported: 2017-07-07 09:27 UTC by Jan Fikar
Modified: 2019-02-25 23:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
initial build.log (build.log,19.75 KB, text/x-log)
2017-07-07 09:28 UTC, Jan Fikar
Details
build.log with -std=gnu11 (build.log,195.21 KB, text/x-log)
2017-07-07 09:29 UTC, Jan Fikar
Details

Note You need to log in before you can comment on or make changes to this bug.
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.