Summary: | games-strategy/ja2-stracciatella-0.20.0 fails to compile (lto): Strategic_Pathing.cc:30:8: error: type ‘struct path_t’ violates the C++ One Definition Rule [-Werror=odr] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ppw0 |
Component: | Current packages | Assignee: | Misanthropos <misanthropos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | eschwartz93, games, jstein |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/ja2-stracciatella/ja2-stracciatella/issues/1963 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: |
build log
emerge --info |
Created attachment 874156 [details]
emerge --info
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaaf2b02085fe368746241561c29050eca562882 commit aaaf2b02085fe368746241561c29050eca562882 Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-03-29 15:32:28 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-29 18:45:16 +0000 games-strategy/ja2-stracciatella: mark as LTO-unsafe Closes: https://bugs.gentoo.org/916965 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> games-strategy/ja2-stracciatella/ja2-stracciatella-0.21.0.ebuild | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) |
Created attachment 874155 [details] build log In a stricter lto environment, ja2-stracciatella-0.20.0 will fail to compile with the following errors: ``` /var/tmp/portage/games-strategy/ja2-stracciatella-0.20.0/work/ja2-stracciatella-0.20.0/src/game/Strategic/Strategic_Pathing.cc:30:8: error: type ‘struct path_t’ violates the C++ One Definition Rule [-Werror=odr] 30 | struct path_t | ^ /var/tmp/portage/games-strategy/ja2-stracciatella-0.20.0/work/ja2-stracciatella-0.20.0/src/game/Tactical/PathAI.cc:85:8: note: a different type is defined in another translation unit 85 | struct path_t | ^ /var/tmp/portage/games-strategy/ja2-stracciatella-0.20.0/work/ja2-stracciatella-0.20.0/src/game/Strategic/Strategic_Pathing.cc:32:15: note: the first difference of corresponding definitions is field ‘nextLink’ 32 | INT16 nextLink; //2 | ^ /var/tmp/portage/games-strategy/ja2-stracciatella-0.20.0/work/ja2-stracciatella-0.20.0/src/game/Tactical/PathAI.cc:87:17: note: a field with different name is defined in another translation unit 87 | INT32 iLocation; //4 | ^ /var/tmp/portage/games-strategy/ja2-stracciatella-0.20.0/work/ja2-stracciatella-0.20.0/src/game/Strategic/Strategic_Pathing.cc:40:8: error: type ‘struct trail_t’ violates the C++ One Definition Rule [-Werror=odr] 40 | struct trail_t | ^ /var/tmp/portage/games-strategy/ja2-stracciatella-0.20.0/work/ja2-stracciatella-0.20.0/src/game/Tactical/PathAI.cc:98:8: note: a different type is defined in another translation unit 98 | struct trail_t | ^ /var/tmp/portage/games-strategy/ja2-stracciatella-0.20.0/work/ja2-stracciatella-0.20.0/src/game/Strategic/Strategic_Pathing.cc:43:15: note: the first difference of corresponding definitions is field ‘diStratDelta’ 43 | short diStratDelta; | ^ /var/tmp/portage/games-strategy/ja2-stracciatella-0.20.0/work/ja2-stracciatella-0.20.0/src/game/Tactical/PathAI.cc:101:15: note: a field with different name is defined in another translation unit 101 | UINT8 stepDir; | ^ lto1: some warnings being treated as errors lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. ``` Attaching logs.