Ubuntk SDK creates unworkable run configuration when importing a CMake project

Bug #1565295 reported by Максим Савенков
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu SDK IDE
Fix Released
Undecided
Unassigned

Bug Description

When importing a simple CMake-based project, Ubuntu SDK will create two run configurations for it:

1) Default one. Its name is based on name from add_executable in CMakeLists.txt.
2) The second one. Its name will be taken from "hooks" section of manifest file specified in UBUNTU_MANIFEST_PATH variable.

The first, default target is unworkable. Despite building code/package for armhf, it will try to run it on desktop, not on device. In CMakeLists.txt.user file, this is signified by the wrong ProjectExplorer.ProjectConfiguration.Id key value: it will be "CMakeProjectManager.CMakeRunConfiguration.APPNAME", while the second target will have "UbuntuProjectManager.RemoteRunConfiguration.AppAPPNAME" in the same key.

Not only the first configuration is unneeded, it is also selected by default, and therefore if you try to run project right after importing it, it will fail with error about wrong target architecture:

"Selected architecture arm is not compatible with reported target architecture i386:x86-64
Architecture rejected target-supplied description"

Please find attached a test project for importing which will exhibit this bug (it's a very simple project, which should be imported properly, but will not actually run on device, because it lacks necessary files and code).

Revision history for this message
Максим Савенков (max-savenkov) wrote :
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

We already are aware of that problem and currently working on a solution. This is due to how the QtCreator API works internally. For our plugin there is currently no way to control if another plugin (in this case the default cmake plugin) creates runconfigurations. Also there is no way to select which RC is active by default.

Revision history for this message
Максим Савенков (max-savenkov) wrote :

OK, great, I'll be watching for this. At the very least, this behaviour should be documented somewhere - ideally, in project import dialog and in Wiki, so as not to confuse novice developers too much.

Changed in ubuntu-sdk-ide:
status: New → In Progress
tags: added: fix-with-lxd
Changed in ubuntu-sdk-ide:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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