Merge lp:~vanvugt/qtmir/fix-1401473 into lp:qtmir

Proposed by Daniel van Vugt
Status: Rejected
Rejected by: Gerry Boland
Proposed branch: lp:~vanvugt/qtmir/fix-1401473
Merge into: lp:qtmir
Diff against target: 42 lines (+15/-5)
1 file modified
CMakeLists.txt (+15/-5)
To merge this branch: bzr merge lp:~vanvugt/qtmir/fix-1401473
Reviewer Review Type Date Requested Status
Unity8 CI Bot (community) continuous-integration Needs Fixing
Gerry Boland (community) Needs Information
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+266187@code.launchpad.net

Commit message

Autodetect the correct OpenGL library if no preference was forced
(LP: #1401473).

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
Gerry Boland (gerboland) wrote :

Just for some context, the whole reason for the current kludge is
1. Qt has a compile-time switch to support GL or GLES. Ubuntu has it packaged twice for x86/amd64, e.g. libqt5gui5 & libqt5gui5-gles

For armhf however, Qt is only packaged once, with GLES support only. So there, only libqt5gui5 is available. [*]

Usually x86/amd64 use GL, so the GLES packages have little use on that hardware. But there is one place GLES is needed: the emulator. This is the only place where -gles packages are actually used.

I recall we were unable to safely detect if the Qt install was compiled with GL or GLES, and relying on the existence of GL or GLES libraries didn't give us the right answer either. This may be better now, I can't say.

So, I'm placing the burden on you to test if this actually builds correctly in the emulator! You need to:
1. get emulator working [**], with dev env to build qtmir. You'll be working in there (else a chroot)
2. grab lp:qtmir/gles, and copy the debian/rules and debian/changelog on top of this branch.
3. build the branch, install and see if it works.

[*] this does imply Qt with OpenGL is impossible on arm.
[**] may be impossible currently due to https://bugs.launchpad.net/bugs/1458694

review: Needs Information
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:348
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-1-ci/12/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-1-ci/12/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:348
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/137/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1118
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1118
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1118
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1116/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1116/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1116/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1116/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1116
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1116/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1116/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/137/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

>1 year old. Rejecting

Unmerged revisions

348. By Daniel van Vugt

Prototype working fix

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 2015-05-21 18:48:59 +0000
3+++ CMakeLists.txt 2015-07-29 07:07:03 +0000
4@@ -89,7 +89,7 @@
5 # We expect this to be set via debian/rules for GLES builds
6 if ("${USE_OPENGLES}" STREQUAL 1)
7 message(STATUS "Qt5 determined to be compiled with GLES support")
8- pkg_check_modules(GLESv2 glesv2)
9+ pkg_check_modules(GLESv2 glesv2 REQUIRED)
10 add_definitions(-DQT_USING_GLES)
11 include_directories (${GLESv2_INCLUDE_DIRS})
12 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
13@@ -100,15 +100,25 @@
14 # I suspect Mesa may allow it ~racarr.
15 elseif("${USE_OPENGL_BUT_LINK_AGAINST_OPENGLES}")
16 message(STATUS "Linking against OpenGL ES but binding OpenGL API")
17- pkg_check_modules(GLESv2 glesv2)
18+ pkg_check_modules(GLESv2 glesv2 REQUIRED)
19 add_definitions(-DQT_USING_GL)
20 include_directories (${GLESv2_INCLUDE_DIRS})
21 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
22 else()
23- message(STATUS "Qt5 determined to be compiled with OpenGL support")
24 pkg_check_modules(GL gl)
25- add_definitions(-DQT_USING_OPENGL)
26- include_directories (${GL_INCLUDE_DIRS})
27+ pkg_check_modules(GLESv2 glesv2)
28+ if (GL_FOUND)
29+ message(STATUS "Detected full OpenGL. Using that.")
30+ add_definitions(-DQT_USING_GL)
31+ include_directories (${GL_INCLUDE_DIRS})
32+ elseif(GLESv2_FOUND)
33+ message(STATUS "Detected OpenGL|ES v2. Using that.")
34+ add_definitions(-DQT_USING_GLES)
35+ include_directories (${GLESv2_INCLUDE_DIRS})
36+ set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
37+ else()
38+ message(SEND_ERROR "No OpenGL support detected.")
39+ endif()
40 endif()
41
42 # Standard install paths

Subscribers

People subscribed via source and target branches