This first came up in bug 932780 where games-strategy/freeorion was miscompiled. There's a fresh upstream bug for it at https://github.com/boostorg/container/issues/281 but there's an older bug in https://github.com/boostorg/container/issues/252. There's various related commits on `develop` but I'm not sure if any of them will actually fix it and they're also big, a sample: * https://github.com/boostorg/container/commit/978bbb113ab2e72f84f626d3e52039cf06501853 * https://github.com/boostorg/container/commit/03abe8c02c17e4b9876b006174375a927a1cb2cb * https://github.com/boostorg/container/commit/20ad12f20e661978e90dc7f36d8ab8ac05e5a5a9 Mostly filing this because we should probably do *something* about it but I don't know what. I'm not sure what to do yet. The pragma is fragile but I feel like leaving boost-1.85 as-is surely isn't sustainable or safe either. Reverting the bisect result (https://github.com/boostorg/container/commit/1a4a205ea6ef7b4e67a2faab7c7d745711807695) isn't great as it's both: a) a massive commit; b) not the real fix anyway. Options are: a) revert the inline commit above (huge); b) add pragma for no-sa in the header; c) ???
Using https://github.com/boostorg/container/commit/20ad12f20e661978e90dc7f36d8ab8ac05e5a5a9 as a base for the attached patch fixes the problem in boost for me. All of the testcases in the bug reports work and a freeorion rebuild without -fno-strict-aliasing works and the game starts correctly. Changes in my patch: Dropped .gitignore change and removed '/include/' from the file names.
Created attachment 894763 [details, diff] upstream patch adjusted for /etc/portage/patches
Thanks Torsten. I'll speak to soap and see if he's fine with it. (Also, to state the obvious, but lest we forget: we need to crank subslot when adding it...)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bbea521152678132cf0b02e3a152481523b3078 commit 4bbea521152678132cf0b02e3a152481523b3078 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-03 01:19:54 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-03 01:20:45 +0000 dev-libs/boost: fix aliasing violation in boost::container Note that we have to crank the subslot for this. I've added a fudge .1 which we should drop on 1.86.0. Closes: https://bugs.gentoo.org/933289 Bug: https://github.com/freeorion/freeorion/issues/4949 Bug: https://github.com/boostorg/container/issues/252 Bug: https://github.com/boostorg/container/issues/281 Bug: https://bugs.gentoo.org/932780 Bug: https://bugs.gentoo.org/931587 Signed-off-by: Sam James <sam@gentoo.org> dev-libs/boost/boost-1.85.0-r1.ebuild | 348 ++++++++++++++++++ .../files/boost-1.85.0-container-aliasing.patch | 408 +++++++++++++++++++++ 2 files changed, 756 insertions(+)
I sent https://lore.kernel.org/distributions/87cyntm5uv.fsf@gentoo.org/T/#u now too.