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
=== modified file 'tests/integration-tests/graphics/mesa/CMakeLists.txt'
--- tests/integration-tests/graphics/mesa/CMakeLists.txt 2015-10-08 22:12:59 +0000
+++ tests/integration-tests/graphics/mesa/CMakeLists.txt 2015-11-03 07:24:19 +0000
@@ -1,71 +1,75 @@
1##############################################################################1if (MIR_BUILD_PLATFORM_MESA_KMS)
2# mir_integration_tests_mesa-kms2 ##########################################################################
3##############################################################################3 # mir_integration_tests_mesa-kms
4mir_add_wrapped_executable(4 ##########################################################################
5 mir_integration_tests_mesa-kms5 mir_add_wrapped_executable(
6 ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer_integration.cpp6 mir_integration_tests_mesa-kms
7 ${MIR_SERVER_OBJECTS}7 ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer_integration.cpp
8 ${MIR_PLATFORM_OBJECTS}8 ${MIR_SERVER_OBJECTS}
9 ${MIR_COMMON_OBJECTS}9 ${MIR_PLATFORM_OBJECTS}
10 $<TARGET_OBJECTS:mirplatformgraphicsmesakmsobjects>10 ${MIR_COMMON_OBJECTS}
11)11 $<TARGET_OBJECTS:mirplatformgraphicsmesakmsobjects>
1212 )
13add_dependencies(mir_integration_tests_mesa-kms GMock)13
1414 add_dependencies(mir_integration_tests_mesa-kms GMock)
15target_link_libraries(15
16 mir_integration_tests_mesa-kms16 target_link_libraries(
1717 mir_integration_tests_mesa-kms
18 mir-test-static18
19 mir-test-framework-static19 mir-test-static
20 mir-test-doubles-static20 mir-test-framework-static
21 mirclient-static21 mir-test-doubles-static
22 mirclientrpc-static22 mirclient-static
23 mirclientlttng-static23 mirclientrpc-static
24 mirsharedmesaservercommon-static24 mirclientlttng-static
2525 mirsharedmesaservercommon-static
26 ${PROTOBUF_LITE_LIBRARIES}26
27 # Mesa platform dependencies27 ${PROTOBUF_LITE_LIBRARIES}
28 ${DRM_LDFLAGS} ${DRM_LIBRARIES}28 # Mesa platform dependencies
29 ${GBM_LDFLAGS} ${GBM_LIBRARIES}29 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
30)30 ${GBM_LDFLAGS} ${GBM_LIBRARIES}
3131 )
32if (MIR_RUN_INTEGRATION_TESTS)32
33 mir_discover_tests_with_fd_leak_detection(mir_integration_tests_mesa-kms)33 if (MIR_RUN_INTEGRATION_TESTS)
34endif (MIR_RUN_INTEGRATION_TESTS)34 mir_discover_tests_with_fd_leak_detection(mir_integration_tests_mesa-kms)
3535 endif (MIR_RUN_INTEGRATION_TESTS)
36##############################################################################36endif()
37# mir_integration_tests_mesa-x1137
38##############################################################################38if (MIR_BUILD_PLATFORM_MESA_X11)
39mir_add_wrapped_executable(39 ##########################################################################
40 mir_integration_tests_mesa-x1140 # mir_integration_tests_mesa-x11
41 ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer_integration.cpp41 ##########################################################################
42 ${MIR_SERVER_OBJECTS}42 mir_add_wrapped_executable(
43 ${MIR_PLATFORM_OBJECTS}43 mir_integration_tests_mesa-x11
44 ${MIR_COMMON_OBJECTS}44 ${CMAKE_CURRENT_SOURCE_DIR}/test_buffer_integration.cpp
45 $<TARGET_OBJECTS:mirplatformgraphicsmesax11objects>45 ${MIR_SERVER_OBJECTS}
46 $<TARGET_OBJECTS:mirplatformservermesax11sharedresources>46 ${MIR_PLATFORM_OBJECTS}
47)47 ${MIR_COMMON_OBJECTS}
4848 $<TARGET_OBJECTS:mirplatformgraphicsmesax11objects>
49add_dependencies(mir_integration_tests_mesa-x11 GMock)49 $<TARGET_OBJECTS:mirplatformservermesax11sharedresources>
5050 )
51target_link_libraries(51
52 mir_integration_tests_mesa-x1152 add_dependencies(mir_integration_tests_mesa-x11 GMock)
5353
54 mir-test-static54 target_link_libraries(
55 mir-test-framework-static55 mir_integration_tests_mesa-x11
56 mir-test-doubles-static56
57 mirclient-static57 mir-test-static
58 mirclientrpc-static58 mir-test-framework-static
59 mirclientlttng-static59 mir-test-doubles-static
60 mirsharedmesaservercommon-static60 mirclient-static
6161 mirclientrpc-static
62 ${PROTOBUF_LITE_LIBRARIES}62 mirclientlttng-static
63 # Mesa platform dependencies63 mirsharedmesaservercommon-static
64 ${DRM_LDFLAGS} ${DRM_LIBRARIES}64
65 ${GBM_LDFLAGS} ${GBM_LIBRARIES}65 ${PROTOBUF_LITE_LIBRARIES}
66 X1166 # Mesa platform dependencies
67)67 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
6868 ${GBM_LDFLAGS} ${GBM_LIBRARIES}
69if (MIR_RUN_INTEGRATION_TESTS)69 X11
70 mir_discover_tests_with_fd_leak_detection(mir_integration_tests_mesa-x11)70 )
71endif (MIR_RUN_INTEGRATION_TESTS)71
72 if (MIR_RUN_INTEGRATION_TESTS)
73 mir_discover_tests_with_fd_leak_detection(mir_integration_tests_mesa-x11)
74 endif (MIR_RUN_INTEGRATION_TESTS)
75endif()
7276
=== modified file 'tests/unit-tests/input/CMakeLists.txt'
--- tests/unit-tests/input/CMakeLists.txt 2015-10-12 20:51:03 +0000
+++ tests/unit-tests/input/CMakeLists.txt 2015-11-03 07:24:19 +0000
@@ -16,7 +16,7 @@
16 ${CMAKE_CURRENT_SOURCE_DIR}/test_validator.cpp16 ${CMAKE_CURRENT_SOURCE_DIR}/test_validator.cpp
17)17)
1818
19if (MIR_TEST_PLATFORM STREQUAL "mesa-kms" OR MIR_TEST_PLATFORM STREQUAL "mesa-x11")19if (MIR_BUILD_PLATFORM_MESA_X11)
20list(APPEND UNIT_TEST_SOURCES20list(APPEND UNIT_TEST_SOURCES
21 ${CMAKE_CURRENT_SOURCE_DIR}/test_x11_platform.cpp21 ${CMAKE_CURRENT_SOURCE_DIR}/test_x11_platform.cpp
22 ${CMAKE_CURRENT_SOURCE_DIR}/test_x11_module.cpp22 ${CMAKE_CURRENT_SOURCE_DIR}/test_x11_module.cpp
2323
=== modified file 'tools/setup-partial-armhf-chroot.sh'
--- tools/setup-partial-armhf-chroot.sh 2015-09-09 18:52:28 +0000
+++ tools/setup-partial-armhf-chroot.sh 2015-11-03 07:24:19 +0000
@@ -63,17 +63,12 @@
63fi63fi
6464
65directory=${1}65directory=${1}
66echo "creating phablet-compatible armhf partial chroot for mir compilation in directory ${directory}"66echo "creating phablet-compatible $arch partial chroot for mir compilation in directory ${directory}"
6767
68if [ ! -d ${directory} ]; then68if [ ! -d ${directory} ]; then
69 mkdir -p ${directory} 69 mkdir -p ${directory}
70fi70fi
7171
72arch=armhf
73if [ ! -z "$3" ]; then
74 arch=$3
75fi
76
77DEBCONTROL=$(pwd)/../debian/control72DEBCONTROL=$(pwd)/../debian/control
7873
79pushd ${directory} > /dev/null74pushd ${directory} > /dev/null

Subscribers

People subscribed via source and target branches