PKGCONFIG not working in SDK

Bug #1580981 reported by Michael Zanetti on 2016-05-12
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
High
Unassigned
Client Developer Experience
High
Zoltan Balogh
Ubuntu SDK IDE
Undecided
Unassigned
qtbase-opensource-src (Ubuntu)
High
Timo Jyrinki
qtbase-opensource-src (Ubuntu RTM)
Undecided
Unassigned

Bug Description

having this in a qmake .pro file:

CONFIG += link_pkgconfig
PKGCONFIG += url-dispatcher-1 qmenumodel

works fine for native building, but fails for crossbuilding for armhf.

https://codereview.qt-project.org/#/c/143276/2//ALL,unified

description: updated
Pat McGowan (pat-mcgowan) wrote :

Can we cherry pick from 5.6?

Changed in canonical-developer-experience:
assignee: nobody → Zoltan Balogh (bzoltan)
importance: Undecided → High
status: New → Confirmed
Changed in qtbase-opensource-src (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Timo Jyrinki (timo-jyrinki)
Timo Jyrinki (timo-jyrinki) wrote :

We have had a silo for this already, now combined with another backport: https://requests.ci-train.ubuntu.com/#/ticket/1411

Changed in qtbase-opensource-src (Ubuntu RTM):
status: New → In Progress
Timo Jyrinki (timo-jyrinki) wrote :

It seems the fix is not enough for our use case, as tested by faenil. We apparently need an additional mkspec file aside from the currently shipped "ubuntu-arm-gnueabihf-g++/qmake.conf" (which is intended for arm chroots from x86 chroots, not direct cross compilation), and that might need to be shipped with the SDK.

Changed in qtbase-opensource-src (Ubuntu RTM):
status: In Progress → Incomplete
Andrea Bernabei (faenil) wrote :

Timo already nicely summed up our discussion :)

I will leave my investigation here just for completeness:
the fix applies to the "device" mkspec, which is the one (I guess) that is used when building using QtCreator with an ARM device target.

So it "should" fix that usecase (not tested).

What it doesn't fix, is the usecase where you directly enter an arm chroot for crosscompilation purposes without using QtCreator. In that case the compilation goes through ubuntu-arm-gnueabihf-g++ makespec which is missing the correct PKGCONFIG path redirection that is done by https://codereview.qt-project.org/#/c/143276/2//ALL,unified

Timo Jyrinki (timo-jyrinki) wrote :

This is now fixed in Ubuntu 16.10 and in the to-be-landed xenial overlay silo.

Changed in qtbase-opensource-src (Ubuntu):
status: Confirmed → Fix Released
Changed in qtbase-opensource-src (Ubuntu RTM):
status: Incomplete → Fix Committed
Timo Jyrinki (timo-jyrinki) wrote :

...except that the fix is only the upstream one, not the similar change to our own mkspec.

To reproduce:

bzr branch lp:telegram-app
vi telegram-app/scope/scope.pro # remove the PKG_CONFIG_LIBDIR line as instructed

sudo chroot /var/lib/schroot/mount/click-ubuntu-sdk-15.04-armhf-ucca-1000-* # your directory here
# navigate to telegram-app
qt5-qmake-arm-linux-gnueabihf .

Result:
Project ERROR: libunity-scopes development package not found

Expected:
No error.

However, even adding the same lines that were added in upstream to our own usr/lib/arm-linux-gnueabihf/qt5/mkspecs/ubuntu-arm-gnueabihf-g++/qmake.conf inside the chroot, the error message is still there.

Timo Jyrinki (timo-jyrinki) wrote :

Only:

PKG_CONFIG = arm-linux-gnueabihf-pkg-config

works.

Not:

contains(DISTRO_OPTS, deb-multi-arch): \
 PKG_CONFIG = arm-linux-gnueabihf-pkg-config

nor:

contains(DISTRO_OPTS, deb-multi-arch): \
 PKG_CONFIG = $${CROSS_COMPILE}pkg-config

So it seems neither DISTRO_OPTS or CROSS_COMPILE is set in our case.

Do you think we could hard code it? At least this qmake.conf file is for armhf only, and only for use with our cross compile toolchain.

Timo Jyrinki (timo-jyrinki) wrote :

Ok going with hard coding.

< faenil> Mirv: I think hardcoding in the arm .conf is fine, because that file already has everything hardcoded afaict
..
< zbenjamin> Mirv: well there is nothing wrong with fixing it properly
< zbenjamin> Mirv: yes sounds perfect

Changed in canonical-developer-experience:
status: Confirmed → Fix Committed
Łukasz Zemczak (sil2100) wrote :

This bug was fixed in the package qtbase-opensource-src 5.4.1+dfsg-2ubuntu11~vivid12~3 in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay

---------------

qtbase-opensource-src (5.4.1+dfsg-2ubuntu11~vivid12~3) vivid; urgency=medium

  * debian/patches/qt5-qmake-arm-linux-gnueabihf:
    - Support manual cross-compilation inside chroot (LP: #1580981)
  * debian/patches/Make-sure-connection-is-not-null-before-using-it.patch:
    - Fix unity8 crasher (LP: #1612309)

 -- Timo Jyrinki <email address hidden> Wed, 24 Aug 2016 08:45:27 +0000

Changed in qtbase-opensource-src (Ubuntu RTM):
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: New → Fix Committed
milestone: none → 13
importance: Undecided → High
Changed in ubuntu-sdk-ide:
status: New → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers