Mir

Merge lp:~raof/mir/fix-ftbfs-against-mesa-11 into lp:mir

Proposed by Chris Halse Rogers
Status: Merged
Merged at revision: 2962
Proposed branch: lp:~raof/mir/fix-ftbfs-against-mesa-11
Merge into: lp:mir
Diff against target: 210 lines (+171/-0)
5 files modified
3rd_party/android-deps/android/native_window.h (+126/-0)
3rd_party/android-deps/android/rect.h (+41/-0)
src/common/graphics/android/CMakeLists.txt (+1/-0)
src/platforms/android/client/CMakeLists.txt (+2/-0)
src/platforms/android/server/CMakeLists.txt (+1/-0)
To merge this branch: bzr merge lp:~raof/mir/fix-ftbfs-against-mesa-11
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Daniel van Vugt Approve
Review via email: mp+272203@code.launchpad.net

Commit message

Re-add android/native_window.h and its dependency to 3rd_party.

Khronos' eglplatform.h headers have long #include<>d native_window.h. Now that Mesa has refreshed their header (from 2009) to something more modern this means that we need to provide android/native_window.h.

Fixes the build against Mesa 11.0, now in Wily.

Fixes: https://bugs.launchpad.net/mir/+bug/1499134

Description of the change

Re-add android/native_window.h and its dependency to 3rd_party.

Khronos' eglplatform.h headers have long #include<>d native_window.h. Now that Mesa has refreshed their header (from 2009) to something more modern this means that we need to provide android/native_window.h.

Fixes the build against Mesa 11.0, now in Wily.

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
Daniel van Vugt (vanvugt) wrote :

Cool.

native_window.h was only recently removed in r2845 (for release in 0.16.0). However a similar fix (just the "include_directories") is still required in older branches like lp:mir/0.15 in order to find the in-tree native_window.h

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

phablet-test-run -x -s 00693fd555c9186a -v umockdev-run -- mir_performance_tests
running umockdev-run -- mir_performance_tests
initctl: unable to determine sessions
initctl: unable to determine sessions
Running main() from main.cpp
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from GLMark2Test
[ RUN ] GLMark2Test.benchmark_fullscreen_default
[1443076724.736955] mirplatform: Found graphics driver: android
[1443076724.737657] mirplatform: Found graphics driver: mesa-kms
[1443076724.738695] mirplatform: Found graphics driver: mesa-x11
[1443076724.739274] mirplatform: Found graphics driver: dummy
ERROR: Throw location unknown (consider using BOOST_THROW_EXCEPTION)
Dynamic exception type: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE
std::exception::what: bind: No such file or directory

unknown file: Failure
C++ exception with description "Failed to start server thread" thrown in SetUp().
[ FAILED ] GLMark2Test.benchmark_fullscreen_default (10062 ms)
[----------] 1 test from GLMark2Test (10062 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (10064 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] GLMark2Test.benchmark_fullscreen_default

@ "(consider using BOOST_THROW_EXCEPTION)" Weird. Looks like the exception was wrapped by boost, but not identified as such. (RTTI information from different libs not matching?)

Does glmark need an update to match mesa?

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

[ RUN ] ThreadedDispatcherSignalTest.keeps_dispatching_after_signal_interruption
==3180==
==3180== FILE DESCRIPTORS: 3 open at exit.
==3180== Open file descriptor 4: /tmp/buildd/mir-0.16.0bzr2962pkg0wily13/obj-i686-linux-gnu/Testing/Temporary/LastTest.log.tmp
==3180== <inherited from parent>
==3180==
==3180== Open file descriptor 2:
==3180== <inherited from parent>
==3180==
==3180== Open file descriptor 1:
==3180== <inherited from parent>
==3180==
==3180==
==3180== HEAP SUMMARY:
==3180== in use at exit: 107,163 bytes in 830 blocks
==3180== total heap usage: 828,191 allocs, 827,361 frees, 98,223,627 bytes allocated
==3180==
==3180== LEAK SUMMARY:
==3180== definitely lost: 0 bytes in 0 blocks
==3180== indirectly lost: 0 bytes in 0 blocks
==3180== possibly lost: 3,544 bytes in 114 blocks
==3180== still reachable: 103,167 bytes in 710 blocks
==3180== suppressed: 0 bytes in 0 blocks
==3180== Reachable blocks (those to which a pointer was found) are not shown.
==3180== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==3180==
==3180== For counts of detected and suppressed errors, rerun with: -v
==3180== Use --track-origins=yes to see where uninitialised values come from
==3180== ERROR SUMMARY: 17534 errors from 16 contexts (suppressed: 1 from 1)
/tmp/buildd/mir-0.16.0bzr2962pkg0wily13/tests/unit-tests/dispatch/test_threaded_dispatcher.cpp:368: Failure
Value of: result.succeeded()
Actual: false
Expected: true
[ FAILED ] ThreadedDispatcherSignalTest.keeps_dispatching_after_signal_interruption (1014 ms)
[----------] 1 test from ThreadedDispatcherSignalTest (1017 ms total)

The same failure in:

https://jenkins.qa.ubuntu.com/job/mir-wily-i386-ci/13/console
https://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-wily-armhf/14/console
https://jenkins.qa.ubuntu.com/job/mir-wily-i386-ci/15/console
https://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-wily-armhf/16/console

Something has changed. Logged as lp:1499229

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

The important fail (mir-wily-i386-ci and mir-mediumtests-builder-wily-armhf are marked non-fatal) is:

https://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-mako/6749/consoleFull

...
> creating: package_archive/archive/work/output/
> inflating: package_archive/archive/work/output/libmircookie-dev_0.16.0bzr2962pkg0wily4058+autopilot0_armhf.deb
> inflating: package_archive/archive/work/output/mir-client-platform-mesa-dev_0.16.0bzr2962pkg0wily4058+autopilot0_armhf.deb

So these are *wily* debs? On a vivid+overlay image?

...
> running mir_demo_server --test-client /usr/bin/mir_demo_client_basic
> initctl: unable to determine sessions
> initctl: unable to determine sessions
> [1443083181.507545] mirplatform: Found graphics driver: android
> [1443083181.508430] mirplatform: Found graphics driver: mesa-kms
> [1443083181.508582] mirplatform: Found graphics driver: mesa-x11
> [1443083181.509131] mirplatform: Found graphics driver: dummy
> [1443083181.513890] mirserver: Starting
> [1443083181.514775] mircommon: Loading modules from: /usr/lib/arm-linux-gnueabihf/mir/server-platform
> [1443083181.515171] mircommon: Loading module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-android.so.5
> [1443083181.515294] mircommon: Loading module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-kms.so.5
> [1443083181.515385] mircommon: Loading module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.5
> [1443083181.519473] mircommon: Loading module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.2
> [1443083181.522828] mircommon: Loading module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-dummy.so
> [1443083181.524689] mircommon: Loading module: /usr/lib/arm-linux-gnueabihf/mir/server-platform/input-stub.so
> [1443083181.527313] mirplatform: Found graphics driver: android
> [1443083181.527801] mirplatform: Found graphics driver: mesa-kms
> [1443083181.527953] mirplatform: Found graphics driver: mesa-x11
> [1443083181.528228] mirplatform: Found graphics driver: dummy
> [1443083181.529234] mirserver: Selected driver: android (version 0.16.0)
> [1443083182.041171] mirserver: Initial display configuration:
> [1443083182.045442] mirserver: 0.0: LVDS 4.7" 61x102mm
> [1443083182.045686] mirserver: Current mode 768x1280 60.00Hz
> [1443083182.045778] mirserver: Preferred mode 768x1280 60.00Hz
> [1443083182.045839] mirserver: Logical position +0+0
> [1443083182.045930] mirserver: 0.1: unused DisplayPort
> ERROR: Throw location unknown (consider using BOOST_THROW_EXCEPTION)
> Dynamic exception type: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEEE
> std::exception::what: bind: No such file or directory

*Looks* like all clients are dying for lack of an endpoint.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Trying to reproduce (on krillin) I see another error entirely:

Running main() from main.cpp
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from GLMark2Test
[ RUN ] GLMark2Test.benchmark_fullscreen_default
[1443100994.386983] mirplatform: Found graphics driver: android
[1443100994.391768] mirplatform: Found graphics driver: mesa-kms
[1443100994.393662] mirplatform: Found graphics driver: mesa-x11
[1443100994.394339] mirplatform: Found graphics driver: dummy
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[ OK ] GLMark2Test.benchmark_fullscreen_default (311016 ms)
[----------] 1 test from GLMark2Test (311018 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (311024 ms total)
[ PASSED ] 1 test.
Segmentation fault (core dumped)

Revision history for this message
Alberto Aguirre (albaguirre) wrote :

I thought native_window.h was included in the android-headers package, but it is not.

Maybe we should ask for it to be included there?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '3rd_party/android-deps/android/native_window.h'
--- 3rd_party/android-deps/android/native_window.h 1970-01-01 00:00:00 +0000
+++ 3rd_party/android-deps/android/native_window.h 2015-09-24 04:45:04 +0000
@@ -0,0 +1,126 @@
1/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_NATIVE_WINDOW_H
18#define ANDROID_NATIVE_WINDOW_H
19
20#include <android/rect.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/*
27 * Pixel formats that a window can use.
28 */
29enum {
30 WINDOW_FORMAT_RGBA_8888 = 1,
31 WINDOW_FORMAT_RGBX_8888 = 2,
32 WINDOW_FORMAT_RGB_565 = 4,
33};
34
35struct ANativeWindow;
36typedef struct ANativeWindow ANativeWindow;
37
38typedef struct ANativeWindow_Buffer {
39 // The number of pixels that are show horizontally.
40 int32_t width;
41
42 // The number of pixels that are shown vertically.
43 int32_t height;
44
45 // The number of *pixels* that a line in the buffer takes in
46 // memory. This may be >= width.
47 int32_t stride;
48
49 // The format of the buffer. One of WINDOW_FORMAT_*
50 int32_t format;
51
52 // The actual bits.
53 void* bits;
54
55 // Do not touch.
56 uint32_t reserved[6];
57} ANativeWindow_Buffer;
58
59/**
60 * Acquire a reference on the given ANativeWindow object. This prevents the object
61 * from being deleted until the reference is removed.
62 */
63void ANativeWindow_acquire(ANativeWindow* window);
64
65/**
66 * Remove a reference that was previously acquired with ANativeWindow_acquire().
67 */
68void ANativeWindow_release(ANativeWindow* window);
69
70/*
71 * Return the current width in pixels of the window surface. Returns a
72 * negative value on error.
73 */
74int32_t ANativeWindow_getWidth(ANativeWindow* window);
75
76/*
77 * Return the current height in pixels of the window surface. Returns a
78 * negative value on error.
79 */
80int32_t ANativeWindow_getHeight(ANativeWindow* window);
81
82/*
83 * Return the current pixel format of the window surface. Returns a
84 * negative value on error.
85 */
86int32_t ANativeWindow_getFormat(ANativeWindow* window);
87
88/*
89 * Change the format and size of the window buffers.
90 *
91 * The width and height control the number of pixels in the buffers, not the
92 * dimensions of the window on screen. If these are different than the
93 * window's physical size, then it buffer will be scaled to match that size
94 * when compositing it to the screen.
95 *
96 * For all of these parameters, if 0 is supplied then the window's base
97 * value will come back in force.
98 *
99 * width and height must be either both zero or both non-zero.
100 *
101 */
102int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window,
103 int32_t width, int32_t height, int32_t format);
104
105/**
106 * Lock the window's next drawing surface for writing.
107 * inOutDirtyBounds is used as an in/out parameter, upon entering the
108 * function, it contains the dirty region, that is, the region the caller
109 * intends to redraw. When the function returns, inOutDirtyBounds is updated
110 * with the actual area the caller needs to redraw -- this region is often
111 * extended by ANativeWindow_lock.
112 */
113int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
114 ARect* inOutDirtyBounds);
115
116/**
117 * Unlock the window's drawing surface after previously locking it,
118 * posting the new buffer to the display.
119 */
120int32_t ANativeWindow_unlockAndPost(ANativeWindow* window);
121
122#ifdef __cplusplus
123};
124#endif
125
126#endif // ANDROID_NATIVE_WINDOW_H
0127
=== added file '3rd_party/android-deps/android/rect.h'
--- 3rd_party/android-deps/android/rect.h 1970-01-01 00:00:00 +0000
+++ 3rd_party/android-deps/android/rect.h 2015-09-24 04:45:04 +0000
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18#ifndef ANDROID_RECT_H
19#define ANDROID_RECT_H
20
21#include <stdint.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27typedef struct ARect {
28#ifdef __cplusplus
29 typedef int32_t value_type;
30#endif
31 int32_t left;
32 int32_t top;
33 int32_t right;
34 int32_t bottom;
35} ARect;
36
37#ifdef __cplusplus
38};
39#endif
40
41#endif // ANDROID_RECT_H
042
=== modified file 'src/common/graphics/android/CMakeLists.txt'
--- src/common/graphics/android/CMakeLists.txt 2015-06-17 05:20:42 +0000
+++ src/common/graphics/android/CMakeLists.txt 2015-09-24 04:45:04 +0000
@@ -1,4 +1,5 @@
1include_directories(SYSTEM ${LIBHARDWARE_INCLUDE_DIRS})1include_directories(SYSTEM ${LIBHARDWARE_INCLUDE_DIRS})
2include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/3rd_party/android-deps)
23
3add_definitions( -DANDROID )4add_definitions( -DANDROID )
45
56
=== modified file 'src/platforms/android/client/CMakeLists.txt'
--- src/platforms/android/client/CMakeLists.txt 2015-07-21 04:30:03 +0000
+++ src/platforms/android/client/CMakeLists.txt 2015-09-24 04:45:04 +0000
@@ -1,5 +1,7 @@
1include_directories(${client_common_include_dirs})1include_directories(${client_common_include_dirs})
2include_directories(SYSTEM ${LIBHARDWARE_INCLUDE_DIRS})2include_directories(SYSTEM ${LIBHARDWARE_INCLUDE_DIRS})
3include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/3rd_party/android-deps)
4
3add_definitions(-DANDROID)5add_definitions(-DANDROID)
46
5set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)7set(symbol_map ${CMAKE_CURRENT_SOURCE_DIR}/symbols.map)
68
=== modified file 'src/platforms/android/server/CMakeLists.txt'
--- src/platforms/android/server/CMakeLists.txt 2015-07-21 04:30:03 +0000
+++ src/platforms/android/server/CMakeLists.txt 2015-09-24 04:45:04 +0000
@@ -8,6 +8,7 @@
8 ${GLESv2_INCLUDE_DIRS}8 ${GLESv2_INCLUDE_DIRS}
9 ${ANDROID_PROPERTIES_INCLUDE_DIRS}9 ${ANDROID_PROPERTIES_INCLUDE_DIRS}
10)10)
11include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/3rd_party/android-deps)
1112
12set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")13set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
13add_definitions( -DANDROID )14add_definitions( -DANDROID )

Subscribers

People subscribed via source and target branches