This seems to be a GCC bug, not a QEMU bug? I'm going to close this bug,
since it has been reported upstream with the GCC folks, and they don't
seem to think this is an error on our side.


** Changed in: qemu
       Status: New => Invalid

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1452230

Title:
  Qemu 2.3.0 failes to compile with GCC 5.1.0 and -flto

Status in QEMU:
  Invalid

Bug description:
  Compiling Qemu 2.3.0 failes with the following error:

  x86_64-pc-linux-gnu-g++ -I/usr/include/pixman-1   -fPIE -DPIE -m64 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
-fno-strict-aliasing -fno-common  -Wendif-labels -Wmissing-include-dirs 
-Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self 
-Wignored-qualifiers -Wold-style-declaration -Wold-style-definition 
-Wtype-limits -fstack-protector-strong   -I/usr/include/libpng16  
-I/usr/include/libusb-1.0  
-I/home/gentoo/tmp/portage/app-emulation/qemu-2.3.0/work/qemu-2.3.0/tests 
-pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -march=native 
-O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block 
-ftree-loop-distribution -fira-loop-pressure -ftree-vectorize 
-ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-z,relro -Wl,-z,now -pie 
-m64 -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange 
-floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure 
-ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow 
-Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -o qemu-img 
qemu-img.o async.o thread-pool.o nbd.o block.o blockjob.o main-loop.o 
iohandler.o qemu-timer.o aio-posix.o qemu-io-cmds.o qemu-coroutine.o 
qemu-coroutine-lock.o qemu-coroutine-io.o qemu-coroutine-sleep.o 
coroutine-ucontext.o block/raw_bsd.o block/qcow.o block/vdi.o block/vmdk.o 
block/cloop.o block/dmg.o block/bochs.o block/vpc.o block/vvfat.o block/qcow2.o 
block/qcow2-refcount.o block/qcow2-cluster.o block/qcow2-snapshot.o 
block/qcow2-cache.o block/qed.o block/qed-gencb.o block/qed-l2-cache.o 
block/qed-table.o block/qed-cluster.o block/qed-check.o block/vhdx.o 
block/vhdx-endian.o block/vhdx-log.o block/parallels.o block/blkdebug.o 
block/blkverify.o block/block-backend.o block/snapshot.o block/qapi.o 
block/raw-posix.o block/linux-aio.o block/null.o block/mirror.o block/nbd.o 
block/nbd-client.o block/sheepdog.o block/accounting.o block/write-threshold.o 
block/curl.o  libqemuutil.a libqemustub.a   -lz -lbz2 -laio -lcurl -lm 
-lgthread-2.0 -pthread -lglib-2.0   -lz -lrt -lz -lcap-ng -luuid  -lutil
  lto1: error: two or more sections for .gnu.lto_fprintf.2f4a95b725db6827
  (null):0: confused by earlier errors, bailing out
  make[1]: *** 
[/home/gentoo/tmp/portage/app-emulation/qemu-2.3.0/temp/ccEUT6Vq.ltrans11.ltrans.o]
 Error 1
  make[1]: *** Waiting for unfinished jobs....
  lto-wrapper: fatal error: make returned 2 exit status
  compilation terminated.
  
/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: 
fatal error: lto-wrapper failed
  collect2: error: ld returned 1 exit status
  
/home/gentoo/tmp/portage/app-emulation/qemu-2.3.0/work/qemu-2.3.0/rules.mak:122:
 recipe for target 'qemu-img' failed
  make: *** [qemu-img] Error 1

  I've found an old GCC bugreport with the same error:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52159 (which has been
  marked as dup of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59000) .
  I was able to reduce the object list to to three .o files which
  reproduce the error reliably: qemu-img.o qemu-io-cmds.o block/qapi.o.

  Please let me know if you need further information.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1452230/+subscriptions

Reply via email to