[debian-mysql] Bug#1024041: mariadb-10.6: FTBFS on riscv64: rocksdb/db/memtable.cc:129: undefined reference to `__atomic_compare_exchange_1'

Gianfranco Costamagna locutusofborg at debian.org
Thu Feb 2 10:47:42 GMT 2023


control: reopen -1

Hello, sorry for being pesty,
but we already have a riscv64 hack in the source code upstream, but its not working due to the variable being erased just after
https://github.com/MariaDB/server/pull/2472

I fixed it and opened a PR upstream, so we can drop our debian/rules hack
(BTW we should probably do some CheckAtomic.cmake include so we fix all the latomic ports)


-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
- set(SYSTEM_LIBS ${SYSTEM_LIBS} -latomic)
-endif()

+include(CheckAtomic)
+if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
+  set(SYSTEM_LIBS ${SYSTEM_LIBS} -latomic)
+endif()

For example this one
https://github.com/tomopy/tomopy/pull/599/files


G.

On Sun, 13 Nov 2022 14:49:13 -0800 =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?= <otto at debian.org> wrote:
> Source: mariadb-10.6
> Version: 1:10.6.9-1
> Tags: upstream, confirmed, ftbfs
> User: debian-riscv at lists.debian.org
> Usertags: riscv64, riscv
> X-Debbugs-CC: debian-riscv at lists.debian.org
> 
> After upload of mariadb-10.6 1:10.6.9-1 I noticed that riscv64 builds
> at https://buildd.debian.org/status/package.php?p=mariadb-10.6 were
> failing:
> 
> ************************************************************************************
> cd /<<PKGBUILDDIR>>/builddir/storage/innobase && /usr/bin/c++
> -DBTR_CUR_ADAPT -DBTR_CUR_HASH_ADAPT -DCOMPILER_HINTS -DDBUG_TRACE
> -DEMBEDDED_LIBRARY -DHAVE_CONFIG_H
> -DHAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE=1 -DHAVE_LIBNUMA=1 -DHAVE_LZ4=1
> -DHAVE_LZ4_COMPRESS_DEFAULT=1 -DHAVE_SCHED_GETCPU=1 -DHAVE_SNAPPY=1
> -DHAVE_URING -D_FILE_OFFSET_BITS=64
> -I/<<PKGBUILDDIR>>/wsrep-lib/include
> -I/<<PKGBUILDDIR>>/wsrep-lib/wsrep-API/v26
> -I/<<PKGBUILDDIR>>/builddir/include
> -I/<<PKGBUILDDIR>>/storage/innobase/include
> -I/<<PKGBUILDDIR>>/storage/innobase/handler
> -I/<<PKGBUILDDIR>>/libbinlogevents/include -I/<<PKGBUILDDIR>>/tpool
> -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/sql -g -O2
> -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
> -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time
> -D_FORTIFY_SOURCE=2 -pie -fPIC -fstack-protector
> --param=ssp-buffer-size=4 -Wconversion -Wno-sign-conversion -O2 -g
> -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
> -Wno-uninitialized -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2
> -DDBUG_OFF -Wall -Wenum-compare -Wenum-conversion -Wextra
> -Wformat-security -Wno-format-truncation -Wno-init-self
> -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual
> -Wnon-virtual-dtor -Wvla -Wwrite-strings   -Wdate-time
> -D_FORTIFY_SOURCE=2 -DUNIV_LINUX -D_GNU_SOURCE=1 -DHAVE_OPENSSL
> -DOPENSSL_API_COMPAT=0x10100000L -fPIC -fvisibility=hidden
> -std=gnu++11 -MD -MT
> storage/innobase/CMakeFiles/innobase_embedded.dir/row/row0quiesce.cc.o
> -MF CMakeFiles/innobase_embedded.dir/row/row0quiesce.cc.o.d -o
> CMakeFiles/innobase_embedded.dir/row/row0quiesce.cc.o -c
> /<<PKGBUILDDIR>>/storage/innobase/row/row0quiesce.cc
> librocksdblib.a(memtable.cc.o): in function
> `rocksdb::MemTable::ApproximateMemoryUsage()':
> ./builddir/storage/rocksdb/./storage/rocksdb/rocksdb/db/memtable.cc:129:
> undefined reference to `__atomic_compare_exchange_1'
> /usr/bin/ld: librocksdblib.a(memtable.cc.o): in function
> `std::__atomic_base<bool>::compare_exchange_weak(bool&, bool,
> std::memory_order, std::memory_order)':
> /usr/include/c++/12/bits/atomic_base.h:523: undefined reference to
> `__atomic_compare_exchange_1'
> /usr/bin/ld: /usr/include/c++/12/bits/atomic_base.h:523: undefined
> reference to `__atomic_compare_exchange_1'
> /usr/bin/ld: /usr/include/c++/12/bits/atomic_base.h:523: undefined
> reference to `__atomic_compare_exchange_1'
> /usr/bin/ld: /usr/include/c++/12/bits/atomic_base.h:523: undefined
> reference to `__atomic_compare_exchange_1'
> /usr/bin/ld: librocksdblib.a(memtable.cc.o):/usr/include/c++/12/bits/atomic_base.h:523:
> more undefined references to `__atomic_compare_exchange_1' follow
> [ 53%] Building CXX object



More information about the pkg-mysql-maint mailing list