Mir

Merge lp:~vanvugt/mir/fix-1510778 into lp:mir

Proposed by Daniel van Vugt
Status: Merged
Approved by: Alexandros Frantzis
Approved revision: no longer in the source branch.
Merged at revision: 3075
Proposed branch: lp:~vanvugt/mir/fix-1510778
Merge into: lp:mir
Diff against target: 186 lines (+77/-78)
3 files modified
tests/integration-tests/graphics/mesa/CMakeLists.txt (+75/-71)
tests/unit-tests/input/CMakeLists.txt (+1/-1)
tools/setup-partial-armhf-chroot.sh (+1/-6)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1510778
Reviewer Review Type Date Requested Status
Alexandros Frantzis (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Andreas Pokorny (community) Approve
Review via email: mp+275950@code.launchpad.net

Commit message

Restore support for arm64 (and other architectures) cross compilation
(LP: #1510778). It was introduced and worked fine in r2907 but got
broken in r2914 and further in r2955. So although we announced it as
part of Mir 0.16.0, it was already broken prior to release.

Description of the change

Turns out it only ever worked fully for 2 days in September...
  r2907: 2015-09-08: Added generic cross compilation support for
                     arbitrary architectures including arm64.
  r2914: 2015-09-10: setup-partial-armhf-chroot.sh got broken and
                     became hard-coded for armhf.
                     We didn't notice because we had valid ~/.cache
                     contents from testing r2907.
  r2955: 2015-09-22: CMake files got broken also and cross compilation
                     no longer worked even for people with a valid
                     cache.

Prerequisites on your build machine (for example arm64):
Targeting vivid:
  sudo apt-get install g++-4.9-aarch64-linux-gnu gcc-4.9-aarch64-linux-gnu
Otherwise:
  sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
Modify the package names for other architectures...

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
Andreas Pokorny (andreas-pokorny) wrote :

not sure why you care so much about blaming particular changes.. but the hard coding to armhf was added in r2907 already.

Needs Fixing:
if (MIR_TEST_PLATFORM STREQUAL "mesa-x11")
should be
if (MIR_BUILD_PALTFORM_MESA_X11)
instead.
Within unit-tests the MIR_TEST_PLATFORM kludge is only needed within certain tests that rely on differences in stubs wrt to NativeBuffer as far as I can tell.

review: Needs Fixing
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

oh right I should have removed the old argument parsing back then..

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

Yeah the diff of setup-partial-armhf-chroot.sh is misleading. The important bit is not visible (not changed).

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/integration-tests/graphics/mesa/CMakeLists.txt'
2--- tests/integration-tests/graphics/mesa/CMakeLists.txt 2015-10-08 22:12:59 +0000
3+++ tests/integration-tests/graphics/mesa/CMakeLists.txt 2015-11-03 07:24:19 +0000
4@@ -1,71 +1,75 @@
5-##############################################################################
6-# mir_integration_tests_mesa-kms
7-##############################################################################
8-mir_add_wrapped_executable(
9- mir_integration_tests_mesa-kms
10- ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer_integration.cpp
11- ${MIR_SERVER_OBJECTS}
12- ${MIR_PLATFORM_OBJECTS}
13- ${MIR_COMMON_OBJECTS}
14- $<TARGET_OBJECTS:mirplatformgraphicsmesakmsobjects>
15-)
16-
17-add_dependencies(mir_integration_tests_mesa-kms GMock)
18-
19-target_link_libraries(
20- mir_integration_tests_mesa-kms
21-
22- mir-test-static
23- mir-test-framework-static
24- mir-test-doubles-static
25- mirclient-static
26- mirclientrpc-static
27- mirclientlttng-static
28- mirsharedmesaservercommon-static
29-
30- ${PROTOBUF_LITE_LIBRARIES}
31- # Mesa platform dependencies
32- ${DRM_LDFLAGS} ${DRM_LIBRARIES}
33- ${GBM_LDFLAGS} ${GBM_LIBRARIES}
34-)
35-
36-if (MIR_RUN_INTEGRATION_TESTS)
37- mir_discover_tests_with_fd_leak_detection(mir_integration_tests_mesa-kms)
38-endif (MIR_RUN_INTEGRATION_TESTS)
39-
40-##############################################################################
41-# mir_integration_tests_mesa-x11
42-##############################################################################
43-mir_add_wrapped_executable(
44- mir_integration_tests_mesa-x11
45- ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer_integration.cpp
46- ${MIR_SERVER_OBJECTS}
47- ${MIR_PLATFORM_OBJECTS}
48- ${MIR_COMMON_OBJECTS}
49- $<TARGET_OBJECTS:mirplatformgraphicsmesax11objects>
50- $<TARGET_OBJECTS:mirplatformservermesax11sharedresources>
51-)
52-
53-add_dependencies(mir_integration_tests_mesa-x11 GMock)
54-
55-target_link_libraries(
56- mir_integration_tests_mesa-x11
57-
58- mir-test-static
59- mir-test-framework-static
60- mir-test-doubles-static
61- mirclient-static
62- mirclientrpc-static
63- mirclientlttng-static
64- mirsharedmesaservercommon-static
65-
66- ${PROTOBUF_LITE_LIBRARIES}
67- # Mesa platform dependencies
68- ${DRM_LDFLAGS} ${DRM_LIBRARIES}
69- ${GBM_LDFLAGS} ${GBM_LIBRARIES}
70- X11
71-)
72-
73-if (MIR_RUN_INTEGRATION_TESTS)
74- mir_discover_tests_with_fd_leak_detection(mir_integration_tests_mesa-x11)
75-endif (MIR_RUN_INTEGRATION_TESTS)
76+if (MIR_BUILD_PLATFORM_MESA_KMS)
77+ ##########################################################################
78+ # mir_integration_tests_mesa-kms
79+ ##########################################################################
80+ mir_add_wrapped_executable(
81+ mir_integration_tests_mesa-kms
82+ ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer_integration.cpp
83+ ${MIR_SERVER_OBJECTS}
84+ ${MIR_PLATFORM_OBJECTS}
85+ ${MIR_COMMON_OBJECTS}
86+ $<TARGET_OBJECTS:mirplatformgraphicsmesakmsobjects>
87+ )
88+
89+ add_dependencies(mir_integration_tests_mesa-kms GMock)
90+
91+ target_link_libraries(
92+ mir_integration_tests_mesa-kms
93+
94+ mir-test-static
95+ mir-test-framework-static
96+ mir-test-doubles-static
97+ mirclient-static
98+ mirclientrpc-static
99+ mirclientlttng-static
100+ mirsharedmesaservercommon-static
101+
102+ ${PROTOBUF_LITE_LIBRARIES}
103+ # Mesa platform dependencies
104+ ${DRM_LDFLAGS} ${DRM_LIBRARIES}
105+ ${GBM_LDFLAGS} ${GBM_LIBRARIES}
106+ )
107+
108+ if (MIR_RUN_INTEGRATION_TESTS)
109+ mir_discover_tests_with_fd_leak_detection(mir_integration_tests_mesa-kms)
110+ endif (MIR_RUN_INTEGRATION_TESTS)
111+endif()
112+
113+if (MIR_BUILD_PLATFORM_MESA_X11)
114+ ##########################################################################
115+ # mir_integration_tests_mesa-x11
116+ ##########################################################################
117+ mir_add_wrapped_executable(
118+ mir_integration_tests_mesa-x11
119+ ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer_integration.cpp
120+ ${MIR_SERVER_OBJECTS}
121+ ${MIR_PLATFORM_OBJECTS}
122+ ${MIR_COMMON_OBJECTS}
123+ $<TARGET_OBJECTS:mirplatformgraphicsmesax11objects>
124+ $<TARGET_OBJECTS:mirplatformservermesax11sharedresources>
125+ )
126+
127+ add_dependencies(mir_integration_tests_mesa-x11 GMock)
128+
129+ target_link_libraries(
130+ mir_integration_tests_mesa-x11
131+
132+ mir-test-static
133+ mir-test-framework-static
134+ mir-test-doubles-static
135+ mirclient-static
136+ mirclientrpc-static
137+ mirclientlttng-static
138+ mirsharedmesaservercommon-static
139+
140+ ${PROTOBUF_LITE_LIBRARIES}
141+ # Mesa platform dependencies
142+ ${DRM_LDFLAGS} ${DRM_LIBRARIES}
143+ ${GBM_LDFLAGS} ${GBM_LIBRARIES}
144+ X11
145+ )
146+
147+ if (MIR_RUN_INTEGRATION_TESTS)
148+ mir_discover_tests_with_fd_leak_detection(mir_integration_tests_mesa-x11)
149+ endif (MIR_RUN_INTEGRATION_TESTS)
150+endif()
151
152=== modified file 'tests/unit-tests/input/CMakeLists.txt'
153--- tests/unit-tests/input/CMakeLists.txt 2015-10-12 20:51:03 +0000
154+++ tests/unit-tests/input/CMakeLists.txt 2015-11-03 07:24:19 +0000
155@@ -16,7 +16,7 @@
156 ${CMAKE_CURRENT_SOURCE_DIR}/test_validator.cpp
157 )
158
159-if (MIR_TEST_PLATFORM STREQUAL "mesa-kms" OR MIR_TEST_PLATFORM STREQUAL "mesa-x11")
160+if (MIR_BUILD_PLATFORM_MESA_X11)
161 list(APPEND UNIT_TEST_SOURCES
162 ${CMAKE_CURRENT_SOURCE_DIR}/test_x11_platform.cpp
163 ${CMAKE_CURRENT_SOURCE_DIR}/test_x11_module.cpp
164
165=== modified file 'tools/setup-partial-armhf-chroot.sh'
166--- tools/setup-partial-armhf-chroot.sh 2015-09-09 18:52:28 +0000
167+++ tools/setup-partial-armhf-chroot.sh 2015-11-03 07:24:19 +0000
168@@ -63,17 +63,12 @@
169 fi
170
171 directory=${1}
172-echo "creating phablet-compatible armhf partial chroot for mir compilation in directory ${directory}"
173+echo "creating phablet-compatible $arch partial chroot for mir compilation in directory ${directory}"
174
175 if [ ! -d ${directory} ]; then
176 mkdir -p ${directory}
177 fi
178
179-arch=armhf
180-if [ ! -z "$3" ]; then
181- arch=$3
182-fi
183-
184 DEBCONTROL=$(pwd)/../debian/control
185
186 pushd ${directory} > /dev/null

Subscribers

People subscribed via source and target branches