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

MariaDB 5.5.30 no longer works with MyDumper

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5.30
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      CentOS 6.4 64bit, Nginx 1.4.1, PHP 5.3.25 PHP-FPM, MariaDB 5.5.30 via official YUM repository

      Description

      Problem: Mydumper 0.5.2 no longer works and can not be compiled with MariaDB 5.5.30 while it worked fine with MariaDB 5.5.24. So something changed since MariaDB 5.5.24 ?

      Detail of problem at https://bugs.launchpad.net/mandriva/+bug/803982, Mydumper folks won't fix it at their end so it's left up to MariaDB folks to tackle it I hope as Mydumper is very useful for much faster multi-threaded backups !.

      error = 'undefined reference to `my_net_read''

      -- ------------------------------------------------
      -- MYSQL_CONFIG = /usr/bin/mysql_config
      -- CMAKE_INSTALL_PREFIX = /usr/local
      -- BUILD_DOCS = ON
      -- RUN_CPPCHECK = OFF
      -- Change a values with: cmake -D<Variable>=<Value>
      -- ------------------------------------------------
      -- 
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /usr/local/src/mydumper-0.5.2
      Scanning dependencies of target mydumper
      [ 20%] Building C object CMakeFiles/mydumper.dir/mydumper.c.o
      [ 40%] Building C object CMakeFiles/mydumper.dir/binlog.c.o
      [ 60%] Building C object CMakeFiles/mydumper.dir/server_detect.c.o
      [ 80%] Building C object CMakeFiles/mydumper.dir/g_unix_signal.c.o
      Linking C executable mydumper
      CMakeFiles/mydumper.dir/binlog.c.o: In function `get_binlog_file':
      /usr/local/src/mydumper-0.5.2/binlog.c:160: undefined reference to `my_net_read'
      collect2: ld returned 1 exit status
      make[2]: *** [mydumper] Error 1
      make[1]: *** [CMakeFiles/mydumper.dir/all] Error 2
      make: *** [all] Error 2
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            p4guru George L added a comment -

            Cheers. thanks for the help, I am already using 0.5.2 mydumper and tried launchpad download as well, seems I am not getting the latest ?

            rpm -qa | grep MariaDB
            MariaDB-compat-5.5.31-1.x86_64
            MariaDB-test-5.5.31-1.x86_64
            MariaDB-common-5.5.31-1.x86_64
            MariaDB-devel-5.5.31-1.x86_64
            MariaDB-shared-5.5.31-1.x86_64
            MariaDB-server-5.5.31-1.x86_64
            MariaDB-client-5.5.31-1.x86_64
            
            bzr branch lp:mydumper
            cd mydumper
            patch -p0 < CmakeLists.txt.diff
            
            make
            
            Scanning dependencies of target mydumper
            [ 20%] Building C object CMakeFiles/mydumper.dir/mydumper.c.o
            [ 40%] Building C object CMakeFiles/mydumper.dir/binlog.c.o
            [ 60%] Building C object CMakeFiles/mydumper.dir/server_detect.c.o
            [ 80%] Building C object CMakeFiles/mydumper.dir/g_unix_signal.c.o
            Linking C executable mydumper
            CMakeFiles/mydumper.dir/binlog.c.o: In function `get_binlog_file':
            /usr/local/src/mydumper/binlog.c:160: undefined reference to `my_net_read'
            collect2: ld returned 1 exit status
            make[2]: *** [mydumper] Error 1
            make[1]: *** [CMakeFiles/mydumper.dir/all] Error 2
            make: *** [all] Error 2
            

            the current CMakeCache.txt file http://pastebin.com/raw.php?i=K082fREt

            Show
            p4guru George L added a comment - Cheers. thanks for the help, I am already using 0.5.2 mydumper and tried launchpad download as well, seems I am not getting the latest ? rpm -qa | grep MariaDB MariaDB-compat-5.5.31-1.x86_64 MariaDB-test-5.5.31-1.x86_64 MariaDB-common-5.5.31-1.x86_64 MariaDB-devel-5.5.31-1.x86_64 MariaDB-shared-5.5.31-1.x86_64 MariaDB-server-5.5.31-1.x86_64 MariaDB-client-5.5.31-1.x86_64 bzr branch lp:mydumper cd mydumper patch -p0 < CmakeLists.txt.diff make Scanning dependencies of target mydumper [ 20%] Building C object CMakeFiles/mydumper.dir/mydumper.c.o [ 40%] Building C object CMakeFiles/mydumper.dir/binlog.c.o [ 60%] Building C object CMakeFiles/mydumper.dir/server_detect.c.o [ 80%] Building C object CMakeFiles/mydumper.dir/g_unix_signal.c.o Linking C executable mydumper CMakeFiles/mydumper.dir/binlog.c.o: In function `get_binlog_file': /usr/local/src/mydumper/binlog.c:160: undefined reference to `my_net_read' collect2: ld returned 1 exit status make[2]: *** [mydumper] Error 1 make[1]: *** [CMakeFiles/mydumper.dir/all] Error 2 make: *** [all] Error 2 the current CMakeCache.txt file http://pastebin.com/raw.php?i=K082fREt
            Hide
            wlad Vladislav Vaintroub added a comment -

            Strange. Perhaps the difference is that I used later cmake on my box. Anyway.

            try following
            rm CMakeCache.txt
            cmake . -DMYSQL_LIBRARIES_mysqlclient_r=/usr/lib64/libmysqlclient_r.a
            make

            The above forces using static library for linking . I hope that this static library is there on your machine (if I install MariaDB-devel, it is there)

            Show
            wlad Vladislav Vaintroub added a comment - Strange. Perhaps the difference is that I used later cmake on my box. Anyway. try following rm CMakeCache.txt cmake . -DMYSQL_LIBRARIES_mysqlclient_r=/usr/lib64/libmysqlclient_r.a make The above forces using static library for linking . I hope that this static library is there on your machine (if I install MariaDB-devel, it is there)
            Hide
            p4guru George L added a comment -

            Sweet success ! That was the fix needed

            Vladislav you're a life saver - thanks for all the help !!!

            Scanning dependencies of target mydumper
            [ 20%] Building C object CMakeFiles/mydumper.dir/mydumper.c.o
            [ 40%] Building C object CMakeFiles/mydumper.dir/binlog.c.o
            [ 60%] Building C object CMakeFiles/mydumper.dir/server_detect.c.o
            [ 80%] Building C object CMakeFiles/mydumper.dir/g_unix_signal.c.o
            Linking C executable mydumper
            [ 80%] Built target mydumper
            Scanning dependencies of target myloader
            [100%] Building C object CMakeFiles/myloader.dir/myloader.c.o
            Linking C executable myloader
            [100%] Built target myloader

            Show
            p4guru George L added a comment - Sweet success ! That was the fix needed Vladislav you're a life saver - thanks for all the help !!! Scanning dependencies of target mydumper [ 20%] Building C object CMakeFiles/mydumper.dir/mydumper.c.o [ 40%] Building C object CMakeFiles/mydumper.dir/binlog.c.o [ 60%] Building C object CMakeFiles/mydumper.dir/server_detect.c.o [ 80%] Building C object CMakeFiles/mydumper.dir/g_unix_signal.c.o Linking C executable mydumper [ 80%] Built target mydumper Scanning dependencies of target myloader [100%] Building C object CMakeFiles/myloader.dir/myloader.c.o Linking C executable myloader [100%] Built target myloader
            Hide
            wlad Vladislav Vaintroub added a comment - - edited

            Attached a full patch for mydumper that would prefer linking libmysqlclient_r statically. If you apply it , you should be able to build mydumper using just

            cmake . && make

            Show
            wlad Vladislav Vaintroub added a comment - - edited Attached a full patch for mydumper that would prefer linking libmysqlclient_r statically. If you apply it , you should be able to build mydumper using just cmake . && make
            Hide
            p4guru George L added a comment -

            Tested new patch and confirm all works with just cmake . && make

            thanks Vladislav

            Show
            p4guru George L added a comment - Tested new patch and confirm all works with just cmake . && make thanks Vladislav

              People

              • Assignee:
                wlad Vladislav Vaintroub
                Reporter:
                p4guru George L
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h