Summary: | dev-db/mysql-8.0.32-r2: ld.lld: error: undefined symbol: absl::lts_20230802::base_internal::SpinLockWait(std::atomic<unsigned int>*, int, absl::lts_20230802::base_internal::SpinLockWaitTransition const*, absl::lts_20230802::base_internal::SchedulingMode) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alfred Wingate <parona> |
Component: | Current packages | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | atoth, leonchik1976, programming, rdalek1967, sam, shimarin |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/32749 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 912819 | ||
Attachments: |
dev-db/mysql-8.0.32-r2 build.log
emerge --info dev-db/mysql-8.0.32-r2 build.log with lto build.log |
Description
Alfred Wingate
2023-08-22 02:34:20 UTC
Created attachment 868439 [details]
dev-db/mysql-8.0.32-r2 build.log
Created attachment 868440 [details]
emerge --info
Initially compiled with LTO which got a different error but from the same missing symbol. /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libprotoc.so: undefined reference to symbol '_ZN4absl12lts_2023080213base_internal12SpinLockWaitEPSt6atomicIjEiPKNS1_22SpinLockWaitTransitionENS1 _14SchedulingModeE' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libabsl_spinlock_wait.so.2308.0.0: error adding symbols: DSO missing from command line Just an interesting note that mysql opportunistically uses lld if lto isnt enabled. Plausibly this could be explicit or add it to BDEPEND? # Use lld for Clang if available and not explicitly disabled. # Also works for gcc on Debian/Ubuntu. Do 'apt install lld'. # LTO build fails with lld, so turn it off by default. IF(LINUX AND NOT WITH_LTO AND NOT CMAKE_COMPILER_FLAG_WITH_LTO) OPTION(USE_LD_LLD "Use llvm lld linker" ON) ELSE() OPTION(USE_LD_LLD "Use llvm lld linker" OFF) ENDIF() IF(USE_LD_LLD) CMAKE_PUSH_CHECK_STATE(RESET) # RPM builds on Fedora use -specs files. # This may cause the test for -fuse-ld=lld to succeed, when it should fail. SET(SAVE_CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) SET(SAVE_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REGEX REPLACE "-specs=/usr/lib/rpm/redhat/.*" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) STRING(REGEX REPLACE "-specs=/usr/lib/rpm/redhat/.*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) SET(CMAKE_REQUIRED_LIBRARIES "-fuse-ld=lld") CHECK_C_SOURCE_COMPILES("int main() {}" C_LD_LLD_RESULT) CHECK_CXX_SOURCE_COMPILES("int main() {}" CXX_LD_LLD_RESULT) IF(C_LD_LLD_RESULT AND CXX_LD_LLD_RESULT) FOREACH(flag CMAKE_C_LINK_FLAGS CMAKE_CXX_LINK_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS ) STRING_APPEND(${flag} " -fuse-ld=lld") ENDFOREACH() ENDIF() SET(CMAKE_C_FLAGS ${SAVE_CMAKE_C_FLAGS}) SET(CMAKE_CXX_FLAGS ${SAVE_CMAKE_CXX_FLAGS}) CMAKE_POP_CHECK_STATE() ENDIF() Created attachment 868441 [details]
dev-db/mysql-8.0.32-r2 build.log with lto
Created attachment 868492 [details]
build.log
same here, downgrading to dev-libs/protobuf-21.12 allows dev-db/mysql installation For now, we may want to switch to bundled protobuf: the ebuild right now has '-DWITH_PROTOBUF=system'. same with dev-libs/protobuf-23.3-r2 (In reply to Sam James from comment #7) > For now, we may want to switch to bundled protobuf: the ebuild right now has > '-DWITH_PROTOBUF=system'. The build works for me with a custom ebuild that uses bundled protobuf `-DWITH_PROTOBUF=bundled` (In reply to Jan Breig from comment #9) > (In reply to Sam James from comment #7) > > For now, we may want to switch to bundled protobuf: the ebuild right now has > > '-DWITH_PROTOBUF=system'. > > The build works for me with a custom ebuild that uses bundled protobuf > `-DWITH_PROTOBUF=bundled` can confirm works also for me (In reply to Leonid Kopylov from comment #10) > (In reply to Jan Breig from comment #9) > > (In reply to Sam James from comment #7) > > The build works for me with a custom ebuild that uses bundled protobuf > > `-DWITH_PROTOBUF=bundled` > > can confirm works also for me Just FYI, you don't need a custom ebuild, just using $ env MYCMAKEARGS="-DWITH_PROTOBUF=bundled" emerge mysql should work as well. (In reply to Guilherme Amadio from comment #11) > $ env MYCMAKEARGS="-DWITH_PROTOBUF=bundled" emerge mysql > > should work as well. can confirm as well (on ARM64). niels. for me it works only with gcc:12 (still being hit by https://bugs.gentoo.org/905209) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc244bfc220f48b2d7fb240e3b1517a47ba63d08 commit dc244bfc220f48b2d7fb240e3b1517a47ba63d08 Author: Alfred Wingate <parona@protonmail.com> AuthorDate: 2023-09-08 00:56:52 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-10-14 08:30:47 +0000 dev-db/mysql: add 8.0.34 Spent time getting tests to pass as well. I can verify that USE="cjk cracklib numa perl profiling router server" pass with gcc-13. I had some testing with other flags as well and didn't see issues other than USE="debug" with having failing tests last I checked. Opted out of fixing some stuff as they would fit better with 8.1 like removing and updating deprecated configurations. Closes: https://bugs.gentoo.org/895256 Closes: https://bugs.gentoo.org/912797 Closes: https://bugs.gentoo.org/905209 Closes: https://bugs.gentoo.org/891369 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/32749 Signed-off-by: Sam James <sam@gentoo.org> dev-db/mysql/Manifest | 2 + dev-db/mysql/mysql-8.0.34.ebuild | 1220 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 1222 insertions(+) |