Click x86 chroot fails to build cmake projects

Bug #1328486 reported by David Planella
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

I was trying to get Reminders built and running on the x86 emulator, and stumbled upon this issue:

Steps to reproduce:
1. Create a 14.10 x86 chroot: sudo click chroot -a i386 -f ubuntu-sdk-14.10 create (see bug 1328436)
2. Create an emulator instance from Qt Creator: Devices > Add emulator (arrow), then select i386 as arch, a name and press Create
3. Once created, on the Devices tab follow the Qt Creator prompt to automatically create a Kit for the emulator
4. Add the build dependencies to build Reminders -> Tools > Options > Maintain, then select the newly created utopic chroot
5. On the terminal that opens, run: apt-get install libssl-dev:armhf python3
6. Check out Reminders: bzr branch lp:reminders-app
7. Open the Reminders CMakeLists.txt file with Qt Creator
8. Make sure you select the emulator kit upon configuration
9. Ensure again that on the left panel you've got the emulator kit selected
10. Press build

Actual:
- Reminders fails to build with automoc errors: http://pastebin.ubuntu.com/7622792/

Expected:
- Reminders builds without errors as with any other target

Note: for a simpler CMake project to reproduce the issue on, see the attached example.

#EDIT (zeller-benjamin)
This problem affects all projects not just reminders building for the emulator.
It seems the x86 chroot is not able to execute the AUTOMOC step.
This can be easily checked with logging into the chroot,
go to a project directory and do :
mkdir build && cd build && cmake .. && make

Related branches

David Planella (dpm)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in click (Ubuntu):
status: New → Confirmed
description: updated
description: updated
summary: - Cannot build Reminders for the emulator
+ Click x86 chroot fails to build cmake projects
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

Adding a example project

David Planella (dpm)
description: updated
Revision history for this message
Colin Watson (cjwatson) wrote :

OK, the problem is that the dpkg-architecture environment variables are set for cross-compiling rather than native-compiling. As a quick hack to demonstrate, if you run this in a "click chroot run" shell before running cmake .. && make, it works fine:

  eval `dpkg-architecture | grep ^DEB_HOST_ | sed 's/HOST/BUILD/'`

(Don't do this in QtC, though! I'll fix click to get it right by itself.)

Colin Watson (cjwatson)
Changed in click (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson)
Changed in click (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.26.1

---------------
click (0.4.26.1) utopic; urgency=medium

  [ Colin Watson ]
  * Fix a pyflakes complaint.

click (0.4.26) utopic; urgency=medium

  [ Michael Vogt ]
  * Add basic integration tests, run via autopkgtest.
  * Add coverage testing.

  [ Colin Watson ]
  * Fix DEB_BUILD_* environment variables when building on amd64 for i386
    (LP: #1328486).
 -- Ubuntu daily release <email address hidden> Tue, 10 Jun 2014 18:04:12 +0000

Changed in click (Ubuntu):
status: Fix Committed → Fix Released
David Planella (dpm)
no longer affects: reminders-app
no longer affects: qtcreator-plugin-ubuntu
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.