Package: src:xen Version: 4.8.1~pre.2017.01.23-1 Severity: normal Tags: sid buster User: debian-gcc at lists.debian.org Usertags: ftbfs-gcc-7 Please keep this issue open in the bug tracker for the package it was filed for. If a fix in another package is required, please file a bug for the other package (or clone), and add a block in this package. Please keep the issue open until the package can be built in a follow-up test rebuild. The package fails to build in a test rebuild on at least amd64 with gcc-7/g++-7, but succeeds to build with gcc-6/g++-6. The severity of this report may be raised before the buster release. There is no need to fix this issue in time for the stretch release. The full build log can be found at: http://people.debian.org/~doko/logs/gcc7-20170126/xen_4.8.1~pre.2017.01.23-1_unstable_gcc7.log The last lines of the build log are at the end of this report. To build with GCC 7, either set CC=gcc-7 CXX=g++-7 explicitly, or install the gcc, g++, gfortran, ... packages from experimental. apt-get -t=experimental install g++ Common build failures are new warnings resulting in build failures with -Werror turned on, or new/dropped symbols in Debian symbols files. For other C/C++ related build failures see the porting guide at http://gcc.gnu.org/gcc-7/porting_to.html [...] gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 -fomit-frame-pointer -nostdinc -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -include /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/config.h '-D__OBJECT_FILE__="runtime.o"' -Wa,--strip-local-absolute -MMD -MF ./.runtime.o.d -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-generic -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-default '-D__OBJECT_LABEL__=arch$x86$efi$runtime.o' -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -DHAVE_GAS_VMX -DHAVE_GAS_SSE4_2 -DHAVE_GAS_EPT -DHAVE_GAS_FSGSBASE -U__OBJECT_LABEL__ -DHAVE_GAS_QUOTED_SYM '-D__OBJECT_LABEL__=arch/x86/efi/runtime.o' -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -fshort-wchar -c runtime.c -o runtime.o gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 -fomit-frame-pointer -nostdinc -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -include /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/config.h '-D__OBJECT_FILE__="compat.o"' -Wa,--strip-local-absolute -MMD -MF ./.compat.o.d -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-generic -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-default '-D__OBJECT_LABEL__=arch$x86$efi$compat.o' -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -DHAVE_GAS_VMX -DHAVE_GAS_SSE4_2 -DHAVE_GAS_EPT -DHAVE_GAS_FSGSBASE -U__OBJECT_LABEL__ -DHAVE_GAS_QUOTED_SYM '-D__OBJECT_LABEL__=arch/x86/efi/compat.o' -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -fshort-wchar -c compat.c -o compat.o In file included from /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/uaccess.h:12:0, from /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/guest_access.h:10, from /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/guest_access.h:10, from compat.c:1: runtime.c: In function 'efi_compat_get_info': /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/x86_64/uaccess.h:56:37: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] compat_access_ok(addr, (count) * (size))) ^ /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/x86_64/uaccess.h:46:22: note: in definition of macro '__compat_addr_ok' ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(d)) ^~~~ /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/x86_64/uaccess.h:52:5: note: in expansion of macro '__compat_access_ok' __compat_access_ok(current->domain, addr, size) ^~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/x86_64/uaccess.h:56:6: note: in expansion of macro 'compat_access_ok' compat_access_ok(addr, (count) * (size))) ^~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/compat.h:98:5: note: in expansion of macro 'compat_array_access_ok' compat_array_access_ok((void *)(full_ptr_t)(hnd).c, (nr), \ ^~~~~~~~~~~~~~~~~~~~~~ compat.c:19:27: note: in expansion of macro 'compat_handle_okay' #define guest_handle_okay compat_handle_okay ^~~~~~~~~~~~~~~~~~ runtime.c:221:15: note: in expansion of macro 'guest_handle_okay' if ( !guest_handle_okay(guest_handle_cast(info->vendor.name, ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/Rules.mk:178: recipe for target 'compat.o' failed make[6]: *** [compat.o] Error 1 make[6]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/arch/x86/efi' /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/Rules.mk:166: recipe for target '/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/arch/x86/efi/built_in.o' failed make[5]: *** [/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/arch/x86/efi/built_in.o] Error 2 make[5]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/arch/x86' Makefile:135: recipe for target '/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/xen' failed make[4]: *** [/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/xen] Error 2 make[4]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen' Makefile:45: recipe for target 'build' failed make[3]: *** [build] Error 2 make[3]: Leaving directory '/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen' debian/rules.real:90: recipe for target 'debian/stamps/build-hypervisor_amd64_amd64' failed make[2]: *** [debian/stamps/build-hypervisor_amd64_amd64] Error 2 make[2]: Leaving directory '/<<PKGBUILDDIR>>' debian/rules.gen:50: recipe for target 'build-arch_amd64_none_amd64' failed make[1]: *** [build-arch_amd64_none_amd64] Error 2 make[1]: Leaving directory '/<<PKGBUILDDIR>>' debian/rules:20: recipe for target 'build-arch' failed make: *** [build-arch] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2
Matthias Klose of the Debian Project reports that the Xen package in Debian stretch, which is based on a snapshot of xen.git#stable-4.8, does not build with GCC-7. Matthias Klose writes ("Bug#853710: xen: ftbfs with GCC-7"):> The package fails to build in a test rebuild on at least amd64 with > gcc-7/g++-7, but succeeds to build with gcc-6/g++-6. The > severity of this report may be raised before the buster release. > There is no need to fix this issue in time for the stretch release. > > The full build log can be found at: > http://people.debian.org/~doko/logs/gcc7-20170126/xen_4.8.1~pre.2017.01.23-1_unstable_gcc7.log > The last lines of the build log are at the end of this report....> gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 -fomit-frame-pointer -nostdinc -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -include /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/config.h '-D__OBJECT_FILE__="compat.o"' -Wa,--strip-local-absolute -MMD -MF ./.compat.o.d -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-generic -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x86/mach-default '-D__OBJECT_LABEL__=arch$x86$efi$compat.o' -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -DHAVE_GAS_VMX -DHAVE_GAS_SSE4_2 -DHAVE_GAS_EPT -DHAVE_GAS_FSGSBASE -U__OBJECT_LABEL__ -DHAVE_GAS_QUOTED_SYM '-D__OBJECT_LABEL__=arch/x86/efi/compat.o' -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -fshort-wchar -c compat.c -o compat.o > In file included from /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/uaccess.h:12:0, > from /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/guest_access.h:10, > from /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/guest_access.h:10, > from compat.c:1: > runtime.c: In function 'efi_compat_get_info': > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/x86_64/uaccess.h:56:37: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] > compat_access_ok(addr, (count) * (size)))I looked at the code and the macros at the root of the message are these: #define compat_array_access_ok(addr,count,size) \ (likely((count) < (~0U / (size))) && \ compat_access_ok(addr, (count) * (size))) #define __compat_access_ok(d, addr, size) \ __compat_addr_ok(d, (unsigned long)(addr) + ((size) ? (size) - 1 : 0)) This expands to, effectively (and stripping extra parents etc.) addr + (count*size ? count*size - 1 : 0) GCC-7 is complaining about count*size (ie, the result of a multiplication) being used as a boolean (ie, for the ?: conditional). I think the compiler is simply wrong to complain about this. Such idioms must be extremely common. Ian.
Jan Beulich
2017-Jan-31 12:40 UTC
[Pkg-xen-devel] Bug#853710: [Xen-devel] Bug#853710: xen: ftbfs with GCC-7
>>> On 31.01.17 at 13:09, <ian.jackson at eu.citrix.com> wrote: > Matthias Klose of the Debian Project reports that the Xen package in > Debian stretch, which is based on a snapshot of xen.git#stable-4.8, > does not build with GCC-7. > > Matthias Klose writes ("Bug#853710: xen: ftbfs with GCC-7"): >> The package fails to build in a test rebuild on at least amd64 with >> gcc-7/g++-7, but succeeds to build with gcc-6/g++-6. The >> severity of this report may be raised before the buster release. >> There is no need to fix this issue in time for the stretch release. >> >> The full build log can be found at: >> > http://people.debian.org/~doko/logs/gcc7-20170126/xen_4.8.1~pre.2017.01.23-1_ > unstable_gcc7.log >> The last lines of the build log are at the end of this report. > ... >> gcc -m64 -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall > -Wstrict-prototypes -Wdeclaration-after-statement > -Wno-unused-but-set-variable -Wno-unused-local-typedefs -O2 > -fomit-frame-pointer -nostdinc -fno-builtin -fno-common -Werror > -Wredundant-decls -Wno-pointer-arith -pipe -g -D__XEN__ -include > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/co > nfig.h '-D__OBJECT_FILE__="compat.o"' -Wa,--strip-local-absolute -MMD -MF > ./.compat.o.d > -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include > -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm-x8 > 6/mach-generic > -I/<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm- > x86/mach-default '-D__OBJECT_LABEL__=arch$x86$efi$compat.o' -msoft-float > -fno-stack-protector -fno-exceptions -Wnested-externs -DHAVE_GAS_VMX > -DHAVE_GAS_SSE4_2 -DHAVE_GAS_EPT -DHAVE_GAS_FSGSBASE -U__OBJECT_LABEL__ > -DHAVE_GAS_QUOTED_SYM '-D__OBJECT_LABEL__=arch/x86/efi/compat.o' > -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables > -DGCC_HAS_VISIBILITY_ATTRIBUTE -fshort-wchar -c compat.c -o compat.o >> In file included from > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/ua > ccess.h:12:0, >> from > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/gu > est_access.h:10, >> from > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/xen/gu > est_access.h:10, >> from compat.c:1: >> runtime.c: In function 'efi_compat_get_info': >> > /<<PKGBUILDDIR>>/debian/build/build-hypervisor_amd64_amd64/xen/include/asm/x86_64 > /uaccess.h:56:37: error: '*' in boolean context, suggest '&&' instead > [-Werror=int-in-bool-context] >> compat_access_ok(addr, (count) * (size))) > > I looked at the code and the macros at the root of the message are > these: > > #define compat_array_access_ok(addr,count,size) \ > (likely((count) < (~0U / (size))) && \ > compat_access_ok(addr, (count) * (size))) > > #define __compat_access_ok(d, addr, size) \ > __compat_addr_ok(d, (unsigned long)(addr) + ((size) ? (size) - 1 : 0)) > > This expands to, effectively (and stripping extra parents etc.) > > addr + (count*size ? count*size - 1 : 0) > > GCC-7 is complaining about count*size (ie, the result of a > multiplication) being used as a boolean (ie, for the ?: conditional). > > I think the compiler is simply wrong to complain about this. Such > idioms must be extremely common.Indeed. They should report this against gcc. Jan
> I think the compiler is simply wrong to complain about this.If you are going to build with options like "-Wall -Werror" then you have to expect the compiler to be bitchy. You should be able to make this particular warning non-fatal by adding -Wno-error=int-in-bool-context -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20180111/1aca5b60/attachment.html>
Hans van Kranenburg
2018-Jan-11 21:42 UTC
[Pkg-xen-devel] Bug#853710: Bug#853710: xen: ftbfs with GCC-7
Hey, On 11/01/2018 18:59, peter green wrote:>> I think the compiler is simply wrong to complain about this. > If you are going to build with options like "-Wall -Werror" then you > have to expect the compiler to be bitchy. You should be able to make > this particular warning non-fatal by adding -Wno-error=int-in-bool-contextThanks for the help. First thing that's going to happen to Xen in Debian unstable is moving to Xen 4.10, which compiles fine with gcc-7. If I point my pbuilder (debian unstable) at the current package that's in the archive, it indeed explodes halfway: xenlockprof.c: In function 'main': xenlockprof.c:100:53: error: '%s' directive writing up to 39 bytes into a region of size between 17 and 37 [-Werror=format-overflow=] sprintf(name, "unknown type(%d) %d lock %s", data[j].type, ^~ xenlockprof.c:100:13: note: 'sprintf' output between 24 and 83 bytes into a destination of size 60 sprintf(name, "unknown type(%d) %d lock %s", data[j].type, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ data[j].idx, data[j].name); ~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors So, FWIW, I think we can close this case, since buster will definitely not ship with Xen 4.8 but newer. Thanks, Hans
Hans van Kranenburg
2018-Jan-11 22:01 UTC
[Pkg-xen-devel] Bug#853710: Bug#853710: xen: ftbfs with GCC-7
On 11/01/2018 22:42, Hans van Kranenburg wrote:> Hey, > > On 11/01/2018 18:59, peter green wrote: >>> I think the compiler is simply wrong to complain about this. >> If you are going to build with options like "-Wall -Werror" then you >> have to expect the compiler to be bitchy. You should be able to make >> this particular warning non-fatal by adding -Wno-error=int-in-bool-context > > Thanks for the help. > > First thing that's going to happen to Xen in Debian unstable is moving > to Xen 4.10, which compiles fine with gcc-7. > > If I point my pbuilder (debian unstable) at the current package that's > in the archive, it indeed explodes halfway: > > xenlockprof.c: In function 'main': > xenlockprof.c:100:53: error: '%s' directive writing up to 39 bytes into > a region of size between 17 and 37 [-Werror=format-overflow=] > sprintf(name, "unknown type(%d) %d lock %s", data[j].type, > ^~ > xenlockprof.c:100:13: note: 'sprintf' output between 24 and 83 bytes > into a destination of size 60 > sprintf(name, "unknown type(%d) %d lock %s", data[j].type, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > data[j].idx, data[j].name); > ~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errorsActually, this is a different error, which looks a bit like a buffer overflow type of thing? I'm not a C code compile hero (yet?), just started out helping on the Xen team. So maybe someone else can better comment on this specific thing.> So, FWIW, I think we can close this case, since buster will definitely > not ship with Xen 4.8 but newer.Or maybe we're allowed to close it when the new upload is being done, and you want to have it open until then? In that case there's no way it'll slip through. Just wanted to let know that during the preparations of upgrading the package to Xen 4.10 I have been able to build successfully targeting unstable so far. Thanks, Hans
Emilio Pozuelo Monfort
2018-May-18 06:08 UTC
[Pkg-xen-devel] Bug#853710: Bug#853710: xen: ftbfs with GCC-7
Hi, On Thu, 11 Jan 2018 23:01:46 +0100 Hans van Kranenburg <hans at knorrie.org> wrote:> Just wanted to let know that during the preparations of upgrading the > package to Xen 4.10 I have been able to build successfully targeting > unstable so far.Any progress there? Can you give a status update? Cheers, Emilio
Debian Bug Tracking System
2018-Oct-11 11:03 UTC
[Pkg-xen-devel] Bug#853710: marked as done (xen: ftbfs with GCC-7)
Your message dated Thu, 11 Oct 2018 11:00:42 +0000 with message-id <E1gAYhu-000HaJ-I3 at fasolo.debian.org> and subject line Bug#853710: fixed in xen 4.11.1~pre.20180911.5acdd26fdc+dfsg-2 has caused the Debian Bug report #853710, regarding xen: ftbfs with GCC-7 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 853710: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853710 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Matthias Klose <doko at debian.org> Subject: xen: ftbfs with GCC-7 Date: Tue, 31 Jan 2017 09:36:50 +0000 Size: 9151 URL: <http://alioth-lists.debian.net/pipermail/pkg-xen-devel/attachments/20181011/1f3901cd/attachment-0002.mht> -------------- next part -------------- An embedded message was scrubbed... From: Ian Jackson <ijackson at chiark.greenend.org.uk> Subject: Bug#853710: fixed in xen 4.11.1~pre.20180911.5acdd26fdc+dfsg-2 Date: Thu, 11 Oct 2018 11:00:42 +0000 Size: 25630 URL: <http://alioth-lists.debian.net/pipermail/pkg-xen-devel/attachments/20181011/1f3901cd/attachment-0003.mht>