Mir

Merge lp:~raof/mir/link-platforms-against-mirplatform into lp:mir

Proposed by Chris Halse Rogers
Status: Work in progress
Proposed branch: lp:~raof/mir/link-platforms-against-mirplatform
Merge into: lp:mir
Diff against target: 23 lines (+2/-0)
2 files modified
src/platform/graphics/android/CMakeLists.txt (+1/-0)
src/platform/graphics/mesa/CMakeLists.txt (+1/-0)
To merge this branch: bzr merge lp:~raof/mir/link-platforms-against-mirplatform
Reviewer Review Type Date Requested Status
Kevin DuBois (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Daniel van Vugt Approve
Review via email: mp+233876@code.launchpad.net

Commit message

Link the graphics platform libs with with libmirplatform.

They use symbols from it, so...

Description of the change

Another trivial one; link the platform plugins against libmirplatform, as they use its symbols.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Verified the new linkage is honoured and used (not empty):

 libmirplatform.so.2 => ... /libmirplatform.so.2 (0x00007f20f5b2e000)
 libmircommon.so.2 => ... /libmircommon.so.2 (0x00007f20f4d88000)

Kind of scares me though that our linker options are so weak that we successfully built libmirplatformgraphics* at all before now.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Something else scares me actually. Although the reality hasn't changed, it's now more clear that any ABI bump to libmircommon or libmirplatform will break 3rd party graphics drivers.

So if we can't eliminate these dependencies with a cleaner driver model then we will need to get serious about avoiding ABI breaks to mircommon/mirplatform.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

> Something else scares me actually. Although the reality hasn't changed, it's
> now more clear that any ABI bump to libmircommon or libmirplatform will break
> 3rd party graphics drivers.
>

The android platform depends-on the android drivers (so we can't break the android drivers with our abi/api changes).
The mesa platform provides its native window type and some function hooks that are needed to the mesa drivers, so the drivers depend-on the platform, and abi changes could break the drivers.

I guess the long term solution is to pull parts of the mesa drivers into the mesa platform, and have mesa depend-on headers provided by the drivers.

Revision history for this message
Kevin DuBois (kdub) :
review: Approve
Revision history for this message
Chris Halse Rogers (raof) wrote :

There are two types of dependencies here - there are the classes that a driver has to provide, the definitions of which live in the platform module. If we change these, we've changed the driver ABI.

The other type is that *our* driver modules use functionality from mirplatform et al. That's perfectly fine; it's even OK if the driver module uses libmirplatformX-1 and gets loaded into a server using libmirplatformX (assuming we do the symbol versioning correctly).

Our driver ABI - while fragile, as C++ is not particularly conducive to backwards-compatible ABIs - shouldn't need to be broken _too_ often. Certainly it's not broken with each mirplatform ABI break (assuming we do the ELF versioning correctly ☺).

Revision history for this message
Chris Halse Rogers (raof) wrote :

Although that stupid protobuf singleton strikes again! Grargh.

Revision history for this message
Chris Halse Rogers (raof) wrote :

You know, depending on a library with a constructor is really annoying and awkward. I'll move this to WIP until (a) I can reproduce that failure locally, and (b) have some idea about what to do about it.

Unmerged revisions

1900. By Chris Halse Rogers

Link the graphics platform libs with with libmirplatform.

They use symbols from it, so...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platform/graphics/android/CMakeLists.txt'
2--- src/platform/graphics/android/CMakeLists.txt 2014-09-08 04:12:17 +0000
3+++ src/platform/graphics/android/CMakeLists.txt 2014-09-09 06:26:38 +0000
4@@ -51,6 +51,7 @@
5 mirplatformgraphicsandroid
6
7 mirsharedandroid
8+ mirplatform
9
10 ${Boost_PROGRAM_OPTIONS_LIBRARY}
11 ${LIBHARDWARE_LIBRARIES}
12
13=== modified file 'src/platform/graphics/mesa/CMakeLists.txt'
14--- src/platform/graphics/mesa/CMakeLists.txt 2014-09-08 04:12:17 +0000
15+++ src/platform/graphics/mesa/CMakeLists.txt 2014-09-09 06:26:38 +0000
16@@ -48,6 +48,7 @@
17
18 target_link_libraries(mirplatformgraphicsmesa
19
20+ mirplatform
21 ${Boost_PROGRAM_OPTIONS_LIBRARY}
22 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
23 ${GBM_LDFLAGS} ${GBM_LIBRARIES}

Subscribers

People subscribed via source and target branches