[Qbs] Problems with QBS dependency detection
Heiko Nardmann
heiko.nardmann at itechnical.de
Mon Jun 26 16:51:55 CEST 2017
Hi together,
before going into details just a short question: am I the only one often
experiencing problems with dependency detection?
Now going into detail ...
*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'!
Interesting enough this happens most of the times only on the CI slaves
- really rarely seen on the local machine (but it happens).
*So* ... am I the only one fighting with such problems???
Two things that might be relevant:
- the header file is a Q_OBJECT header, i.e. it is also processed by moc
- the source file is used twice inside the project: once within the main
product itself, once inside a component test
By sorting the relevant files I really see that
'using_signaturehaschanged.cpp.obj' is older than 'changed.h'. Which I
did not expect ...
/Kind regards,/
Heiko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20170626/4d349594/attachment.html>
More information about the Qbs
mailing list