| Summary: | runqemu: Could not initialize SDL(No available video device) for core-image-sato on Fedora 19 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Stefan Stanacar <sstncr> | ||||||
| Component: | core | Assignee: | Kai Kang <kai.kang> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | High | CC: | hongxu.jia, kai.kang, liezhi.yang, meta.mr.watcher, meta.watcher, ross.burton, sgw | ||||||
| Version: | 1.5 | ||||||||
| Target Milestone: | 1.5 M4 | ||||||||
| Hardware: | x86 | ||||||||
| OS: | Multiple | ||||||||
| Whiteboard: | |||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||||
| Attachments: |
|
||||||||
|
Description
Stefan Stanacar
2013-08-01 14:14:08 UTC
At least you can replicate it on demand... I'd suggest putting a strace in runqemu-internal so you can get a log from qemu when it works and when it doesn't, and then diffing then. Created attachment 1420 [details]
strace for the first runqemu - minimal image
Created attachment 1421 [details]
strace for second runqemu - sato image
The first strace is longer because qemu actually starts there, I've stopped it as soon as I could. Also, if a bitbake core-image-sato in the build dir where I've built core-image-minimal, none of them will work anymore, I need to wipe tmp and rebuild minimal I want to boot the image. Well I have looked into this a little further, this is going to be fun! I put qemu under the debugger and the trigger that's causing it seems to be a memory corruption. I loaded the debuginfo for SDL and found that during the SDL_VideoInit-> SDL_X11_LoadSymbols(), the SDL_X11_HAVE_BASEXLIB seems to go from 1 to 0 and then a check later for BASEXLIB fails and causes our SDL Error. The change occurs during the SDL_X11_SYM(...) linkage I also installed the F19 qemu packages and ran the same and it worked correctly after 'bitbake libxrandr-native', I can start qemu for qemux86 sato image. Double checking it. I looked into this further and discovered that via the debugger, that when the SDL_X11_HAVE_BASEXLIB changes it's looking for the XMissingExtension() function in libXext, I am still not sure why, but it's not found with the system libXext. BTW, I put a gdb "watch" on SDL_X11_HAVE_BASEXLIB and then set a break point in the SDL_LoadFunction (break if name="XMissingExtension"), and saw the dlsym's _dlerror_run() fail, I have not dug deeper yet. When start qemu, it calls SDL_Init(), and finally calls SDL_LoadObject(). Then it calls dlopen to open 4 dynamic libraries: libX11.so.6, libXext.so.6, libXrender.so.1 and libXrandr.so.2. Unfortunately, it fails to dlopen libXext.so.6 then show sdl init failed. There is a undefined symbol `_XEatDataWords' in library libXext.so.6 (/lib64/libXext.so.6) which should be provided by libX11.so. File tmp/sysroot/*-native/usr/lib/libX11.so.6 is searched first and used. As we know, it is from package libx11-native-1.5.0. And it doesn't provides symbol `_XEatDataWords'. Symbol `_XEatDataWords' is from libx11 version 1.6.0 which version the Fedora 19 uses. Update libx11 to latest version 1.6.1 to fix this problem. Fixed by http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f0a690dd9daf8098306a9776975b537e28e07dfa Marked as Verified. |