Bug 7099 - matchbox-desktop: failed to start with segfault
Summary: matchbox-desktop: failed to start with segfault
Status: RESOLVED WONTFIX
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: graphics (show other bugs)
Version: unspecified
Hardware: x86 x86_64
: Medium normal
Target Milestone: 1.8
Assignee: Jackie Huang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-12-23 06:45 UTC by Jackie Huang
Modified: 2014-12-30 08:19 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Screenshot of matchbox-desktop failure. (21.07 KB, image/jpeg)
2014-12-23 06:45 UTC, Jackie Huang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jackie Huang 2014-12-23 06:45:55 UTC
Created attachment 2306 [details]
Screenshot of matchbox-desktop failure.

Image: core-image-sato
MACHINE: qemux86-64


If we add "-fno-omit-frame-pointer -fvisibility=default" in the OPTIMIZATION, matchbox-desktop: failed to start with segfault:

matchbox-deskto[350]: segfault at 0 ip 0000003409a3aa10 sp 00007fff705985b8 error 4 in libglib-2.0.so.0.4000.0[3409a00000+135000]
Comment 1 Jackie Huang 2014-12-24 05:34:41 UTC
The workaround is to filter out the "-fvisibility=default" for glib-2.0:

diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb
index 4b1bcf8..ee63b4b 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb
@@ -20,3 +20,5 @@ SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"

 SRC_URI[md5sum] = "05fb7cb17eacbc718e90366a1eae60d9"
 SRC_URI[sha256sum] = "0d27f195966ecb1995dcce0754129fd66ebe820c7cd29200d264b02af1aa28b5"
+
+TARGET_CFLAGS := "${@oe_filter_out('-fvisibility=default', '${TARGET_CFLAGS}', d)}"
Comment 2 Saul Wold 2014-12-24 18:18:52 UTC
Please submit a patch!
Comment 3 Ross Burton 2014-12-29 11:37:03 UTC
If you've a distribution that globally sets compiler flags then that distribution should also handle bugs caused by those flags.  glib has large numbers of symbols that are marked internal so I wouldn't be too surprised that overriding the visibility rules breaks it.
Comment 4 Jackie Huang 2014-12-30 06:33:20 UTC
(In reply to comment #3)
> If you've a distribution that globally sets compiler flags then that
> distribution should also handle bugs caused by those flags.  glib has large
> numbers of symbols that are marked internal so I wouldn't be too surprised
> that overriding the visibility rules breaks it.

Yes, we have something like this in our distribution:
PROFILING_OPTIMIZATION = "${FULL_OPTIMIZATION} -fno-omit-frame-pointer -fvisibility=default"

so you suggest we should handle this bug in our distribution only, right?
Comment 5 Ross Burton 2014-12-30 08:19:39 UTC
Correct.

Basically you've either found a bug in matchbox-desktop (unlikely), or that glib doesn't work with default visibility forced and matchbox-desktop was just the first thing to crash.