Mailinglist Archive: opensuse-bugs (4292 mails)

< Previous Next >
[Bug 1031343] xen fails to build with GCC 7
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 02 May 2017 14:52:53 +0000
  • Message-id: <bug-1031343-21960-Et8a2W4cGn@http.bugzilla.opensuse.org/>
http://bugzilla.opensuse.org/show_bug.cgi?id=1031343
http://bugzilla.opensuse.org/show_bug.cgi?id=1031343#c6

--- Comment #6 from Martin Liška <martin.liska@xxxxxxxx> ---
So with the 4.9.0 version, I see following issues:

1) xenpmd.c:90:36: error: '%s' directive output may be truncated writing up to
255 bytes into a region of size 19 [-Werror=format-truncation=]
#define BATTERY_INFO_FILE_PATH "/tmp/battery/%s/info"
^
xenpmd.c:113:37: note: in expansion of macro 'BATTERY_INFO_FILE_PATH'
snprintf(file_name, 32, BATTERY_INFO_FILE_PATH,
^~~~~~~~~~~~~~~~~~~~~~
xenpmd.c:113:13: note: 'snprintf' output between 19 and 274 bytes into a
destination of size 32
snprintf(file_name, 32, BATTERY_INFO_FILE_PATH,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dir_entries->d_name);
~~~~~~~~~~~~~~~~~~~~
xenpmd.c:91:37: error: '%s' directive output may be truncated writing up to 255
bytes into a region of size 19 [-Werror=format-truncation=]
#define BATTERY_STATE_FILE_PATH "/tmp/battery/%s/state"
^
xenpmd.c:116:37: note: in expansion of macro 'BATTERY_STATE_FILE_PATH'
snprintf(file_name, 32, BATTERY_STATE_FILE_PATH,
^~~~~~~~~~~~~~~~~~~~~~~
xenpmd.c:116:13: note: 'snprintf' output between 20 and 275 bytes into a
destination of size 32
snprintf(file_name, 32, BATTERY_STATE_FILE_PATH,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dir_entries->d_name);
~~~~~~~~~~~~~~~~~~~~

This is not fixed upstream and the buffer should be expanded.

2) ld -r -nostdlib
-L/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/cross-root-i686/i686-xen-elf/lib
-m elf_i386
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/arch/x86/x86_32.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/mini-os_app.o

/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/blkfront.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/tpmfront.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/events.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/fbfront.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/gntmap.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/gnttab.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/hypervisor.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/kernel.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lock.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/main.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/mm.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/netfront.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/sched.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lib/ctype.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lib/math.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lib/printf.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lib/stack_chk_fail.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lib/string.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lib/sys.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lib/xmalloc.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/lib/xs.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/xenbus/xenbus.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/console/console.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/console/xencons_ring.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/console/xenbus.o
-L/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/arch/x86
-lx86_32 -lc -o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/mini-os.o
objcopy -w -G xenos_* -G _start
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/mini-os.o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/mini-os.o
ld -nostdlib
-L/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/cross-root-i686/i686-xen-elf/lib
-m elf_i386 -T
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/arch/x86/minios-x86_32.lds

/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/mini-os.o
-o
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/mini-os
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/mini-os-x86_32-grub/mini-os.o:
In function `_strtoll_r':
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/stubdom/newlib-x86_32/i686-xen-elf/newlib/libc/stdlib/../../../../../newlib-1.16.0/newlib/libc/stdlib/strtoll_r.c:110:
undefined reference to `__udivmoddi4'

It's probably not a known issue. Problem is that we should link that with -lgcc
that provides that symbol. As it's i386 target, we'll need to add gcc-32bit
package.

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >