Bug 6382 - qemu requires libsdl dev
Summary: qemu requires libsdl dev
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.7
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-05-29 13:04 UTC by Alexandru Damian
Modified: 2014-06-06 10:35 UTC (History)
3 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 Alexandru Damian 2014-05-29 13:04:44 UTC
in order to build qemu-native, libsdl-dev is required on the host system
this check is not done / message error is not explicit

i propose that for all native build tasks, the host dependencies are checked before starting actual build tasks
Comment 1 Richard Purdie 2014-05-29 14:42:18 UTC
libsdl-dev is not required. If its present and you enable it in local.conf it can be used but it should build without it too.

We do check for most things that are required.

Are you saying that you enabled libsdl without installing it and then the build failed?
Comment 2 Ross Burton 2014-05-29 14:58:00 UTC
local.conf.sample says this:

# By default qemu will build with a builtin VNC server where graphical output can be
# seen. The two lines below enable the SDL backend too. This assumes there is a
# libsdl library available on your build system.
PACKAGECONFIG_pn-qemu-native = "sdl"
ASSUME_PROVIDED += "libsdl-native"

(http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-yocto/conf/local.conf.sample#n239)

So by default, qemu wants libsdl-dev to be present.  In the past this host build dependency was automatically detected but it was moved to be explicit in 1.6.

The libsdl-dev requirement should be documented, along with how to change it.
Comment 3 Richard Purdie 2014-05-30 16:00:28 UTC
Would a change something along the lines of this resolve this?:

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 989bdcd..4b42b17 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -550,6 +550,10 @@ def check_sanity_version_change(status, d):
         if not check_app_exists("qemu-arm", d):
             status.addresult("qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH")
 
+    if "libsdl-native" in assume_provided:
+        if not check_app_exists("sdl-config", d):
+            status.addresult("libsdl-native is set to be ASSUME_PROVIDED but sdl-config can't be found in PATH. Please either instal
+
     (result, message) = check_gcc_march(d)
     if result and message:
         status.addresult("Your gcc version is older than 4.5, please add the following param to local.conf\n \
Comment 4 Alexandru Damian 2014-05-30 16:54:54 UTC
maybe we can make this a generic test for all ASSUME_PROVIDED packages ?
Comment 5 Richard Purdie 2014-06-03 11:03:10 UTC
Alex: We already have a number of tests for the other things in ASSUME_PROVIDED, its not possible to do exact mappings. Changing to patch in review, patch posted on the OE-Core list.
Comment 6 Volker 2014-06-03 22:58:18 UTC
I ran into the same problem with 1.6

I do not remember seeing this issue with 1.5.1 and also do not see the sdl packages on our 1.5.1 build system.

I see two options:

1) libsdl1.2-dev should be added to the "Essentials" requirements in the documentation (http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#required-packages-for-the-host-development-system) -- even when build on a headless system (like a build server). At the moment these packages are listed under Graphical and Eclipse Plug-In Extras

2) The changes that caused it between 1.5.1 and 1.6 need to be adjusted to get around this problem.