Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 830824

Summary: app-emulation/qemu-6.2.0-r2: error: code path is reachable
Product: Gentoo Linux Reporter: Luke-Jr <luke-jr+gentoobugs>
Component: Current packagesAssignee: John Helmert III <ajak>
Status: UNCONFIRMED ---    
Severity: major CC: sam, tamiko, virtualization, zlogene
Priority: Normal    
Version: unspecified   
Hardware: PPC64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
build.log qemu-6.2.0_x86_64
emerge --info '=app-emulation/qemu-6.2.0::gentoo'
emerge -pqv '=app-emulation/qemu-6.2.0::gentoo'

Description Luke-Jr 2022-01-09 01:34:09 UTC
In function ‘gen_helper_get_dr’,
    inlined from ‘disas_insn’ at ../target/i386/tcg/translate.c:8174:17:
/var/tmp/portage/app-emulation/qemu-6.2.0-r2/work/qemu-6.2.0/include/qemu/compiler.h:176:35: error: call to ‘qemu
_build_not_reached_always’ declared with attribute error: code path is reachable
  176 | #define qemu_build_not_reached()  qemu_build_not_reached_always()
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../target/i386/tcg/translate.c:192:7: note: in expansion of macro ‘qemu_build_not_reached’
  192 |     { qemu_build_not_reached(); }
      |       ^~~~~~~~~~~~~~~~~~~~~~
../target/i386/tcg/translate.c:208:1: note: in expansion of macro ‘STUB_HELPER’
  208 | STUB_HELPER(get_dr, TCGv ret, TCGv_env env, TCGv_i32 reg)
      | ^~~~~~~~~~~
Comment 1 Luke-Jr 2022-01-09 01:35:06 UTC
Created attachment 761669 [details]
build log
Comment 2 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-01-09 07:54:05 UTC
Are you able to test if this is ppc64-specific?
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-09 08:12:11 UTC
This might be to do with, for some reason, building TCG when it.. shouldn't be?

It's meant to be disabled right now but configure at least shows it being enabled for some parts.
Comment 4 Luke-Jr 2022-01-09 21:50:40 UTC
(In reply to John Helmert III from comment #2)
> Are you able to test if this is ppc64-specific?

Same ebuild on amd64 builds fine. Only difference was USE=io-uring, which I don't think should be relevant.
Comment 5 Marcus Priesch 2022-01-14 12:35:19 UTC
Same problem here on x86_64 platform with qemu-6.2.0
please find info in attachments

i also tried with MAKEOPTS="" - but get same error

thanks,
marcus.
Comment 6 Marcus Priesch 2022-01-14 12:37:34 UTC
Created attachment 762152 [details]
build.log qemu-6.2.0_x86_64
Comment 7 Marcus Priesch 2022-01-14 12:38:36 UTC
Created attachment 762153 [details]
emerge --info '=app-emulation/qemu-6.2.0::gentoo'
Comment 8 Marcus Priesch 2022-01-14 12:38:58 UTC
Created attachment 762154 [details]
emerge -pqv '=app-emulation/qemu-6.2.0::gentoo'
Comment 9 Marcus Priesch 2022-02-01 19:35:56 UTC
I compared output of compiler commandline when compiling qemu-6.2.0 by hand (with identical call to configure) vs. compiling using portage:

when using portage i have -O1 and -O2 flags and compilation of this particular file fails, when compiling by hand, i only have -O2 and compilation works.

so i removed -O1 from /etc/portage/make.conf (CFLAGS) and now it compiles just fine!

so the question remains where this -O2 comes from ? 

and i wonder how -O1 can influence -O2 ... but anyhow ... maybe someone can add a check in the ebuild to be clear on that fact - or to remove -O1 if it's set ... ?