Mir

Merge lp:~kdub/mir/fix-1301040 into lp:mir

Proposed by Kevin DuBois
Status: Rejected
Rejected by: Kevin DuBois
Proposed branch: lp:~kdub/mir/fix-1301040
Merge into: lp:mir
Diff against target: 35 lines (+9/-2)
2 files modified
src/platform/graphics/CMakeLists.txt (+1/-0)
src/platform/options/CMakeLists.txt (+8/-2)
To merge this branch: bzr merge lp:~kdub/mir/fix-1301040
Reviewer Review Type Date Requested Status
Alan Griffiths Needs Information
Daniel d'Andrada (community) Needs Fixing
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+213739@code.launchpad.net

Commit message

unity8 was hitting a case where the dlopen-ed libmirplatformgraphics.so would fail to find some symbols for boost program options. Make sure libboost_program_options.*.so appears in the symbol table of this library.

fixes lp: #1301040

Description of the change

unity8 was hitting a case where the dlopen-ed libmirplatformgraphics.so would fail to find some symbols for boost program options. Make sure libboost_program_options.*.so appears in the symbol table of this library.

fixes lp: #1301040

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It *looks* like kdub meant to put this up for review, so I'm setting it as so.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

34 + ${Boost_PROGRAM_OPTIONS_LIBRARY}

Some trailing whitespace here

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

It improves the situation but doesn't fix it.

unity8 now crashes on mir::options missing symbols:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >'
  what(): /usr/lib/arm-linux-gnueabihf/mir/platformgraphics/android/libmirplatformgraphics.so: undefined symbol: _ZN3mir7options13off_opt_valueE

Following racarr's hint, what solved for me (as a workaround) was running unity8 with:
LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libmirserver.so.18

Because if I add miroption to mirplatformgraphics's target_link_libraries then I get yet another missing symbol from another lib (mir socket IIRC).

I'm running unity8 with the "Qt as mir compositor" Qt platform plugin (instead of the regular one from qtubuntu package), if that makes any difference...

review: Needs Fixing
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Wild guess: might be related with the order in which libs are loaded? ie, ensuring libmirserver is loaded before dlopening libmirplatformgraphics.so?

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

It sounds like we need an audit of symbols provided by/used by our libraries so that we can propose a robust solution.

review: Needs Information
Revision history for this message
Kevin DuBois (kdub) wrote :

> It *looks* like kdub meant to put this up for review, so I'm setting it as so.

I hadn't confirmed that it fixed (had to rebuild the stack), so I had as WIP until I could get a confirmation. As it turns out, it did not fix the problem completely, so still WIP.

Revision history for this message
Kevin DuBois (kdub) wrote :

rejected in favor of mterry's fix

Unmerged revisions

1522. By Kevin DuBois

make sure libboost_program_options is in the libmirplatformgraphics.so dynamic section

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platform/graphics/CMakeLists.txt'
2--- src/platform/graphics/CMakeLists.txt 2014-03-10 03:02:32 +0000
3+++ src/platform/graphics/CMakeLists.txt 2014-04-01 22:28:40 +0000
4@@ -24,6 +24,7 @@
5 mirsharedgeometry
6
7 ${EGL_LDFLAGS} ${EGL_LIBRARIES}
8+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
9 )
10
11 if (MIR_BUILD_PLATFORM_ANDROID)
12
13=== modified file 'src/platform/options/CMakeLists.txt'
14--- src/platform/options/CMakeLists.txt 2014-03-06 06:05:17 +0000
15+++ src/platform/options/CMakeLists.txt 2014-04-01 22:28:40 +0000
16@@ -1,5 +1,5 @@
17 set(
18- CHOICE_SOURCES
19+ OPTIONS_SOURCES
20
21 program_option.cpp
22 default_configuration.cpp
23@@ -8,5 +8,11 @@
24 add_library(
25 miroptions STATIC
26
27- ${CHOICE_SOURCES}
28+ ${OPTIONS_SOURCES}
29+)
30+
31+target_link_libraries(
32+ miroptions
33+
34+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
35 )

Subscribers

People subscribed via source and target branches