[MDEV-27264] embedded mariadb fails to link with clang Created: 2021-12-15  Updated: 2021-12-15

Status: Open
Project: MariaDB Server
Component/s: Embedded Server
Affects Version/s: 10.8
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

clang version 13.0.0 (Fedora 13.0.0-3.fc35)



 Description   

With

-DWITH_EMBEDDED_SERVER=1

$ cmake --build .
[4/6] Linking CXX shared library libmysqld/libmariadbd.so.19
FAILED: libmysqld/libmariadbd.so.19 
: && /usr/lib64/ccache/clang++ -fPIC -fstack-protector --param=ssp-buffer-size=4 -g -DENABLED_DEBUG_SYNC -ggdb3 -DSAFE_MUTEX -DSAFEMALLOC -DTRASH_FREED_MEMORY -Wall -Wdeclaration-after-statement -Wextra -Wformat-security -Wno-init-self -Wno-null-conversion -Wno-unused-parameter -Wno-unused-private-field -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -Werror  -Wl,-z,relro,-z,now   -Wl,--no-undefined -shared -Wl,-soname,libmariadbd.so.19 -o libmysqld/libmariadbd.so.19 libmysqld/CMakeFiles/libmysqld.dir/libmysqld_exports_file.cc.o  -Wl,-rpath,/usr/local/lib:  -pthread  libmysqld/libmariadbd.a  -lpcre2-8  -lcrypt  -lsystemd  -lsystemd  -lz  -lm  -lssl  -lcrypto  -ldl  tpool/libtpool.a  -pthread  /usr/local/lib/liburing.so && :
/usr/bin/ld: tpool/libtpool.a(aio_simulated.cc.o): relocation R_X86_64_32 against symbol `__gxx_personality_v0@@CXXABI_1.3' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: tpool/libtpool.a(tpool_generic.cc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: tpool/libtpool.a(task_group.cc.o): relocation R_X86_64_32 against symbol `__pthread_key_create@@GLIBC_2.34' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: tpool/libtpool.a(task.cc.o): relocation R_X86_64_32 against symbol `__pthread_key_create@@GLIBC_2.34' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: tpool/libtpool.a(wait_notification.cc.o): relocation R_X86_64_TPOFF32 against `_ZN5tpoolL15tls_thread_poolE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: tpool/libtpool.a(aio_liburing.cc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: tpool/libtpool.a(tpool_generic.cc.o): warning: relocation in read-only section `.text'
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.


Generated at Thu Feb 08 09:51:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.