[debian-mysql] Bug#933151: mariadb-10.3: FTBFS on riscv64

Aurelien Jarno aurelien at aurel32.net
Sun Aug 23 12:46:45 BST 2020


Hi,

On 2020-08-23 13:39, Otto Kekäläinen wrote:
> The new .24 failed on Debian builders now with:
> 
> https://buildd.debian.org/status/fetch.php?pkg=mariadb-10.3&arch=riscv64&ver=1%3A10.3.24-1&stamp=1598114515&raw=0
> 
> cd /<<PKGBUILDDIR>>/builddir/storage/spider &&
> /usr/bin/riscv64-linux-gnu-g++  -DDBUG_TRACE -DHAVE_CONFIG_H
> -DMYSQL_DYNAMIC_PLUGIN -D_FILE_OFFSET_BITS=64 -Dspider_EXPORTS
> -I/<<PKGBUILDDIR>>/builddir/include
> -I/<<PKGBUILDDIR>>/storage/spider/hs_client -I/<<PKGBUILDDIR>>/include
> -I/<<PKGBUILDDIR>>/sql -I/<<PKGBUILDDIR>>/extra/yassl/include
> -I/<<PKGBUILDDIR>>/extra/yassl/taocrypt/include  -g -O2
> -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
> -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pie
> -fPIC -fstack-protector --param=ssp-buffer-size=4 -fno-rtti
> -DHAVE_HANDLERSOCKET -O2 -g -static-libgcc -fno-omit-frame-pointer
> -fno-strict-aliasing -Wno-uninitialized -D_FORTIFY_SOURCE=2 -DDBUG_OFF
> -Wall -Wextra -Wformat-security -Wno-format-truncation -Wno-init-self
> -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual
> -Wnon-virtual-dtor -Wvla -Wwrite-strings -fPIC   -Wdate-time
> -D_FORTIFY_SOURCE=2 -o CMakeFiles/spider.dir/spd_db_conn.cc.o -c
> /<<PKGBUILDDIR>>/storage/spider/spd_db_conn.cc
> /usr/bin/ld: librocksdblib.a(memtable.cc.o): in function
> `rocksdb::ConcurrentArena::ApproximateMemoryUsage() const':
> ./builddir/storage/rocksdb/./storage/rocksdb/rocksdb/memory/concurrent_arena.h:67:
> 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++/10/bits/atomic_base.h:464: undefined reference to
> `__atomic_compare_exchange_1'
> /usr/bin/ld: /usr/include/c++/10/bits/atomic_base.h:464: undefined
> reference to `__atomic_compare_exchange_1'
> /usr/bin/ld: /usr/include/c++/10/bits/atomic_base.h:464: undefined
> reference to `__atomic_compare_exchange_1'
> /usr/bin/ld: /usr/include/c++/10/bits/atomic_base.h:464: undefined
> reference to `__atomic_compare_exchange_1'
> /usr/bin/ld: librocksdblib.a(memtable.cc.o):/usr/include/c++/10/bits/atomic_base.h:464:
> more undefined references to `__atomic_compare_exchange_1' follow
> [ 71%] Building CXX object storage/spider/CMakeFiles/spider.dir/spd_conn.cc.o
> cd /<<PKGBUILDDIR>>/builddir/storage/spider &&
> /usr/bin/riscv64-linux-gnu-g++  -DDBUG_TRACE -DHAVE_CONFIG_H
> -DMYSQL_DYNAMIC_PLUGIN -D_FILE_OFFSET_BITS=64 -Dspider_EXPORTS
> -I/<<PKGBUILDDIR>>/builddir/include
> -I/<<PKGBUILDDIR>>/storage/spider/hs_client -I/<<PKGBUILDDIR>>/include
> -I/<<PKGBUILDDIR>>/sql -I/<<PKGBUILDDIR>>/extra/yassl/include
> -I/<<PKGBUILDDIR>>/extra/yassl/taocrypt/include  -g -O2
> -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
> -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pie
> -fPIC -fstack-protector --param=ssp-buffer-size=4 -fno-rtti
> -DHAVE_HANDLERSOCKET -O2 -g -static-libgcc -fno-omit-frame-pointer
> -fno-strict-aliasing -Wno-uninitialized -D_FORTIFY_SOURCE=2 -DDBUG_OFF
> -Wall -Wextra -Wformat-security -Wno-format-truncation -Wno-init-self
> -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual
> -Wnon-virtual-dtor -Wvla -Wwrite-strings -fPIC   -Wdate-time
> -D_FORTIFY_SOURCE=2 -o CMakeFiles/spider.dir/spd_conn.cc.o -c
> /<<PKGBUILDDIR>>/storage/spider/spd_conn.cc
> [ 71%] Building CXX object
> storage/perfschema/CMakeFiles/perfschema_embedded.dir/table_file_instances.cc.o
> cd /<<PKGBUILDDIR>>/builddir/storage/perfschema &&
> /usr/bin/riscv64-linux-gnu-g++  -DDBUG_TRACE -DHAVE_CONFIG_H
> -DMYSQL_SERVER -D_FILE_OFFSET_BITS=64
> -I/<<PKGBUILDDIR>>/builddir/include -I/<<PKGBUILDDIR>>
> -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/sql
> -I/<<PKGBUILDDIR>>/builddir/sql -I/<<PKGBUILDDIR>>/extra/yassl/include
> -I/<<PKGBUILDDIR>>/extra/yassl/taocrypt/include  -g -O2
> -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
> -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pie
> -fPIC -fstack-protector --param=ssp-buffer-size=4 -fno-rtti -O2 -g
> -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
> -Wno-uninitialized -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -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 -fPIC -fvisibility=hidden -o
> CMakeFiles/perfschema_embedded.dir/table_file_instances.cc.o -c
> /<<PKGBUILDDIR>>/storage/perfschema/table_file_instances.cc
> collect2: error: ld returned 1 exit status
> make[4]: *** [storage/rocksdb/CMakeFiles/sst_dump.dir/build.make:89:
> storage/rocksdb/sst_dump] Error 1
> make[4]: Leaving directory '/<<PKGBUILDDIR>>/builddir'
> make[3]: *** [CMakeFiles/Makefile2:7909:
> storage/rocksdb/CMakeFiles/sst_dump.dir/all] Error 2
> make[3]: *** Waiting for unfinished jobs....

This libatomic issue is problematic for packages using cmake. libatomic
is automatically added to the link process when thread support is
enabled, ie when linking with -pthread. However cmake insists in linking
directly with the thread library using -lpthread, which doesn't enable
full thread supports (as another example it doesn't define __REENTRANT
on GNU/Linux or _MT on Solaris).

This can usually be fixed by looking for "FIND_PACKAGE(Threads)" in
CMakeLists.txt files and adding "set(THREADS_PREFER_PTHREAD_FLAG ON)"
before.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien at aurel32.net                 http://www.aurel32.net



More information about the pkg-mysql-maint mailing list