[Qt-creator] Problems with single file builds in Qbs

Epting, Thomas thomas.epting at stryker.com
Thu Jun 16 20:20:45 CEST 2016


> > We're running into troubles with single file builds in Qbs projects.
> > Consider this use case: You want to compile a single file of the 
> > project, even though some else files still have compilation problems.

> I cannot reproduce the problem. Please file a bug report; we can then continue with the details on JIRA.

I created a minimal project and steps to reproduce it. Since I was unsure whether to report this as a Creator or a Qbs problem, I reported it via commercial support.

---
The attached SingleFileBuild.zip file contains a minimal project that shows the problem.

Instructions:
- Unzip project and load the .qbs file in Creator.
- Build the whole project (^B). You will get an error in b.cpp (which is correct, since b.cpp is erroneous).
- Try building a.cpp only (which is error free) via "Build" context menu in Projects view.
- It will fail with an error message "Installation error: ..." (see details below).
- Now open Project page | Build Steps | Qbs and untick "Install".
- Retry building a.cpp only. It succeeds.
- Tick "Install" again and retry the same operation. It fails again with the same error.

Notes:
(1) The exact error message on my machine is:
:-1: error: Installation error: Could not copy file 'D:\user\QbsBugs\target\SingleFileBuild-build\qtc_Desktop-debug\app.qtc-Desktop.b5b581d0\app.exe' to 'D:\user\QbsBugs\target\SingleFileBuild-build\qtc_Desktop-debug\install-root\bin\app.exe'. Cannot open D:/user/QbsBugs/target/SingleFileBuild-build/qtc_Desktop-debug/app.qtc-Desktop.b5b581d0/app.exe for input
(2) If you fix the error in b.cpp (by commenting line 1), rebuild, uncomment line 1 again, the error is gone.

This problem is especially annoying in large projects where you cannot get all bugs fixed so easily as shown in note (2) above.
---

Thomas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SingleFileBuild.zip
Type: application/x-zip-compressed
Size: 1153 bytes
Desc: SingleFileBuild.zip
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20160616/067b07d3/attachment.bin>


More information about the Qt-creator mailing list