How to cross-compile a Qt package for armhf with sbuild?

I have a Qt application that I would like to cross-compile for armhf. I've set up an sbuild chroot using the following command:

mk-sbuild --target armhf trusty

However, when I run debuild -S and then attempt to build the package, I encounter the following errors:

$ sbuild --build=amd64 --host=armhf -d trusty myapp_1.0.dsc
... dh_auto_configure -a
qmake: could not find a Qt installation of ''
dh_auto_configure: qmake -makefile -nocache QMAKE_CFLAGS_RELEASE=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 QMAKE_CFLAGS_DEBUG=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 QMAKE_CXXFLAGS_RELEASE=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 QMAKE_CXXFLAGS_DEBUG=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 QMAKE_LFLAGS_RELEASE=-Wl,-Bsymbolic-functions -Wl,-z,relro QMAKE_LFLAGS_DEBUG=-Wl,-Bsymbolic-functions -Wl,-z,relro QMAKE_STRIP=: PREFIX=/usr returned exit code 1
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2

What am I doing wrong?

1 Answer

There is a bug "Cross qmake to the chroots" which I am having too with armhf chroots in Ubuntu SDK:

So, I switched to CMake instead of qmake.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like