Avoid indeterminism in kcolorschemeeditor
ClosedPublic

Authored by bmwiedemann on Nov 21 2018, 3:19 PM.

Details

Summary

Avoid indeterminism in kcolorschemeeditor

Without this patch,
build/kcms/colors/CMakeFiles/kcolorschemeeditor.dir/kcolorschemeeditor_autogen/mocs_compilation.cpp.o
and the resulting /usr/bin/kcolorschemeeditor varied from parallelism.

See https://reproducible-builds.org/ for why this matters.

See also https://bugzilla.opensuse.org/show_bug.cgi?id=1109420

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bmwiedemann created this revision.Nov 21 2018, 3:19 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 21 2018, 3:19 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
bmwiedemann requested review of this revision.Nov 21 2018, 3:19 PM

Well it's not really a dependency, is it? They only use the same sources to build up two different views of the same widget. This patch is hacky as the original cmakefile... I understand the need but can't the patch fix the root cause instead?

If you look at http://rb.zq1.de/compare.factory-20181121/plasma5-desktop-compare.out
You can see that the asm diff between a -j1 and a -j4 build of openSUSE's plasma5-desktop package contains (among many others)

-_ZN18SchemeEditorDialog18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv.part.1:
+_ZN19SchemeEditorEffects18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv.part.1:

and I found that it goes away when you tell cmake or make to build one after the other (either order works) like with this patch.
But what is the root cause then? And how do you fix it better?

ochurlaud accepted this revision.Nov 22 2018, 6:39 AM

The root cause is that we build twice the same elements instead of having one share lib used on the two contexts.

I guess this is more involved to do the proper fix, so at first yours can be OK... Push it!

This revision is now accepted and ready to land.Nov 22 2018, 6:39 AM

Can you please push it?
I am contributing so rarely, that it is not worth having commit access.

This revision was automatically updated to reflect the committed changes.