easystroke fails to build on s390x (with fix)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
easystroke (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
easystroke fails to build on s390x with -march=z13 and newer (as introduced in Ubuntu 20.04) because of an unexpected interaction of C++ template and compiler optimizations. tl;dr: The code relies on compiler- and optimization-level dependent behavior and the relatively aggressive inlining parameters on s390x with -march=z13 expose these. Note that I can reproduce the build failures on x86_64 with equivalent gcc parameters --param max-inline-
The build can be fixed by moving the definition of template member functions Stroke::save() and Stroke::load() into gesture.h. As a side-effect, that change unifies code style, since all other classes have their ::save() and ::load() definitions in header files, too.
I have prepared a patch to that avail and submitted a PR upstream (https:/
What is going wrong in detail:
In gesture.h, the template member functions Stroke::save and Stroke::load get called via the serialize() function generated by boost's macro BOOST_SERIALIZA
Note that my patch in https:/ /github. com/markdstjohn /easystroke/ commit/ 686b7778767f1f9 4cf9f6d5c2acd40 1d76bb3d4a applies cleanly on top of 0.6.0-0ubuntu14.