Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27264

embedded mariadb fails to link with clang

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.8
    • None
    • Embedded Server
    • None
    • 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.
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.