Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-1233

LP #922768: HandlerSocket fails to compile if mysql-devel is installed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      **Reported in Launchpad by Ignacio Nin last update 21-11-2013 15:41:17

      In rhel5, HandlerSocket fails to compile if the package mysql-devel 5.0 is installed.

      In the file ./handlersocket/mysql_incl.hpp, mysql_version.h is included and different headers are included depending on the version (less than 5.0.5 and greater than). This causes a strange error in the build run that can be avoided if the path to mysql_version.h in the Percona Server code being compiled is specified before /usr/include.

      The path to this include dir is given to the HandlerSocket build via CXXFLAGS, but its toolchain prepends /usr/include to it (in rhel5). A solution is to use MYSQL_CFLAGS instead of CXXFLAGS when calling the configure script, which is prepended to all flags.

      The error is present below. Notice /usr/include/mysql is present before /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/release/include which is the actual headers directory.

      g++44 -DHAVE_CONFIG_H -I. -I. -I.. -I/home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/sql -I/home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/include -I/home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/regex -I/home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0 -I/usr/include/mysql -fPIC -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=rel24.0 -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1 -DDBUG_OFF -I../libhsclient -O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fno-exceptions -DPERCONA_INNODB_VERSION=rel24.0 -I/home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/release/include -Wall -g -fno-rtti -fno-exceptions -fPIC -DPIC -MT handlersocket_la-database.lo -MD -MP -MF .deps/handlersocket_la-database.Tpo -c database.cpp -fPIC -DPIC -o .libs/handlersocket_la-database.o
      In file included from database.cpp:16:
      mysql_incl.hpp:36:1: warning: "pthread_cond_timedwait" redefined
      In file included from mysql_incl.hpp:24,
      from database.cpp:16:
      /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/include/my_pthread.h:572:1: warning: this is the location of the previous definition
      In file included from database.cpp:16:
      mysql_incl.hpp:37:1: warning: "pthread_mutex_lock" redefined
      In file included from mysql_incl.hpp:24,
      from database.cpp:16:
      /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/include/my_pthread.h:568:1: warning: this is the location of the previous definition
      In file included from database.cpp:16:
      mysql_incl.hpp:38:1: warning: "pthread_mutex_unlock" redefined
      In file included from mysql_incl.hpp:24,
      from database.cpp:16:
      /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/include/my_pthread.h:569:1: warning: this is the location of the previous definition
      In file included from /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/sql/sql_plugin.h:32,
      from /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/sql/structs.h:23,
      from /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/sql/unireg.h:167,
      from /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/sql/sql_class.h:28,
      from mysql_incl.hpp:26,
      from database.cpp:16:
      /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/include/m_string.h: In function 'const uchar* skip_trailing_space(const uchar*, size_t)':
      /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/include/m_string.h:271: error: cast from 'const uchar*' to 'intptr' loses precision
      /home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/include/m_string.h:273: error: cast from 'const uchar*' to 'intptr' loses precision
      make[2]: *** [handlersocket_la-database.lo] Error 1
      make[2]: Leaving directory `/home/jenkins/workspace/percona-server-5.5-rpms/label_exp/centos5-64/target/BUILD/Percona-Server-5.5.19-rel24.0/Percona-Server-5.5.19-rel24.0/storage/HandlerSocket-Plugin-for-MySQL/handlersocket'
      make[1]: *** [all-recursive] Error 1

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lpjirasync lpjirasync (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: