Can't build examples: Missing Makefile

Bug #456373 reported by Murray Cumming
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
qtcreator (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: qtcreator

When starting Qt Creator, you may choose to open one of several example projects. If you do that, opening for instance, the Main Windows / Application example, the project does not build. Choosing the Build / Build Project "Application" menu item will cause a little progress bar to appear at the left-hand side, partly filled-in red. Click that little progress bar will reveal this build error:

Starting: /usr/bin/qmake-qt4 /usr/lib/qt4/examples/mainwindows/application/application.pro -spec /usr/share/qt4/mkspecs/linux-g++ -r CONFIG+=debug
Failure to open file: /usr/lib/qt4/examples/mainwindows/application/Makefile
Unable to generate makefile for: /usr/lib/qt4/examples/mainwindows/application/application.pro
Exited with code 5.
Error while building project application
When executing build step 'QMake

Revision history for this message
Riviera Kid (z-launchpad-darrenwood-co-uk) wrote :

This is because the /usr/lib tree is quite rightly write disabled for non-root users.

In my opinion, what should be happening is the examples should be in /usr/share/doc/qtcreator/examples/ and qtcreator should use them as templates and copy the relevant example to the users home directory for compilation. There's no sane reason for compiling in place like this - the examples should be known-good examples of the best practice way of doing things, if I use the examples as my work area I can easily break them and then I don't have a known-good source to refer back to.

Revision history for this message
danimo (daniel-molkentin) wrote :

This is fixed for the upcoming version of Qt Creator (1.3.0).

Creator will notice if an example or demo is r/o and offer you to copy it somewhere else.

Jonathan Riddell (jr)
Changed in qtcreator (Ubuntu):
status: New → Fix Committed
Changed in qtcreator (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Nils S. (nils-schroeder) wrote :

For all those, who want to get it fixed fast so they can start programming:

//Move the examples to your home or /usr/share/doc/qtcreator/ as Riviera Kid mentioned.
mv /usr/lib/qt4/examples $destination
//Adjust the permissions.
chmod -R 777 $destination/examples
//And set a Softlink
ln -s /usr/share/doc/qtcreator/examples $destination/examples

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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