Merge lp:~michihenning/unity-api/require-g++-4.9 into lp:unity-api

Proposed by Michi Henning
Status: Merged
Approved by: Gerry Boland
Approved revision: 143
Merged at revision: 148
Proposed branch: lp:~michihenning/unity-api/require-g++-4.9
Merge into: lp:unity-api
Diff against target: 64 lines (+20/-2)
4 files modified
CMakeLists.txt (+9/-0)
debian/changelog (+6/-0)
debian/control (+2/-1)
debian/rules (+3/-1)
To merge this branch: bzr merge lp:~michihenning/unity-api/require-g++-4.9
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+225100@code.launchpad.net

Commit message

Require g++4.9 for build to avoid ABI breakage since 4.8.

Description of the change

Require g++4.9 for build to avoid ABI breakage since 4.8.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

Not sure why this falls over on Jenkins. The build definitely installs 4.9 but, when cmake runs, it detects 4.8. Anyone know why this is happening?

dh_auto_configure -- -DCMAKE_BUILD_TYPE=coverage
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:23 (message):
  g++ version must be 4.9!

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

You need to set this at the top of debian/rules:

# Explicitly selecting a G{CC,++}-version here to avoid accidental
# ABI breaks introduced by toolchain updates.
include /usr/share/dpkg/default.mk
export CC=$(DEB_HOST_GNU_TYPE)-gcc-4.9
export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9

(It is the -D flags to CMake that were unnecessary.)

143. By Michi Henning

Set environment variables after all. (I mis-read Jussi's comments.)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michi Henning (michihenning) wrote :

> (It is the -D flags to CMake that were unnecessary.)

Yes, I realised that after the stand-up. I mis-read your original comments on Thomas's MR.
Jenkins just OK'd it with that change.

Revision history for this message
Gerry Boland (gerboland) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-04-28 12:30:29 +0000
3+++ CMakeLists.txt 2014-07-01 07:57:27 +0000
4@@ -15,6 +15,15 @@
5
6 string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) # Build types should always be lowercase but sometimes they are not.
7
8+# We require g++ 4.9, to avoid ABI breakage with earlier version.
9+# Note that this must match what is specifed in debian/control.
10+set(cxx_version_required 4.9)
11+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
12+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL ${cxx_version_required})
13+ message(FATAL_ERROR "g++ version must be ${cxx_version_required}!")
14+ endif()
15+endif()
16+
17 include(PrecompiledHeaders)
18 include(EnableCoverageReport)
19 #####################################################################
20
21=== modified file 'debian/changelog'
22--- debian/changelog 2014-06-26 11:05:05 +0000
23+++ debian/changelog 2014-07-01 07:57:27 +0000
24@@ -1,3 +1,9 @@
25+unity-api (7.83+14.10.20140626-0ubuntu2) UNRELEASED; urgency=medium
26+
27+ * Explicitly select g++-4.9 to prevent ABI breakage.
28+
29+ -- Michi Henning <michi.henning@canonical.com> Tue, 01 Jul 2014 17:53:40 +1000
30+
31 unity-api (7.83+14.10.20140626-0ubuntu1) utopic; urgency=medium
32
33 [ Michal Hruby ]
34
35=== modified file 'debian/control'
36--- debian/control 2013-07-02 10:47:19 +0000
37+++ debian/control 2014-07-01 07:57:27 +0000
38@@ -2,7 +2,8 @@
39 Priority: optional
40 Section: libs
41 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
42-Build-Depends: debhelper (>= 9),
43+Build-Depends: g++-4.9,
44+ debhelper (>= 9),
45 cmake,
46 doxygen,
47 graphviz,
48
49=== modified file 'debian/rules'
50--- debian/rules 2013-06-26 13:16:14 +0000
51+++ debian/rules 2014-07-01 07:57:27 +0000
52@@ -5,9 +5,11 @@
53 #export DH_VERBOSE=1
54 export DPKG_GENSYMBOLS_CHECK_LEVEL=4
55
56+export CC=$(DEB_HOST_GNU_TYPE)-gcc-4.9
57+export CXX=$(DEB_HOST_GNU_TYPE)-g++-4.9
58+
59 # http://ccache.samba.org/manual.html#_precompiled_headers
60 export CCACHE_SLOPPINESS=time_macros
61
62 %:
63 dh $@ --parallel --fail-missing
64-

Subscribers

People subscribed via source and target branches

to all changes: