| Summary: | qemu-native to build on Ubuntu 15.10 | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Mihail Stanciu <stanciux.mihail> |
| Component: | core | Assignee: | Ross Burton <ross.burton> |
| Status: | VERIFIED FIXED | QA Contact: | Mihail Stanciu <stanciux.mihail> |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | a.schuller, alex.kanavin, alexandru.c.georgescu, dl9pf, eduard.bartosh, francisco.j.pedraza.gonzalez, liezhi.yang, meta.mr.watcher, meta.watcher, Qi.Chen, ricardo.ribalda, richard.purdie, ross.burton, tracy.graydon |
| Version: | 2.0 | ||
| Target Milestone: | 2.1 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | Regression (Found by QA test) |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Mihail Stanciu
2015-10-21 10:35:44 UTC
Workaround: add BUILD_LDFLAGS_prepend_pn-qemu-native = "-Wl,-rpath-link,/lib/x86_64-linux-gnu " to local.conf. I'll take it. Please let me know if you already working on it. For anyone not able to replicate, this is what happens: libpulsecommon-6.0.so: undefined reference to `dbus_watch_get_enabled@LIBDBUS_1_3' The strange thing is that when I run the same configure command manually it works just fine. It must be something in the environment. unset LDFLAGS before running configure made it working. I'll dig further. The reason is this part of LDFLAGS: -Wl,-rpath-link,/home/ed/yocto/poky/build/tmp/sysroots/i686-linux/lib Because of above rpath option linker takes yocto dbus libraries instead of host ones and breaks as some symbols required by pulseaudio are not provided by yocto dbus. Both qemu and qemu-native builds worked for me on Ubuntu 15.10 and OpenSUSE 12.3 with this patch: https://gist.github.com/bartosh/b589e457a9fe60640fe1 The patch just clears up LDFLAGS and CFLAGS, making the build to use only host libraries. Mixing yocto native libraries with host libraries can and will cause similar build issues from my point of view. Thoughts? (In reply to comment #7) > Both qemu and qemu-native builds worked for me on Ubuntu 15.10 and OpenSUSE > 12.3 with this patch: https://gist.github.com/bartosh/b589e457a9fe60640fe1 > > The patch just clears up LDFLAGS and CFLAGS, making the build to use only > host libraries. Mixing yocto native libraries with host libraries can and > will cause similar build issues from my point of view. > > > Thoughts? If you look at the qemu recipe, there are a number of DEPENDS which it expects to find built by the OE build process. I tried your patch and saw: | ERROR: User requested feature uuid | configure was not able to find it. | Install libuuid devel for example (since the util-linux-native dependency is now masked out. We'd also have similar issues if the host didn't have glib-2.0-devel, zlib-devel and so on. Its therefore not this simple unfortunately, you just have a lot of -devel packages installed on the machine you tested on. I suspect upgrading dbus to the newer version will "fix" this btw. I agree that upgrading dbus might fix this issue for Ubuntu. However it might break it for other distro(s). My point was that we should choose one way(link qemu with yocto libs) or another(link with system libs) instead of balancing on the edge as we do now. I can try to upgrade dbus, but it can potentially break qemu build on other distros. Are you sure we want that now? Upgraded dbus: http://lists.openembedded.org/pipermail/openembedded-core/2015-October/112168.html Tested on Ubuntu 15.10 and OpenSUSE 13.2 by building core-image-minimal and running it with runqemu script. It worked just fine. Tried an idea of running configure several times until it succeeds: - first time without any additional options - second time with adding output of pkg-config --libs sdl to LDFLAGS - third time with adding output of pkg-config --libs dbus-1 to LDFLAGS Does this make sense for you? dbus upgrade has been rejected: http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112173.html Any other ideas how to fix it? Does it make sense to try running configure several times? Moved to 2.1 as upgrading dbus just before a release is too dangerous. Sent workaround for review: http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112207.html This happens on Debian testing/stretch/sid as well, for the same reason. Do you want me to update a workaround to work for Debian? Robert, Chen: Any plans for dbus upgrade? My attempt to upgrade to 1.10 was rejected http://lists.openembedded.org/pipermail/openembedded-core/2015-November/112173.html as I tried to do it just before a release. I'm just wondering if you can help with this? Can you rework the workaround to remove the distro check and just do it all the time, and submit it to the list? Probably a stupid question, but why dont we want to compile a host version of libsdl? if I got it right, it is the root of the problem. Because that means building pulseaudio-native mesa-native gtk-native and more. Sent updated patch: http://lists.openembedded.org/pipermail/openembedded-core/2015-November/113264.html please review Ed's patch appears to break on older systems with our friend the libx11/libext _XEatDataWords error. Testing my patch on the autobuilder now. How it went with your patch? Did it work? After spending too long looking at this I decided we should build a libsdl-native after all. I've a patch which adds libsdl-native support with a minimal PACKAGECONFIG so it doesn't massively pull in build dependencies. Thanks a lot for the help :) (In reply to comment #24) > After spending too long looking at this I decided we should build a > libsdl-native after all. > > I've a patch which adds libsdl-native support with a minimal PACKAGECONFIG > so it doesn't massively pull in build dependencies. Can we do a backport to 2.0 for this then as it breaks with current distros like 15.10 ? I agree on the "either native or target" linking - just no mix. Poky switched over to building libsdl-native in 685daeb6e265ddbd28be0ef44dcc356727b99375. oe-core was fixed in 3d6c31c3a4ff34376e17005a981bb55fc6f7a38f. Verified for 2.1_M2: 3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c Still present in 2.0.1_rc6: 5b12268f6e17574999f91628a60e21711cf62ee4 (In reply to comment #29) > Still present in 2.0.1_rc6: 5b12268f6e17574999f91628a60e21711cf62ee4 present in 2.0.1.rc7 as well Incidentally, I just ran into this same issue with Debian 8 last night. I installed libsdl-dev to fix it, but I will try to reproduce it and add the particulars. Essentially the same error message as above. If installing libsdl-dev works then that isn't the problem. The problem is that on some distributions after installing libsdl-dev it still won't build. I have remove the whitespace in build/conf/local.conf from the rows
PACKAGECONFIG_append_pn-qemu-native = "<here>sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = "<here>sdl"
and add the line below to my local.conf file
BUILD_LDFLAGS_prepend_pn-qemu-native = "-Wl,-rpath-link,/lib/x86_64-linux-gnu"
now it works well.
here my currently local.conf
MACHINE ??= 'cgtimx6'
DISTRO ?= 'poky'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = "sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"
BUILD_LDFLAGS_prepend_pn-qemu-native = "-Wl,-rpath-link,/lib/x86_64-linux-gnu"
regards,
alex
That whitespace is actually important. If you want to disable sdl the comment out those lines. There's a series of patches to fix this properly in the jethro branch, which should be released as 2.0.2 shortly. I don't understand, why is the whitespaces important actually? Please explain this, to get more comprehension. I just beginning to work with yocto. (In reply to comment #35) > I don't understand, why is the whitespaces important actually? > Please explain this, to get more comprehension. > I just beginning to work with yocto. Hi In the latest versions of ubuntu this fix is not neede anymore. Are you facing it? _append doesn't insert whitespace so if the value is a whitespace separated list then you need to add your own whitespace. If you are disabling SDL (which is likely what your packageconfig changes were doing) then you don't need any further changes to the qemu build, the linker flag changes were an attempt to make the build work when SDL is enabled. Repeating that this is fixed in master and jethro branches, and will be released in 2.0.2 shortly. Marking as verified. |