Merge lp:~vanvugt/compiz-core/fix-919922 into lp:compiz-core/0.9.5

Proposed by Daniel van Vugt
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 2933
Merged at revision: 2935
Proposed branch: lp:~vanvugt/compiz-core/fix-919922
Merge into: lp:compiz-core/0.9.5
Diff against target: 34 lines (+13/-1)
2 files modified
include/core/abiversion.h (+1/-1)
src/CMakeLists.txt (+12/-0)
To merge this branch: bzr merge lp:~vanvugt/compiz-core/fix-919922
Reviewer Review Type Date Requested Status
Compiz Maintainers Pending
Review via email: mp+89644@code.launchpad.net

Description of the change

Bump the core ABI version, and enforce ABI matching when linking -lcompiz_core
so that it is impossible to get a core ABI mismatch in future. (LP: #919922)

(Impossible for any binary that is linked with -lcompiz_core)

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

Ideally, eventually, compiz should follow the industry convention of using its major version number as the ABI/API identifier. But first compiz needs to stabilize and stop changing so much.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/core/abiversion.h'
2--- include/core/abiversion.h 2012-01-18 16:26:45 +0000
3+++ include/core/abiversion.h 2012-01-23 10:06:24 +0000
4@@ -5,6 +5,6 @@
5 # error Conflicting definitions of CORE_ABIVERSION
6 #endif
7
8-#define CORE_ABIVERSION 20110828
9+#define CORE_ABIVERSION 20120123
10
11 #endif // COMPIZ_ABIVERSION_H
12
13=== modified file 'src/CMakeLists.txt'
14--- src/CMakeLists.txt 2012-01-23 05:44:19 +0000
15+++ src/CMakeLists.txt 2012-01-23 10:06:24 +0000
16@@ -104,6 +104,18 @@
17 ${_bcop_sources}
18 )
19
20+#
21+# Normal libraries use the major version number of the library as their
22+# ABI version. But compiz uses funky date numbers for ABI revisions instead.
23+#
24+set (abiversion_h "${compiz_SOURCE_DIR}/include/core/abiversion.h")
25+file (STRINGS ${abiversion_h} abiline REGEX "^#define +CORE_ABIVERSION .+$")
26+string (REGEX REPLACE "#define +CORE_ABIVERSION +" "" abiversion "${abiline}")
27+set_target_properties (compiz_core PROPERTIES
28+ VERSION ${VERSION}
29+ SOVERSION "ABI-${abiversion}"
30+)
31+
32 add_executable (compiz
33 ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
34 )

Subscribers

People subscribed via source and target branches