Bug 10304 - QEMU doesnot support e6500 emulation for gobject-introspection
Summary: QEMU doesnot support e6500 emulation for gobject-introspection
Status: RESOLVED WONTFIX
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium major
Target Milestone: Future
Assignee: Otavio Salvador
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-19 14:42 UTC by Otavio Salvador
Modified: 2022-10-27 15:27 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Otavio Salvador 2016-09-19 14:42:28 UTC
When building gobject-introspection QEMU aborts with invalid instruction.

qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction (core dumped)
If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help.
(typically like this: GIR_EXTRA_LIBS_PATH="${B}/something/.libs" )
Command '['/home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/g-ir-scanner-qemuwrapper', '/home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/tmp-introspectrk62h5p1/GLib-2.0', '--introspect-dump=/home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/tmp-introspectrk62h5p1/functions.txt,/home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/tmp-introspectrk62h5p1/dump.xml']' returned non-zero exit status 1
Makefile:3518: recipe for target 'GLib-2.0.gir' failed
Comment 1 Ross Burton 2016-09-19 14:51:25 UTC
My knowledge of PPC is incredibly limited, can you handle this?  You probably need to set QEMU_EXTRAOPTIONS, ideally in the BSP.  See qemu.bbclass and meta-intel for examples.
Comment 2 Richard Purdie 2016-09-19 16:26:15 UTC
Talking with Otavio, this has the e5500 64 bit processor so its probably using the wrong system qemu and the wrong cpu option as far as I can tell.
Comment 3 Otavio Salvador 2016-09-19 18:59:02 UTC
I played with it a little and got it using the right params however it still fails badly.

| /home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/tmp-introspectyx4v7knq/GLib-2.0: Invalid ELF image for this architecture
| If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help.
| (typically like this: GIR_EXTRA_LIBS_PATH="${B}/something/.libs" )
| Command '['/home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/g-ir-scanner-qemuwrapper', '/home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/tmp-introspectyx4v7knq/GLib-2.0', '--introspect-dump=/home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/tmp-introspectyx4v7knq/functions.txt,/home/otavio/src/yocto/build/tmp/work/ppce6500-oel-linux/gobject-introspection/1.48.0-r0/build/tmp-introspectyx4v7knq/dump.xml']' returned non-zero exit status 1
| Makefile:3518: recipe for target 'GLib-2.0.gir' failed
| make[2]: *** [GLib-2.0.gir] Error 1
Comment 4 Ross Burton 2016-09-20 16:07:29 UTC
"Invalid ELF image for this architecture"

I'm guessing that is from qemu, so can you verify that the binaries are the right type.  Maybe there's a bug in qemu's ELF parser?
Comment 5 Otavio Salvador 2016-09-21 11:36:22 UTC
I found that the e5500 is provided by the QEMU PPC64 emulation and it turns to need to use the 32bit ABI for calling (using the qemu-ppc64abi32).

However, even doing so, it fails:

| qemu: uncaught target signal 4 (Illegal instruction) - core dumped
| Illegal instruction (core dumped)

So my guess is that the generated code is indeed invalid.
Comment 6 akuster 2020-10-22 08:27:01 UTC
Is this being seen on current Master (3.2) ?
Comment 7 Randy MacLeod 2022-10-27 15:27:14 UTC
Won't fix, so long ppc...