Genuineh commented on PR #3024: URL: https://github.com/apache/kvrocks/pull/3024#issuecomment-3148845268
I have previously performed a rolling upgrade of the system. And build error after upgraded. ## build error ``` ld.lld: error: undefined symbol: __atomic_compare_exchange >>> referenced by slot_migrate.cc >>> CMakeFiles/kvrocks_objs.dir/src/cluster/kvrocks.lto.slot_migrate.cc.o:(SlotMigrator::PerformSlotRangeMigration(std::__cxx11::basic_string<char, std::char_ traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, SlotRange const&, SyncMigrateContext*)) clang++: error: linker command failed with exit code 1 (use -v to see invocation) ``` ## clang version ``` clang --version clang version 20.1.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin ``` ## gcc version ``` COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/15.1.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust,cobol --enable-bootstrap --prefix=/usr --libdir=/usr/lib -- libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-conf ig=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable -lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.1.1 20250425 (GCC) ``` ## build cmd ``` ./x.py build --compiler=clang -DENABLE_OPENSSL=ON -DPORTABLE=1 -DCMAKE_BUILD_TYPE=Release -j $(nproc) ``` ## My Reslove Add `list(APPEND EXTERNAL_LIBS atomic)` line in `CMakeLists.txt` fixed. @git-hulk If this issue needs to be addressed, you may need to first look into how to handle it. I will then consolidate everything before submitting it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
