Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628256 - gnome-base/libgtop-2.36.0: sysinfo.c:54:2: loop initial declarations are only allowed in C99 or C11 mode for (char** this_proc = &processors[0]; *this_proc && **this_proc; this_proc++) {
Summary: gnome-base/libgtop-2.36.0: sysinfo.c:54:2: loop initial declarations are only...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gnome-3.24
  Show dependency tree
 
Reported: 2017-08-19 04:42 UTC by Anton Kochkov
Modified: 2017-09-01 07:19 UTC (History)
0 users

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


Attachments
full build log (libgtop_build.log,44.10 KB, text/x-log)
2017-08-19 04:42 UTC, Anton Kochkov
Details
emerge --info output (emerge_info.log,6.39 KB, text/x-log)
2017-08-19 04:43 UTC, Anton Kochkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Kochkov 2017-08-19 04:42:47 UTC
Created attachment 489574 [details]
full build log

[01m[Kprocmap.c:139:12:[m[K [01;35m[Kwarning: [m[Kunused variable ‘[01m[Knext[m[K’ [-Wunused-variable]
  char *p, *next;
[01;32m[K            ^[m[K
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -march=corei7-avx -pipe -c netload.c  -fPIC -DPIC -o .libs/netload.o
[01m[Ksysinfo.c:[m[K In function ‘[01m[Kinit_sysinfo[m[K’:
[01m[Ksysinfo.c:54:2:[m[K [01;31m[Kerror: [m[K‘[01m[Kfor[m[K’ loop initial declarations are only allowed in C99 or C11 mode
  for (char** this_proc = &processors[0]; *this_proc && **this_proc; this_proc++) {
[01;32m[K  ^[m[K
[01m[Ksysinfo.c:54:2:[m[K [01;36m[Knote: [m[Kuse option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
make[3]: *** [Makefile:527: sysinfo.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/linux -I../../include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Winline -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -march=corei7-avx -pipe -c ppp.c  -fPIC -DPIC -o .libs/ppp.o
[01m[Knetload.c:[m[K In function ‘[01m[Klinux_2_0_stats[m[K’:
[01m[Knetload.c:275:5:[m[K [01;35m[Kwarning: [m[Kignoring return value of ‘[01m[Kfgets[m[K’, declared with attribute warn_unused_result [-Wunused-result]
     fgets (buffer, BUFSIZ-1, f);
[01;32m[K     ^[m[K
[01m[Knetload.c:[m[K In function ‘[01m[Klinux_2_4_stats[m[K’:
[01m[Knetload.c:356:5:[m[K [01;35m[Kwarning: [m[Kignoring return value of ‘[01m[Kfgets[m[K’, declared with attribute warn_unused_result [-Wunused-result]
     fgets (buffer, BUFSIZ-1, f);
[01;32m[K     ^[m[K
[01m[Knetload.c:357:5:[m[K [01;35m[Kwarning: [m[Kignoring return value of ‘[01m[Kfgets[m[K’, declared with attribute warn_unused_result [-Wunused-result]
     fgets (buffer, BUFSIZ-1, f);
[01;32m[K     ^[m[K
make[3]: Leaving directory '/var/tmp/portage/gnome-base/libgtop-2.36.0/work/libgtop-2.36.0/sysdeps/linux'
make[2]: *** [Makefile:428: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/gnome-base/libgtop-2.36.0/work/libgtop-2.36.0/sysdeps'
make[1]: *** [Makefile:569: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/gnome-base/libgtop-2.36.0/work/libgtop-2.36.0'
make: *** [Makefile:453: all] Error 2
Comment 1 Anton Kochkov 2017-08-19 04:43:32 UTC
Created attachment 489576 [details]
emerge --info output
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-08-19 09:17:17 UTC
This is most likely due to using GCC 4.9. I don't know what's the current policy on supporting older stable GCC so I'll wait to team members' opinion.
Comment 3 Pacho Ramos gentoo-dev 2017-08-30 17:37:28 UTC
Personally I would force people to run current stable gcc at least :/ (even other distributions are starting to work with gcc7 at this time)
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-09-01 07:19:20 UTC
commit 3cc464a39d524238117c76c99c9803b973c201df
Date:   Fri Sep 1 08:18:50 2017 +0200

    gnome-base/libgtop: fix build with gcc-4, bug ##628256
    
    Package-Manager: Portage-2.3.8, Repoman-2.3.3


Applied c99 as this is what gcc-5 switched to.