Merge lp:~nick-dedekind/qtubuntu/cross-build-support into lp:qtubuntu

Proposed by Nick Dedekind
Status: Merged
Approved by: Gerry Boland
Approved revision: 313
Merged at revision: 323
Proposed branch: lp:~nick-dedekind/qtubuntu/cross-build-support
Merge into: lp:qtubuntu
Diff against target: 206 lines (+57/-31)
3 files modified
debian/control (+0/-1)
debian/gles-patches/convert-to-gles.patch (+36/-23)
debian/rules (+21/-7)
To merge this branch: bzr merge lp:~nick-dedekind/qtubuntu/cross-build-support
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Michał Sawicz Needs Fixing
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+288312@code.launchpad.net

Commit message

Support for cross building

Description of the change

Support for cross building

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:311
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/18/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/808
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/824
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/824
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/822
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/822/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/822
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/822/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/822
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/822/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/822
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/822/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/822
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/822/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/822
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/822/artifact/output/*zip*/output.zip

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

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

Should this works with sbuild? It isn't specifying the cross-compile compatible qmake package as a build-dep:

cd build-android && qt5-qmake-arm-linux-gnueabihf "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" /«BUILDDIR»/qtubuntu-0.62+16.04.20160128.1
/bin/sh: 1: qt5-qmake-arm-linux-gnueabihf: not found
make[1]: *** [override_dh_auto_configure] Error 127

Or should I add qt5-qmake-arm-linux-gnueabihf to my chroot manually?

Maybe you don't need this, but I find when Xcompiling qtubunt myself, I need to set
export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/:$PKG_CONFIG_PATH
before it will succeed in my chroot

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Should this works with sbuild? It isn't specifying the cross-compile
> compatible qmake package as a build-dep:
>
> cd build-android && qt5-qmake-arm-linux-gnueabihf
> "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH"
> /«BUILDDIR»/qtubuntu-0.62+16.04.20160128.1
> /bin/sh: 1: qt5-qmake-arm-linux-gnueabihf: not found
> make[1]: *** [override_dh_auto_configure] Error 127
>
> Or should I add qt5-qmake-arm-linux-gnueabihf to my chroot manually?

Add it manually. Since it's not needed for normal packaging, we decided not to add it as a dependency.

>
>
> Maybe you don't need this, but I find when Xcompiling qtubunt myself, I need
> to set
> export PKG_CONFIG_PATH=/usr/lib/arm-linux-
> gnueabihf/pkgconfig/:$PKG_CONFIG_PATH
> before it will succeed in my chroot

Here:
+export PKG_CONFIG_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig

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

PASSED: Continuous integration, rev:311
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/25/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1127
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1120
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/1120
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1118
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1118/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1118
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/1118/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1118
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1118/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1118
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/1118/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1118
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1118/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1118
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/1118/artifact/output/*zip*/output.zip

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

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

Works! Yay

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

Text conflict in debian/rules
1 conflicts encountered.

review: Needs Fixing
312. By Nick Dedekind

merge with trunk

313. By Nick Dedekind

gles patch update

Revision history for this message
Gerry Boland (gerboland) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-05-27 12:19:48 +0000
3+++ debian/control 2016-06-03 10:36:53 +0000
4@@ -15,7 +15,6 @@
5 libudev-dev,
6 libxkbcommon-dev,
7 libxrender-dev,
8- qt5-default,
9 qtbase5-private-dev,
10 quilt,
11 # if you don't have have commit access to this branch but would like to upload
12
13=== modified file 'debian/gles-patches/convert-to-gles.patch'
14--- debian/gles-patches/convert-to-gles.patch 2016-05-27 13:03:49 +0000
15+++ debian/gles-patches/convert-to-gles.patch 2016-06-03 10:36:53 +0000
16@@ -1,14 +1,14 @@
17-Index: arm64/debian/control
18+Index: cross-build-support/debian/control
19 ===================================================================
20---- arm64.orig/debian/control
21-+++ arm64/debian/control
22+--- cross-build-support.orig/debian/control
23++++ cross-build-support/debian/control
24 @@ -1,4 +1,4 @@
25 -Source: qtubuntu
26 +Source: qtubuntu-gles
27 Priority: optional
28 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
29 Build-Depends: debhelper (>= 9),
30-@@ -11,12 +11,20 @@ Build-Depends: debhelper (>= 9),
31+@@ -11,11 +11,20 @@ Build-Depends: debhelper (>= 9),
32 libinput-dev,
33 libmirclient-dev (>= 0.13.0),
34 libmtdev-dev,
35@@ -22,15 +22,14 @@
36 libudev-dev,
37 libxkbcommon-dev,
38 libxrender-dev,
39- qt5-default,
40-- qtbase5-private-dev,
41+ qtbase5-private-dev,
42 + qtbase5-gles-dev,
43 + qtbase5-private-gles-dev,
44 + qtdeclarative5-dev,
45 quilt,
46 # if you don't have have commit access to this branch but would like to upload
47 # directly to Ubuntu, don't worry: your changes will be merged back into the
48-@@ -26,7 +34,7 @@ Standards-Version: 3.9.6
49+@@ -25,7 +34,7 @@ Standards-Version: 3.9.6
50 Section: libs
51
52 Package: qtubuntu-android
53@@ -39,7 +38,7 @@
54 Multi-Arch: same
55 Conflicts: qtubuntu-desktop,
56 Replaces: qtubuntu (<< 0.52),
57-@@ -37,31 +45,12 @@ Provides: qtubuntu,
58+@@ -36,31 +45,12 @@ Provides: qtubuntu,
59 Depends: ubuntu-application-api3-touch,
60 ${misc:Depends},
61 ${shlibs:Depends},
62@@ -74,37 +73,53 @@
63 - This variant of the package is for GNU-based desktops.
64 + This variant of the package is for Android-based phones and tablets (built
65 + against the OpenGLES variant of qtbase).
66-Index: arm64/debian/rules
67+Index: cross-build-support/debian/rules
68 ===================================================================
69---- arm64.orig/debian/rules
70-+++ arm64/debian/rules
71-@@ -4,47 +4,25 @@
72- export DPKG_GENSYMBOLS_CHECK_LEVEL=4
73+--- cross-build-support.orig/debian/rules
74++++ cross-build-support/debian/rules
75+@@ -5,60 +5,35 @@ export DPKG_GENSYMBOLS_CHECK_LEVEL=4
76+ export QT_SELECT=5
77
78 ANDROID_DIR = build-android
79 -DESKTOP_DIR = build-desktop
80 TMP1_DIR = $(CURDIR)/debian/tmp1
81 -TMP2_DIR = $(CURDIR)/debian/tmp2
82--
83+
84 -# We only want to build qtubuntu-android on arches using Qt built with OpenGL ES2.0
85--DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
86+ DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
87+ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
88+ DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
89+
90+ export PKG_CONFIG_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
91+
92 -gles2_architectures = arm64 armhf
93-
94+-
95 %:
96 dh $@
97
98 override_dh_clean:
99 -ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
100- rm -rf $(TMP1_DIR)
101+- rm -rf $(TMP1_DIR) $(DESKTOP_DIR)
102 -endif
103-- rm -rf $(TMP2_DIR)
104+- rm -rf $(TMP2_DIR) $(ANDROID_DIR)
105++ rm -rf $(TMP1_DIR) $(ANDROID_DIR)
106 dh_clean
107
108 override_dh_auto_configure:
109 -ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
110- mkdir -p $(ANDROID_DIR) && dh_auto_configure -B$(ANDROID_DIR) -- "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
111--endif
112-- mkdir -p $(DESKTOP_DIR) && dh_auto_configure -B$(DESKTOP_DIR) -- "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
113+ mkdir -p $(ANDROID_DIR)
114+ ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)"
115+ cd $(ANDROID_DIR) && qt5-qmake-$(DEB_HOST_MULTIARCH) "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
116+ else
117+ dh_auto_configure -B$(ANDROID_DIR) -- "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
118+ endif
119+-endif
120+- mkdir -p $(DESKTOP_DIR)
121+-ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)"
122+- cd $(DESKTOP_DIR) && qt5-qmake-$(DEB_HOST_MULTIARCH) "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
123+-else
124+- dh_auto_configure -B$(DESKTOP_DIR) -- "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
125+-endif
126
127 override_dh_auto_build:
128 -ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
129@@ -116,10 +131,8 @@
130 rm -f debian/*/usr/lib/*/qt5/examples/qtubuntu/qmlscene-ubuntu
131 -ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
132 mkdir -p $(TMP1_DIR) && cd $(ANDROID_DIR) && INSTALL_ROOT=$(TMP1_DIR) make install
133- cd $(CURDIR)
134 -endif
135 - mkdir -p $(TMP2_DIR) && cd $(DESKTOP_DIR) && INSTALL_ROOT=$(TMP2_DIR) make install
136-- cd $(CURDIR)
137
138 override_dh_install:
139 -ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
140
141=== modified file 'debian/rules'
142--- debian/rules 2016-05-27 13:01:34 +0000
143+++ debian/rules 2016-06-03 10:36:53 +0000
144@@ -2,6 +2,7 @@
145 # -*- makefile -*-
146
147 export DPKG_GENSYMBOLS_CHECK_LEVEL=4
148+export QT_SELECT=5
149
150 ANDROID_DIR = build-android
151 DESKTOP_DIR = build-desktop
152@@ -10,6 +11,11 @@
153
154 # We only want to build qtubuntu-android on arches using Qt built with OpenGL ES2.0
155 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
156+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
157+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
158+
159+export PKG_CONFIG_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
160+
161 gles2_architectures = arm64 armhf
162
163 %:
164@@ -17,16 +23,26 @@
165
166 override_dh_clean:
167 ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
168- rm -rf $(TMP1_DIR)
169+ rm -rf $(TMP1_DIR) $(DESKTOP_DIR)
170 endif
171- rm -rf $(TMP2_DIR)
172+ rm -rf $(TMP2_DIR) $(ANDROID_DIR)
173 dh_clean
174
175 override_dh_auto_configure:
176 ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
177- mkdir -p $(ANDROID_DIR) && dh_auto_configure -B$(ANDROID_DIR) -- "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
178-endif
179- mkdir -p $(DESKTOP_DIR) && dh_auto_configure -B$(DESKTOP_DIR) -- "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
180+ mkdir -p $(ANDROID_DIR)
181+ ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)"
182+ cd $(ANDROID_DIR) && qt5-qmake-$(DEB_HOST_MULTIARCH) "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
183+ else
184+ dh_auto_configure -B$(ANDROID_DIR) -- "QMAKE_CXXFLAGS=-DPLATFORM_API_TOUCH" $(CURDIR)
185+ endif
186+endif
187+ mkdir -p $(DESKTOP_DIR)
188+ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)"
189+ cd $(DESKTOP_DIR) && qt5-qmake-$(DEB_HOST_MULTIARCH) "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
190+else
191+ dh_auto_configure -B$(DESKTOP_DIR) -- "QMAKE_CXXFLAGS=-DQTUBUNTU_USE_OPENGL" $(CURDIR)
192+endif
193
194 override_dh_auto_build:
195 ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
196@@ -38,10 +54,8 @@
197 rm -f debian/*/usr/lib/*/qt5/examples/qtubuntu/qmlscene-ubuntu
198 ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
199 mkdir -p $(TMP1_DIR) && cd $(ANDROID_DIR) && INSTALL_ROOT=$(TMP1_DIR) make install
200- cd $(CURDIR)
201 endif
202 mkdir -p $(TMP2_DIR) && cd $(DESKTOP_DIR) && INSTALL_ROOT=$(TMP2_DIR) make install
203- cd $(CURDIR)
204
205 override_dh_install:
206 ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))

Subscribers

People subscribed via source and target branches