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

Multiple definition issue on FreeBSD after 10.3.9 update

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 10.3.9
    • Fix Version/s: 10.3.10
    • Component/s: Compiling
    • Labels:
    • Environment:
      FreeBSD 11.2 GENERIC
      FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
      CMake 3.12.0

      Description

      After fixing the relocation issue in 17009 by adding -fPIC to CMAKE_C_FLAGS_RELEASE, I get a link error in plugin/server_audit.
      Inspecting the libmysys.a I don't see a duplicate file_logger.c.o in the archive, inspecting file_logger.c.o with readelf -a does not reveal duplicate definitions either.

      [ 84%] Linking CXX shared module server_audit.so
      cd /usr/ports/databases/mariadb103-server/work/mariadb-10.3.9/plugin/server_audit && /usr/local/bin/cmake -E cmake_link_script CMakeFiles
      /server_audit.dir/link.txt --verbose=1
      /usr/bin/c++ -fPIC -O2 -pipe -fPIC -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -Wl,-z
      ,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -fno-rtti -O2 -pipe -fPIC -fstack-protector -isystem /usr/local/include -fno-st
      rict-aliasing  -isystem /usr/local/include -D_FORTIFY_SOURCE=2 -DDBUG_OFF   -fstack-protector -shared  -o server_audit.so CMakeFiles/serv
      er_audit.dir/server_audit.c.o CMakeFiles/server_audit.dir/test_audit_v4.c.o -pthread ../../libservices/libmysqlservices.a ../../sql/libsq
      l.a ../../storage/csv/libcsv.a ../../storage/heap/libheap.a ../../storage/innobase/libinnobase.a -llzma -lbz2 ../../storage/maria/libaria
      .a ../../storage/myisam/libmyisam.a ../../storage/myisammrg/libmyisammrg.a ../../storage/perfschema/libperfschema.a ../../storage/sequenc
      e/libsequence.a ../feedback/libfeedback.a ../user_variables/libuser_variables.a ../userstat/libuserstat.a ../../sql/libpartition.a ../../
      sql/libsql_sequence.a ../../mysys/libmysys.a ../../mysys_ssl/libmysys_ssl.a ../../dbug/libdbug.a ../../mysys/libmysys.a ../../mysys_ssl/l
      ibmysys_ssl.a ../../dbug/libdbug.a -lz -lm -lexecinfo ../../strings/libstrings.a ../../vio/libvio.a ../../pcre/libpcre.a -lwrap -lcrypt -
      lssl -lcrypto ../../wsrep/libwsrep.a -pthread                                                                                            ../../mysys/libmysys.a(file_logger.c.o): In function `logger_init_mutexes':
      file_logger.c:(.text+0x7f0): multiple definition of `logger_init_mutexes'
      CMakeFiles/server_audit.dir/server_audit.c.o:server_audit.c:(.text+0x630): first defined here
      ../../mysys/libmysys.a(file_logger.c.o): In function `logger_printf':
      file_logger.c:(.text+0x760): multiple definition of `logger_printf'
      CMakeFiles/server_audit.dir/server_audit.c.o:server_audit.c:(.text+0x5a0): first defined here
      ../../mysys/libmysys.a(file_logger.c.o): In function `logger_vprintf':
      file_logger.c:(.text+0x1f0): multiple definition of `logger_vprintf'
      CMakeFiles/server_audit.dir/server_audit.c.o:server_audit.c:(.text+0x1c0): first defined here
      c++: error: linker command failed with exit code 1 (use -v to see invocation)
      *** Error code 1
      

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              spil Bernard Spil
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: