Andy Shaw

Qt Commercial Support Weekly #2: Debugging qmake Problems

11/7/2011 1:39 PM  | Posted by: Andy Shaw

What always seems to happen from time to time in support is that you can go a few weeks without getting any cases on a particular issue, only to come across a group of them all at the same time.  They are like buses in that respect, you wait for ages for one to turn up and then two turn up right after each other.  Last week we had a couple of obscure qmake bugs turn up which required a fair bit of debugging and investigation to try and pinpoint the cause of them.  

 

The qmake tool is a useful and powerful makefile/project file generator, which can be used for non-Qt projects too.  However, the problem is that the documentation is, unfortunately, lacking in places and the sheer combination of options and features available can make it difficult to debug it when things go wrong and also to know how to achieve certain things.

Luckily ,in the cases that we encountered I was able to apply my rather detailed knowledge of how qmake works behind the scenes (which I also learnt more of when implementing support for generating XCode 4 projects).  The main tool that is available is checking the debug output from qmake itself. Luckily, this feature is already built in so all you need to do is use the –d option when running qmake to get some debug output.  You can specify this up to four times to get more and more debug from qmake so the first thing I always do is to run this:

 

  qmake –d –d –d –d 2>debug.txt

 

This gives me a good overview of what qmake is doing at all points and what is assigned to what variable.  Unfortunately for me, in these cases nothing showed up as wrong, but it did verify that qmake was doing what was generally expected of it.  Therefore ,the problem had to be coming from somewhere else but related to qmake, either the pro file or one of the many feature files (prf files).

 

In the case of a missing RC_FILE entry - https://bugreports.qt.nokia.com/browse/QTBUG-22545 - what I had to do was to keep trimming down the pro file until I could pinpoint what exactly was the trigger of the problem as I could not reproduce it in a smaller case.  What I had to do to help here was to copy the include()’d pri/pro files so that they stood literally in the main pro file to make it easier to take bits out.  Eventually, I was able to pinpoint it to the removal of a CONFIG entry so this made it easier for me to reproduce in a smaller example.

 

This then made it easier to figure out how to fix it, and after some debugging of the code itself, I was able to fix it.  The patch is already submitted back to Nokia and if any customer needs it then please send in a support request and we will send you the patch.  It should be included in Qt 4.7.5 and Qt 4.8.0.

 

So, if you encounter a problem with qmake then at least you can see what the debug output is giving you, and if you send a support request to Qt Commercial Support that refers to a problem in qmake, then sending the output from the qmake command above will certainly help speed up the process of us looking into it alongside your pro file/pri files.

 

PS:  In case you missed the tweet from @QtCommercial (follow us on Twitter!), Qt Commercial Support supplied 71% of the bugs reported in October via the Qt Commercial Customer Portal with a workaround and/or a patch to resolve the issue.

21 

Comments:

Midge | 12/5/2011 8:26 PM
Just cause it's simple doesn't mean it's not super helupfl.

pydrvnmsh | 12/8/2011 12:56 PM
9gJp3w pmpnrneqkogc

Blue | 1/28/2012 5:51 AM
Thanks for being on point and on tgaret!

nptffpdu | 1/28/2012 2:59 PM
gXWfBW lnvuyakbkxyo

sxcctay | 1/29/2012 1:20 PM
purchase cialis :P tamoxifen no prescription :-OO buy tramadol us pharmacies 64769


whatthepho | 2/7/2012 4:25 AM
I see where you’re coming from, you want the best for your baby so to speak, but from my point of view it feels like you are just nitpicking little details. It’s not a great commercial, but I have to say it’s 100% better than most of the crap that gets shown on basic cable. (Head on, apply directly to the forehead!, etc) In fact, I had no interest in this type of software, and even though the script was a tad cringeworthy, in general the commercial did get me interested enough to actually think about whether I would use voice recognition if I had it and how it might help me.Looks like some really great software anyway. cheap auto insurance

army1brat | 2/8/2012 5:21 PM
nj car insurance httzr florida homeowners insurance 8-)

jjcoolioz | 2/13/2012 7:16 AM
small business insurance wtbtw auto insurance rates 29215

buttard74L | 2/19/2012 4:39 AM
Hi there!Found this great site of yours and Molly's. Our youngest daughters went to Windward together.Great advice here and so inspiring even in these hard economic times. But I think books are probably the cheapest entertainment out there and are a great value when compared with a movie theater's ticket and snacks rape upon the wallet. Besides, reading is just plain good for you and you get to cast your own favorite actors (or friends) into the parts. Maybe someday I'll write my great American Novel/bio/laughfest/drama and send it to you. After of course a proper inquiry letter as per instructions. Be well, you are one awesome family. tramadol cialis

Shizuka | 2/21/2012 2:51 PM
Thanks for your reply, Josh.When you say that the ccantots module is the same in all versions, I'm guessing you mean that the features and/or code are identical?Since I'm new to Sugar, can you let me know how mature the Studio and Module Builder features are? From what I can gather in testing it looks like these feature let a web user create some pretty sophisticated apps. Coming from an app development background, this is a pretty significant achievement!Have you built custom modules with Sugar in your consulting gigs? What are some examples? Is it as straightforward as it seems, or are there limitations that show up as soon as you try to build a production quality module?I would love to hear your feedback!Also, since this a pretty new blog, I'm curious about how you found it?Cheers,Joshua

vegetarcat | 2/23/2012 4:54 AM
especially because we can confirm some awesome names speaking that weekend! Evo Terra, the fabulous Amy Donohue, and we even have some local TV news fame speaking- 3-TV?s Carey Pena!  Who would want to miss bill consolidation buy tramadol free auto insurance quotes

yiajnzhkpw | 2/23/2012 12:02 PM
wLmSsh glfwltegqyfm

milaelo | 2/26/2012 4:58 AM
Starting June 4th and every Saturday Tower Group 8pm meeting will be a step study/step doing.For those interested in going through the steps while we study the steps I'll be more than glad to assist you.Bring a 1 or 3 subject spiral notebook,pen,highlighter and your Big Book.This is going to be fun as well as a new experience.Yes We have entered the world of the Spirit.Our next function is to grow in understanding and effectiveness. viagra cheap auto insurance

Theanticsofme | 2/27/2012 4:51 AM
Paki, aunque con retraso, te comunico que todos los que lo solicist teis a trav s de los coemntarios est is admitidos/as auto insurance rates car insurance quotes

Jenay | 3/8/2012 12:51 PM
Paki, aunque con retraso, te comunico que todos los que lo solicist teis a trav s de los coemntarios est is admitidos/as car insurance rates cialis

Leatrice | 3/22/2012 9:42 AM
Ms Parker,Many thanks for the incites and humor on your blog. I found you through googling page turning tips which I feel the need for later today. I'm turning for a recital of chamber music at Churchill College in Cambridge, UK. I've played and performed piano for 30 years but have rarely turned pages for others! I especially needed reminders of when to sit, stand and follow. What a great history of page turning you have.Thanks,Juli car insurance quotes car insurance

star09 | 4/9/2012 1:08 PM
There are a lot of blogs and articles out there on this topic, but you have captured another side of the subject. Regards, College Essay Writing Help

Toolman11 | 4/13/2012 12:21 PM
We really dont need to admit this "At his memorial service, Seth’s grandmother commented how “The harassment and the teasing and the taunting just became too much.”" Regards, Cheap Power Tools

Toolman11 | 4/13/2012 1:04 PM
I dont know eher to go "raud, or coercion without being able to freely leave the situation; it is quite literally modern-day slavery." Regards, Makita Repair Parts


Add new comment:

User verification Image for user verification  
     

Tags

Archive

Authors

Pasi Matilainen

Pasi is a Software Specialist working at Digia, Qt Commercial R&D and he concentrates on Mac OS X development. Pasi holds an M.Sc. degree in Information Technology from the Tampere University of Technology, Finland.

Tarja Sundqvist

Tarja is a Senior Software Engineer in the Digia, Qt Commercial Support team. She has been working in Digia for over 10 years in various positions: software development, testing, error management. Now, Tarja is focusing on helping Qt Commercial customers with their daily Qt problems on Windows and Linux platforms. Tarja holds an M.Sc. degree in Information Processing Science from the University of Oulu, Finland.

Akseli Salovaara

Akseli is a Software Specialist at Digia, Qt Commercial R&D and is responsible for the Qt Commercial releases and deliveries. Akseli holds an B.Sc. degree in Information Technology from the University of Applied Sciences in Jyväskylä, Finland.

Samuli Piippo

Samuli is a Software Specialist at Digia, Qt Commercial R&D with a concentration on  embedded Linux and RTOS development. Samuli holds an M.Sc. degree in Information Processing Science from the University of Oulu, Finland.

Katherine Barrios

Katherine is the Marketing Manager at Digia, Qt Commercial. She is responsible for getting the word out about Qt Commercial to the Qt ecosystem and working together with our customers and the Qt community to further extend the love for Qt on desktop and embedded. She was previously employed at Nokia, Qt Development Frameworks as Program Marketing Manager and is based in Oslo, Norway.

Sami Makkonen

Sami is a Senior Product Manager working at Digia, Qt Commercial R&D and he is responsible for the product planning including new feature development and enhancements to existing functionality. Sami holds an M.Sc.(Econ.) degree in Computer Science.

Andy Shaw

Andy is the Head of Support at Digia, Qt Commercial and has been working with Qt and supporting customers using Qt for 11 years.  He thrives on solving customer problems and getting feedback from them.

Tuukka Turunen

Tuukka is the Director of R&D at Digia, Qt Commercial and is responsible for the planning, creation, verification and delivery of the Qt Commercial product. Tuukka holds a M.Sc.(Eng) and Licentiate of Technology degrees in Computer Science.

Qt Commercial Team