Summary: | games-engines/devilutionx-1.2.1 fails to compile with >=dev-libs/libsodium-1.0.18_p20210421 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anders, sam |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/diasurgical/devilutionX/issues/2615 https://github.com/gentoo/gentoo/pull/22008 https://github.com/diasurgical/devilutionX/pull/2623 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 251464 | ||
Attachments: |
build.log
devilutionx-dynamic-linking.patch |
Description
Agostino Sarubbo
2021-05-19 06:41:51 UTC
Created attachment 709752 [details]
build.log
build log and emerge --info
Possible context of error(s): (.text+0x102): undefined reference to `_dl_x86_cpu_features' (.text+0x14d9): undefined reference to `_dl_stack_flags' (.text+0x39d): undefined reference to `_dl_pagesize' (.text+0x49a): undefined reference to `_dl_pagesize' (.text+0x53f): undefined reference to `_dl_stack_cache_lock' (.text+0x679): undefined reference to `_dl_stack_cache_lock' (.text+0x7b3): undefined reference to `_dl_stack_used' (.text+0xa7c): undefined reference to `_dl_stack_cache_lock' (.text+0xd56): undefined reference to `_dl_stack_cache_lock' (.text+0xe90): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x14e8): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x15d2): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x15d9): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x15f2): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1613): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1a48): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1a55): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1a63): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1a7c): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1a84): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1aa6): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1cf4): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1e19): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1e40): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1e47): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1e60): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1e73): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x1e82): undefined reference to `_dl_stack_flags' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x2034): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x20c2): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x20df): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x2119): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x2164): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x3ec): undefined reference to `_dl_pagesize' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x41e): undefined reference to `_dl_init_static_tls' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x5e5): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x605): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x613): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x686): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x68d): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x6e3): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x705): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x773): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x7ba): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x7e4): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x7fb): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x802): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x8a2): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x8a9): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x8bd): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x8c4): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x8cb): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x8f0): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x8f7): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x912): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x9e2): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0x9e9): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xa89): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xa90): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xade): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xae5): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xc37): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xc5c): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xcb9): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xcf9): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xd32): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xd63): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xd6a): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xdc3): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xdca): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xe24): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xe43): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xe6d): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xe9d): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xea4): undefined reference to `_dl_stack_used' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xec8): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xee3): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xeea): undefined reference to `_dl_stack_user' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xf2d): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: (.text+0xf43): undefined reference to `_dl_stack_cache_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: packet.cpp:(.text+0xc0d): undefined reference to `crypto_pwhash' /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: packet.cpp:(.text+0xe38): undefined reference to `crypto_secretbox_easy' packet.cpp:(.text+0xb60): undefined reference to `sodium_init' packet.cpp:(.text+0xd38): undefined reference to `crypto_secretbox_open_easy' packet.cpp:(.text+0xe21): undefined reference to `randombytes_buf' tcp_client.cpp:(.text+0x2106): undefined reference to `randombytes_buf' udp_p2p.cpp:(.text+0x28fc): undefined reference to `randombytes_buf' collect2: error: ld returned 1 exit status A quick and dirty workaround is to downgrade to ~dev-libs/libsodium-1.0.18 Notes from before: - looks like it's mixing static and dynamic linking - need to try turning off the 'PROD' option in CMakeLists.txt? https://github.com/diasurgical/devilutionX/pull/1235 might be relevant although we should try avoid static if possible Any update? I've filed a stablereq for dev-libs/libsodium-1.0.18_p20210617. Upstream is unwilling to help. (In reply to Lars Wendler (Polynomial-C) from comment #7) > Upstream is unwilling to help. Correction, upstream lacks the resoures to help us here. > Upstream is unwilling to help.
We are most willing to help, but we can't, we don't even know what version of libsodium you guys are using?
From my perspective it looks like Gentoo has a version of libsodium that has API breaking changes compared to libsodium-1.0.18.
P.s. I might not get notifications from here so best to leave a comment in the linked issue on GitHub if you need my attention. (In reply to Anders Jenbo from comment #9) > > Upstream is unwilling to help. > > We are most willing to help, but we can't, we don't even know what version > of libsodium you guys are using? > > From my perspective it looks like Gentoo has a version of libsodium that has > API breaking changes compared to libsodium-1.0.18. Apologies for my hasty imputation. I corrected myself in the followup comment. Unfortunately I lack the skills to find a fix for this. I haven't decided yet if I use bundled libsodium (which I'd like to avoid) or simply drop the package from Gentoo. (In reply to Lars Wendler (Polynomial-C) from comment #11) > (In reply to Anders Jenbo from comment #9) > > > Upstream is unwilling to help. > > > > We are most willing to help, but we can't, we don't even know what version > > of libsodium you guys are using? > > See https://github.com/diasurgical/devilutionX/issues/2615#issuecomment-899607735: "It's not a snapshot in the conventional sense. See here. I review the commits before adding to Gentoo. _p20210617 means "the stable tarball available released on that date", which actually means the last commit on that day. TL;DR: upstream really want us to use the latest stable tarball they put out." > > From my perspective it looks like Gentoo has a version of libsodium that has > > API breaking changes compared to libsodium-1.0.18. > > Apologies for my hasty imputation. I corrected myself in the followup > comment. > > Unfortunately I lack the skills to find a fix for this. > I haven't decided yet if I use bundled libsodium (which I'd like to avoid) > or simply drop the package from Gentoo. See https://bugs.gentoo.org/791031#c4. I think we can workaround this in Gentoo at least by setting "-DDIST=OFF" in the ebuild, as we prefer to not statically link libraries where possible. This works around the isssue for me. I've posted an update to the upstream bug on the issues as there's actually two here (libdl and then libsodium itself), but the Gentoo fix seems enough on this end. Just to be ultra clear, from the libsodium README linked: "These additions over the point release are guaranteed to never change the behavior or API. Version x.y.z-stable is always fully compatible with version x.y.z. New features or breaking changes will never be introduced in a stable set of changes." OK, posted an update to the upstream bug: https://github.com/diasurgical/devilutionX/issues/2615#issuecomment-899943234. PR for Gentoo posted (to dynamicallly link, which resolves the issue on our end) as well as a PR to use pkgconfig to find libsodium upstream (solves the issue upstream too). Phew! Thanks for helping upstream guys :) (In reply to Anders Jenbo from comment #15) > Thanks for helping upstream guys :) No problem, thank you for the help! Created attachment 737935 [details]
devilutionx-dynamic-linking.patch
Please review the attached patch (devilutionx-dynamic-linking.patch) which has been on GitHub in the linked PR for the last 3 weeks.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10f72b03c4cd2ee737367663c7598fa0e9e0b1fd commit 10f72b03c4cd2ee737367663c7598fa0e9e0b1fd Author: Sam James <sam@gentoo.org> AuthorDate: 2021-08-17 01:44:47 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-09-17 19:55:26 +0000 games-engines/devilutionx: use dynamic linking (fixes libsodium build) -DDIST controls whether devilutionx links dynamically to libraries (only SDL 2 and glibc are linked dynamically otherwise). For later versions of libsodium, FindSodium.cmake malfunctions and does not correctly populate all the needed variables. For Gentoo's purposes, we can ignore this problem, and instead force dynamic linking (which is policy anyway). A fix to use a supported method to detect libsodium (pkg-config) is being pursued upstream. Maintainer timeout. Bug: https://github.com/diasurgical/devilutionX/issues/2615 Closes: https://bugs.gentoo.org/791031 Signed-off-by: Sam James <sam@gentoo.org> .../{devilutionx-1.2.1.ebuild => devilutionx-1.2.1-r1.ebuild} | 4 +++- games-engines/devilutionx/devilutionx-9999.ebuild | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=791b464c43aa44529992ecfcd50b8a648702c3ee commit 791b464c43aa44529992ecfcd50b8a648702c3ee Author: Sam James <sam@gentoo.org> AuthorDate: 2021-08-17 01:49:35 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-09-17 19:55:59 +0000 games-engines/devilutionx: subscribe to libsodium subslot We need to be rebuilt when the subslot (ABI) of libsodium changes. Maintainer timeout. Bug: https://bugs.gentoo.org/791031 Closes: https://github.com/gentoo/gentoo/pull/22008 Signed-off-by: Sam James <sam@gentoo.org> games-engines/devilutionx/devilutionx-1.2.1-r1.ebuild | 2 +- games-engines/devilutionx/devilutionx-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) |