Bug 11725 - sanity.bbclass: check for libsdl-native is broken
Summary: sanity.bbclass: check for libsdl-native is broken
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.4
Assignee: Yau Wai Gan
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-06-27 15:49 UTC by Patrick Ohly
Modified: 2017-10-04 09:44 UTC (History)
7 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 Patrick Ohly 2017-06-27 15:49:08 UTC
To reproduce:

- set up a clean build directory (in particular, conf/sanity_info must not exist)
- add ASSUME_PROVIDED += "libsdl-native" to local.conf
- bitbake qemu-native

It fails with:
"libsdl-native is set to be ASSUME_PROVIDED but sdl-config can't be
found in PATH. Please either install it, or configure qemu not to
require sdl."

The check in sanity.bbclass is out-dated and fails because sdl-config is not in HOSTTOOLS. It shouldn't be added there either, because that would affect all recipes and qemu.inc doesn't need it at all.

From qemu.inc:

do_configure_prepend_class-native() {
        # Append build host pkg-config paths for native target since the host may provide sdl
        BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
        if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
                export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
        fi

insanity.bbclass could use the host pkg-config to ensure that sdl.pc is installed.
Comment 1 Patrick Ohly 2017-06-27 15:49:46 UTC
Originally found by Jonathan Liu.
Comment 2 Ross Burton 2017-06-29 09:51:35 UTC
I've a patch that just deletes the check.  Do we really need the extra check?
Comment 3 Patrick Ohly 2017-06-29 10:08:00 UTC
(In reply to comment #2)
> I've a patch that just deletes the check.  Do we really need the extra check?

I'd be fine with simply removing it.
Comment 4 Juro Bystricky 2017-08-23 17:59:26 UTC
This is a periodically recurring problem, see for example:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=8553
https://bugzilla.yoctoproject.org/show_bug.cgi?id=7469

Basically, the order of libraries is important, this should fix it in local.conf:

ASSUME_PROVIDED += "libsdl-native"
BUILD_LDFLAGS_prepend_pn-qemu-native = "-Wl,-rpath-link,/lib/x86_64-linux-gnu "
Comment 5 Juro Bystricky 2017-08-23 18:09:54 UTC
Maybe the sanity check message can be simply updated to suggest adding the extra line BUILD_LDFLAGS_prepend_pn-qemu-native in local.conf...
Comment 6 Paul Eggleton 2017-08-23 21:13:18 UTC
Assuming this does fix it, can we have qemu-native do the right thing so that users don't have to insert this line into their configuration?
Comment 7 Juro Bystricky 2017-08-23 22:09:01 UTC
(In reply to comment #6)
> Assuming this does fix it, can we have qemu-native do the right thing so
> that users don't have to insert this line into their configuration?


I would say yes, providing the recipe can somehow detect we specified ASSUME_PROVIDED += "libsdl-native
Comment 8 Patrick Ohly 2017-08-24 06:37:49 UTC
(In reply to comment #4)
> This is a periodically recurring problem, see for example:
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=8553
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7469

Those are problems with building qemu-native. This issue here is about the sanity test and that it checks for SDL differently than qemu-native, so this not quite the same.
Comment 9 Ross Burton 2017-10-04 09:44:47 UTC
Turns out I'd already fixed this ages ago.

Closed in oe-core a8d8b0d9e1c2346d5a314ed0a7bf5be66044a51d.