[Qbs] Problems with QBS dependency detection

Christian Kandeler christian.kandeler at qt.io
Mon Jun 26 17:07:28 CEST 2017


On Mon, 26 Jun 2017 16:51:55 +0200
Heiko Nardmann <heiko.nardmann at itechnical.de> wrote:

> *Situation*:
> 
> On our CI server we often see failing builds caused by linker problems
> (MSVC 2015). /"Often"/ means around once a week - depending on the
> changes; sometimes even more often ...
> 
> Today once again ... a colleague has added a 'const' qualifier to some
> methods inside of a header file and of course also to the methods inside
> the corresponding source file (C++). Let's call them 'changed.h' and
> 'changed.cpp'. Let's call one of those changed methods
> 'SignatureHasChanged()'; so it has been changed from
> 
>     void SignatureHasChanged()
> 
> to
> 
>     void SignatureHasChanged() const
> 
> *Problem seen*: the linker complains about not finding a method symbol.
> By looking at the symbol I see that the linker looks for the old symbol
> - that one w/o the 'const' qualifier. Huhh? Okay, who is the one using
> that symbol? I found that source ... let's call it
> 'using_signaturehaschanged.cpp'.
> 
> Since the corresponding header and source files have been changed what
> do I expect now to see in my build log? Of course a recompilation of
> 'using_signaturehaschanged.cpp'!
> 
> Hmm ... what do I *NOT* see? A recompilation of
> 'using_signaturehaschanged.cpp'!

Is the behavior reproducible for the concrete set of files involved? I.e., if you change the header again, is the dependent cpp file now recompiled or not? If not, then it is likely that the C++ scanner somehow failed to pick up the dependency. The next thing to try then is to touch the dependent source file, rebuild it and then change the header again. If now there is again no recompilation, the problem is fully reproducible for this set of files. In that case, you should file a bug report and attach the output of "qbs -vv" for the clean and the incremental build, if possible limited to the one product where the dependent source file is located.


Christian



More information about the Qbs mailing list