Mir

Merge lp:~vanvugt/mir/fix-1192908 into lp:~mir-team/mir/trunk

Proposed by Daniel van Vugt
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 765
Proposed branch: lp:~vanvugt/mir/fix-1192908
Merge into: lp:~mir-team/mir/trunk
Diff against target: 27 lines (+17/-0)
1 file modified
src/client/CMakeLists.txt (+17/-0)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1192908
Reviewer Review Type Date Requested Status
Chris Halse Rogers Approve
Robert Ancell Approve
Alan Griffiths Needs Fixing
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+170770@code.launchpad.net

Commit message

Break the cyclic dependency we have between Mir and Mesa (libEGL) that's
preventing builds from working at all on many systems (LP: #1192908)

This allows Mir to build against any version of libEGL/Mesa. And then Mesa
can safely be rebuilt against the new Mir.

Description of the change

I know it feels hacky, but this is the only working solution I have right now.

A possible alternative is to divide lp:mir into multiple projects (multiple debian source packages):
  client
  server
  shared
  demos
But that's much more painful than this, I think.

Any other suggestions?

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

And before you ask:

No, the libmirclient.so.0 compatibility symlink does not get installed. It only exists in the build tree.

Yes, I have checked that all resulting binaries only refer to libmirclient.so.1 (objdump -p).

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

9 +# The version of libEGL.so.N installed on the build machine will often link
10 +# to an older version of libmirclient.so.N
...
19 + COMMAND ln -fs libmirclient.so.1 libmirclient.so.0

comment and code do not agree.

Otherwise it is splendidly brutal.

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

Alan,

The comment and code are correct. Please review again.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Pure evil. Approved since it solves our immediate build issues, though we need to solve versioning and cyclic dependencies properly in the future.

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

+1.

We should remove this once everything is rebuilt, and properly fix the cyclic dependency.

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

We could make libEGL dlopen libmirclient in future. That would work :P

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/CMakeLists.txt'
2--- src/client/CMakeLists.txt 2013-06-18 03:27:39 +0000
3+++ src/client/CMakeLists.txt 2013-06-21 09:56:28 +0000
4@@ -73,6 +73,23 @@
5 SOVERSION 1
6 )
7
8+#
9+# The version of libEGL.so.N installed on the build machine will often link
10+# to an older version of libmirclient.so.N than we're trying to build. But if
11+# we allow EGL clients to link to both then they will depend on TWO different
12+# sonames of mirclient and get linkage errors. This hack ensures that all EGL
13+# mir clients in our source tree will only ever link to one version of
14+# mirclient; that is the new one here.
15+# It might sound nasty, but it's much nicer than having to maintain mirclient
16+# and mirserver in different source packages.
17+#
18+add_custom_target(mirclient_compat_links
19+ COMMAND ln -fs libmirclient.so.1 libmirclient.so.0
20+ WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
21+)
22+# Ensure mirclient_compat_links exist before any dependents of mirclient
23+add_dependencies(mirclient mirclient_compat_links)
24+
25 set(
26 MIR_CLIENT_LIBRARIES
27 ${Boost_LIBRARIES}

Subscribers

People subscribed via source and target branches