Created attachment 2447 [details] full log file Hello, Several buildsets on OpenSUSE 13.2 AB machine are failing due to the following error: | ERROR: User requested feature sdl | configure was not able to find it Installed SDL packages include: libSDL-1_2-0 libSDL-devel libSDL2-2_0-0 libSDL2-devel libSDL-1_2-0-32bit libSDL-devel-32bit libSDL2-2_0-0-32bit libSDL2-devel-32bit Buildsets are failing while at do_configure task for qemu-native. Tested on 1.6.3_RC2: 6b8f7999c3e86d6e834af95ffe4c33d0d53db34a See attached logfile.
Further details on this as found when debugging with debian8. The issue turns out to be when configuring qemu-native, it does a basic link against SDL to test for the library. The issue is that when we compile that simple test and link with libSDL, it then requires libgcrypt which in turn requires libgpg-error, this is where the issue arises. If we have build native version of libgpg-error then we will have a link problem since the API as changed slight between the 0.10 (from Daisy) and 0.13 version from debian8 or openSUSE 13.2. Since the linkage of libSDL and libgcrypt, which use libgpg-error, do not specifiy a version we get which evey comes first in the link order. If we can some how set the link order (as RP mentioned in the Triage call) then we can direct the linker to use the host's libgpg-error which is the correct version to match the host's libSDL and libgcrypt. We don't see this with 1.7 and 1.8 because they have the updated version of libgpg-error. To reproduce this, simply build libgpg-error from daisy and run the following script (after you fixup the sysroot variab;le) sysroot=/home/swold/poky/daisy/tmp/sysroots/x86_64-linux cat > /tmp/sdl_test.c << E_O_F #include <SDL.h> #undef main /* We don't want SDL to override our main() */ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } E_O_F echo "FAILS" gcc \ -o /tmp/sdl_fail /tmp/sdl_test.c \ -I/usr/include/SDL \ -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu \ -Wl,-rpath-link,$sysroot/usr/lib \ -Wl,-rpath,/usr/lib/x86_64-linux-gnu \ -Wl,-rpath,$sysroot/usr/lib \ -lSDL echo "WORKS" gcc \ -o /tmp/sdl_work /tmp/sdl_test.c \ -I/usr/include/SDL \ -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu \ -Wl,-rpath,/usr/lib/x86_64-linux-gnu \ -lSDL I tried to reoder the rpath setting, that did not work, nor did useing -L and chaning the order. The ultimate patch will need to go against qemu-native's configure script since that's what runs this SDL check
changed the regression field to unknown. This distro wasn't supported during 1.6 release development cycle, so the previous flag (regression, used to work) is invalid
Incidentally, I could not reproduce the problem with Daisy 1.6.2 tarball on openSUSE13.2. (The problem was detected with 1.6.3_RC2: 6b8f7999c3e86d6e834af95ffe4c33d0d53db34a)
I am testing with the patch below. Basically, we append CFLAGS with values for linker so that /usr/lib is searched before any other path (CFLAGS are applied before LDFLAGS). This fixes the problem. I added a "verbose" flag so we can follow the linker search process in configure.log. Also note the fix was needed in two separate tests. --- configure_org 2013-11-27 14:15:55.000000000 -0800 +++ configure_new 2015-03-26 10:48:31.000000000 -0700 @@ -1802,6 +1802,15 @@ if test -n "$cross_prefix" && test "$(ba fi sdl_too_old=no + +sdl_cflags_ex=" + -Wl,--verbose + -L/usr/lib + -L/usr/lib64 + -Wl,-rpath-link,/usr/lib + -Wl,-rpath-link,/usr/lib64 + " + if test "$sdl" != "no" ; then cat > $TMPC << EOF #include <SDL.h> @@ -1814,7 +1823,7 @@ EOF else sdl_libs=`$sdlconfig --libs 2> /dev/null` fi - if compile_prog "$sdl_cflags" "$sdl_libs" ; then + if compile_prog "$sdl_cflags $sdl_cflags_ex" "$sdl_libs" ; then if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes else @@ -1853,7 +1862,7 @@ if test "$sdl" = "yes" ; then #endif int main(void) { return 0; } EOF - if compile_prog "$sdl_cflags" "$sdl_libs" ; then + if compile_prog "$sdl_cflags $sdl_cflags_ex" "$sdl_libs" ; then sdl_libs="$sdl_libs -lX11" fi libs_softmmu="$sdl_libs $libs_softmmu"
Created attachment 2456 [details] qemu-native configure patch
My previous comment "Incidentally, I could not reproduce the problem with Daisy 1.6.2 tarball on openSUSE13.2." may have been wrong. The failure relies on a particular sequence (libgpg-error needs to be built before qemu-native). Also, the "fix" fixes the configure of qemu-native, but the actual build eventually fails.
The patch below also fixes the build of qemu-native.... Same idea, modify CFLAGS passed to Makefile to reorder linker search path. --- configure_org 2013-11-27 14:15:55.000000000 -0800 +++ configure_new1 2015-03-26 12:46:35.000000000 -0700 @@ -1802,6 +1802,8 @@ if test -n "$cross_prefix" && test "$(ba fi sdl_too_old=no +sdl_cflags_ex="-Wl,--verbose -L/usr/lib -L/usr/lib64 -Wl,-rpath-link,/usr/lib -Wl,-rpath-link,/usr/lib64" + if test "$sdl" != "no" ; then cat > $TMPC << EOF #include <SDL.h> @@ -1814,7 +1816,7 @@ EOF else sdl_libs=`$sdlconfig --libs 2> /dev/null` fi - if compile_prog "$sdl_cflags" "$sdl_libs" ; then + if compile_prog "$sdl_cflags $sdl_cflags_ex" "$sdl_libs" ; then if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes else @@ -1853,7 +1855,7 @@ if test "$sdl" = "yes" ; then #endif int main(void) { return 0; } EOF - if compile_prog "$sdl_cflags" "$sdl_libs" ; then + if compile_prog "$sdl_cflags $sdl_cflags_ex" "$sdl_libs" ; then sdl_libs="$sdl_libs -lX11" fi libs_softmmu="$sdl_libs $libs_softmmu" @@ -4287,6 +4289,7 @@ echo "OBJCOPY=$objcopy" >> $config_host_ echo "LD=$ld" >> $config_host_mak echo "WINDRES=$windres" >> $config_host_mak echo "LIBTOOL=$libtool" >> $config_host_mak +CFLAGS="$CFLAGS $sdl_cflags_ex" echo "CFLAGS=$CFLAGS" >> $config_host_mak echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
Created attachment 2457 [details] qemu-native configure patch (updated)
Is this still valid, and was that patch ever submitted to the list?
D'oh! Patch was submitted to the mailing list, but some tweaks need to be done in order for the patch to be merged. Will rebase, retest, repost ... (today)
Thanks Juro. Is this specific to daisy or should a similar patch be applied for master and fido too?
(In reply to comment #12) > Thanks Juro. Is this specific to daisy or should a similar patch be applied > for master and fido too? AFAIK it's Daisy only (1.6), ABI conflict between new OS distro and old yocto distro in libcrypt/libgpg-error. To my knowledge only observed with OpenSUSE 13.2/Daisy. The following sequence can reproduce the build error: $ bitbake qemu-native -c cleanall $ bitbake libgpg-error-native $ bitbake qemu-native
Found something similar on an Ubuntu 15.04 machine, latest master hash: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1 To reproduce: 1) add these two lines to local.conf: DISTRO_FEATURES_remove = "x11" DISTRO_FEATURES_append = " wayland" 2) MACHINE=qemux86 bitbake core-image-weston ... | ERROR: User requested feature sdl | configure was not able to find it. | Install SDL devel ... However libsdl is available on the host OS ubnt:/media/yp_builds/2poky/build$ sudo apt-get install libsdl1.2-dev libsdl1.2debian Reading package lists... Done Building dependency tree Reading state information... Done libsdl1.2-dev is already the newest version. libsdl1.2debian is already the newest version. libsdl1.2debian set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
The last issue is probably a duplicate of bug 8553. You can check from build/config.log if that is the case.
Basically this was the first instance of host libSDL causing problems that was resolved in bug 8553. We've fixed it properly back to 1.8 / Fido, which was released in April 2015. Considering that earlier releases (1.7/Dizzy and 1.6/Daisy) are therefore two years old now, I think we should close this as obsolete. The patches are in fido if someone wishes to backport them: - conf/local.conf.sample: comment out ASSUME_PROVIDED=libsdl-native - xorg-lib: allow native building without x11 DISTRO_FEATURES - base: check for existing prefix when expanding names in PACKAGECONFIG - libsdl: expand PACKAGECONFIG and enable native builds
Closing as obsolete, as suggested by Ross.