Xen build error based on gcc version
Specific gcc versions seem to have trouble and error out on:
(xen/tools/symbols.c)
symbols.c:84: error: ignoring return value of 'fgets', declared with attribute warn_unused_result
It has been reported to xen-users are a few occasions, with different versions of Xen. [1][2][3] Presumably different gcc versions since two of them are older posts and on different versions of Xen.
I just ran across it on Ubuntu 8.10 gcc version 4.3.2 compiling xen-unstable.
If I switch the compiler to 3.4 or 4.2 it compiles fine.
It is a gcc problem or a problem with the Xen code?
Cheers,
Todd
[1] http://xen.markmail.org/search/?q=fgets symbol.c#query:fgets symbol.c+page:1+mid:hzvevwa6e6jcunul+state:results
[2] http://xen.markmail.org/search/?q=fgets symbol.c#query:fgets symbol.c from%3A"Zoran Kikic"+page:1+mid:3icw4rdteaco6kmf+state:results
[3] http://xen.markmail.org/search/?q=fgets symbol.c#query:fgets symbol.c from%3A"Zoran Kikic"+page:1+mid:nwiob3nl42u2dxq3+state:results
Signature · 3 lines
Todd Deshane http://todddeshane.net http://runningxen.com
I'll try and get gcc 4.3.2 running myself tomorrow and fix any problems I find.
-- Keir
Quoted 30 lines · Todd Deshane
Specific gcc versions seem to have trouble and error out on:
(
xen/tools/symbols.c)symbols.c:84: error: ignoring return value of 'fgets', declared with attribute
warn_unused_resultIt has been reported to xen-users are a few occasions, with different versions of Xen. [1][2][3] Presumably different gcc versions since two of them are older posts and on different versions of Xen.
I just ran across it on Ubuntu 8.10 gcc version 4.3.2 compiling xen-unstable.
If I switch the compiler to 3.4 or 4.2 it compiles fine.
It is a gcc problem or a problem with the Xen code?
Cheers,
Todd[1] http://xen.markmail.org/search/?q=fgets symbol.c#query:fgets symbol.c+page:1+mid:hzvevwa6e6jcunul+state:results
[2] http://xen.markmail.org/search/?q=fgets symbol.c#query:fgets
symbol.cfrom%3A"Zoran Kikic"+page:1+mid:3icw4rdteaco6kmf+state:results[3] http://xen.markmail.org/search/?q=fgets symbol.c#query:fgets
symbol.cfrom%3A"Zoran Kikic"+page:1+mid:nwiob3nl42u2dxq3+state:results
Quoted 3 lines · Todd Deshane
If I switch the compiler to 3.4 or 4.2 it compiles fine.
It is a gcc problem or a problem with the Xen code?
Looks like it's a problem with Ubuntu asserting _FORTIFY_SOURCE=2 in some cases. At least this build failure is easy to fix, so I will check in a patch.
-- Keir
Quoted 10 lines · Keir Fraser
Quoted 3 lines · Todd Deshane
If I switch the compiler to 3.4 or 4.2 it compiles fine.
It is a gcc problem or a problem with the Xen code?
Looks like it's a problem with Ubuntu asserting _FORTIFY_SOURCE=2 in some cases. At least this build failure is easy to fix, so I will check in a patch.
I just pulled the latest xen-unstable today.
The 4.3 compiler still give errors during build.
Falling back to 4.2 is fine.
Here is the tail of the error log on the 4.3 compiler. [this is the default gcc compiler on Ubuntu 8.10]
(I tried a make tools)
Make[5]: Entering directory `/home/deshantm/src/xen-src/xen-unstable.hg/tools/xenstat/libxenstat' gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Isrc -I../../../tools/libxc -I../../../tools/xenstore -I../../../tools/include -Wall -Werror -c -o src/xenstat.o src/xenstat.c
gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Isrc -I../../../tools/libxc -I../../../tools/xenstore -I../../../tools/include -Wall -Werror -c -o src/xenstat_linux.o src/xenstat_linux.c
ar rc src/libxenstat.a src/xenstat.o src/xenstat_linux.o ../../../tools/xenstore/libxenstore.so ../../../tools/libxc/libxenctrl.so
ranlib src/libxenstat.a
make[5]: Leaving directory /home/deshantm/src/xen-src/xen-unstable.hg/tools/xenstat/libxenstat' make[4]: Leaving directory /home/deshantm/src/xen-src/xen-unstable.hg/tools/xenstat' make[4]: Entering directory `/home/deshantm/src/xen-src/xen-unstable.hg/tools/xenstat'
make -C xentop install
make[5]: Entering directory `/home/deshantm/src/xen-src/xen-unstable.hg/tools/xenstat/xentop' gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DGCC_PRINTF -Wall -Werror -I../../../tools/xenstat/libxenstat/src -DHOST_Linux -L../../../tools/xenstat/libxenstat/src xentop.c -lxenstat -lncurses
-o xentop
cc1: warnings being treated as errorsxentop.c: In function 'fail':
xentop.c:257: error: format not a string literal and no format arguments make[5]: *** [xentop] Error 1
make[5]: Leaving directory `/home/deshantm/src/xen-src/xen-unstable.hg/tools/xenstat/xentop' make[4]: *** [subdir-install-xentop] Error 2
make[4]: Leaving directory `/home/deshantm/src/xen-src/xen-unstable.hg/tools/xenstat' make[3]: *** [subdirs-install] Error 2
make[3]: Leaving directory `/home/deshantm/src/xen-src/xen-unstable.hg/tools/xenstat' make[2]: *** [subdir-install-xenstat] Error 2
make[2]: Leaving directory `/home/deshantm/src/xen-src/xen-unstable.hg/tools' make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/home/deshantm/src/xen-src/xen-unstable.hg/tools'
make: *** [install-tools] Error 2
Signature · 3 lines
Todd Deshane http://todddeshane.net http://runningxen.com
Quoted 7 lines · Todd Deshane
I just pulled the latest xen-unstable today.
The 4.3 compiler still give errors during build.
Falling back to 4.2 is fine.Here is the tail of the error log on the 4.3 compiler. [this is the default gcc compiler on Ubuntu 8.10]
Fixed by changeset 18912.
-- Keir
Quoted 4 lines · Keir Fraser
Quoted 2 lines · Todd Deshane
I just pulled the latest xen-unstable today.
Quoted 8 lines
Quoted 5 lines
The 4.3 compiler still give errors during build.
Falling back to 4.2 is fine.Here is the tail of the error log on the 4.3 compiler. [this is the default gcc compiler on Ubuntu 8.10]
Fixed by changeset 18912.
I just pulled the latest staging tree, which seems to fix that compile error that I mentioned, but a new one is found.
(make tools)
The tail of the error log is here:
*** PCI passthrough capability has been enabled ***
*** PCI passthrough capability has been enabled ***
make[4]: Entering directory `/home/deshantm/src/xen-src/staging/xen-unstable.hg/tools/ioemu-remote/i386-dm' /home/deshantm/src/xen-src/staging/xen-unstable.hg//tools/cross-install
-d -m0755 -p "/home/deshantm/src/xen-src/staging/xen-unstable.hg/dist/install//usr/lib64/xen/bin" /home/deshantm/src/xen-src/staging/xen-unstable.hg//tools/cross-install
-d -m0755 -p "/home/deshantm/src/xen-src/staging/xen-unstable.hg/dist/install//etc/xen" /home/deshantm/src/xen-src/staging/xen-unstable.hg//tools/cross-install
-m0755 -p qemu-ifup "/home/deshantm/src/xen-src/staging/xen-unstable.hg/dist/install//etc/xen/" /home/deshantm/src/xen-src/staging/xen-unstable.hg//tools/cross-install
-m 755 -s qemu-dm "/home/deshantm/src/xen-src/staging/xen-unstable.hg/dist/install/usr/lib64/xen/bin" make[4]: Leaving directory /home/deshantm/src/xen-src/staging/xen-unstable.hg/tools/ioemu-remote/i386-dm' make[3]: Leaving directory /home/deshantm/src/xen-src/staging/xen-unstable.hg/tools/ioemu-remote'
make[2]: Leaving directory `/home/deshantm/src/xen-src/staging/xen-unstable.hg/tools'
make[2]: Entering directory `/home/deshantm/src/xen-src/staging/xen-unstable.hg/tools'
make -C xenpmd install
make[3]: Entering directory `/home/deshantm/src/xen-src/staging/xen-unstable.hg/tools/xenpmd'
gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99
-Wall -Wstrict-prototypes -Wno-unused-value
-Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Werror -I../../tools/xenstore
-I../../tools/include -L../../tools/xenstore -lxenstore xenpmd.c
-o xenpmd
cc1: warnings being treated as errors
In function 'fgets',
inlined from 'get_next_battery_info_or_status' at xenpmd.c:310:/usr/include/bits/stdio2.h:253: error: call to '__fgets_chk_warn'
declared with attribute warning: fgets called with bigger size than
length of destination buffer
make[3]: *** [xenpmd] Error 1
make[3]: Leaving directory `/home/deshantm/src/xen-src/staging/xen-unstable.hg/tools/xenpmd'
make[2]: *** [subdir-install-xenpmd] Error 2
make[2]: Leaving directory `/home/deshantm/src/xen-src/staging/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/home/deshantm/src/xen-src/staging/xen-unstable.hg/tools'
make: *** [install-tools] Error 2
Cheers,
Todd
Signature · 3 lines
Todd Deshane http://todddeshane.net http://runningxen.com
Quoted 9 lines · Todd Deshane
Quoted 2 lines
Fixed by changeset 18912.
I just pulled the latest staging tree, which seems to fix that compile error that I mentioned, but a new one is found.
(make tools)The tail of the error log is here:
Fixed by changeset 18917.
-- Keir
Quoted 5 lines · Keir Fraser
Quoted 3 lines · Todd Deshane
Quoted 2 lines
Fixed by changeset 18912.
Quoted 9 lines
Quoted 6 lines
I just pulled the latest staging tree, which seems to fix that compile error that I mentioned, but a new one is found.
(make tools)The tail of the error log is here:
Fixed by changeset 18917.
Nice.
Thanks Keir!
I just also tested make stubdom and make docs, both work too. anything else in make world (besides the kernels)?
Quick question: How often does the script run from staging to the normal xen-unstable tree run?
Cheers,
Todd
Signature · 3 lines
Todd Deshane http://todddeshane.net http://runningxen.com
Quoted 5 lines · Todd Deshane
I just also tested make stubdom and make docs, both work too. anything else in make world (besides the kernels)?
Quick question: How often does the script run from staging to the normal xen-unstable tree run?
When the tests are successful, the tree usually gets pushed within 12 hours. At the moment I'm pushing manually from time to time.
-- Keir