Ad Widget

Collapse

compilation erros on SLES 11

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maesen
    Junior Member
    • Sep 2009
    • 6

    #1

    compilation erros on SLES 11

    Hello,

    I have the following error the moment I run configure:
    ./configure --prefix=/usr/local/zabbix --with-mysql --with-net-snmp --enable-server --enable-agent
    ...
    checking for mysql_config... /usr/bin/mysql_config
    checking for main in -lmysqlclient ... no
    configure: error: Not found mysqlclient library

    OS: SLES 11
    Zabbix version: 1.6.6

    The following mysql-packages are installed:
    libmysqlclient15-32bit-5.0.67-13.15
    libmysqlclient-devel-5.0.67-13.16.1
    perl-DBD-mysql-4.008-4.3
    libmysqlclient_r15-5.0.67-13.15
    php5-mysql-5.2.6-50.17
    mysql-5.0.67-13.15
    mysql-client-5.0.67-13.15
    libmysqlclient15-5.0.67-13.15

    FYI: libmysqlclient-devel is the same as mysql-devel in previous releases
    Listing of the files of this package:
    /usr/bin/comp_err
    /usr/bin/mysql_config
    /usr/include/mysql
    /usr/include/mysql/decimal.h
    /usr/include/mysql/errmsg.h
    /usr/include/mysql/keycache.h
    /usr/include/mysql/m_ctype.h
    /usr/include/mysql/m_string.h
    /usr/include/mysql/my_alloc.h
    /usr/include/mysql/my_attribute.h
    /usr/include/mysql/my_config.h
    /usr/include/mysql/my_dbug.h
    /usr/include/mysql/my_dir.h
    /usr/include/mysql/my_getopt.h
    /usr/include/mysql/my_global.h
    /usr/include/mysql/my_list.h
    /usr/include/mysql/my_net.h
    /usr/include/mysql/my_no_pthread.h
    /usr/include/mysql/my_pthread.h
    /usr/include/mysql/my_sys.h
    /usr/include/mysql/my_xml.h
    /usr/include/mysql/mysql.h
    /usr/include/mysql/mysql_com.h
    /usr/include/mysql/mysql_embed.h
    /usr/include/mysql/mysql_time.h
    /usr/include/mysql/mysql_version.h
    /usr/include/mysql/mysqld_ername.h
    /usr/include/mysql/mysqld_error.h
    /usr/include/mysql/raid.h
    /usr/include/mysql/sql_common.h
    /usr/include/mysql/sql_state.h
    /usr/include/mysql/sslopt-case.h
    /usr/include/mysql/sslopt-longopts.h
    /usr/include/mysql/sslopt-vars.h
    /usr/include/mysql/typelib.h
    /usr/lib/libmysqlclient.so
    /usr/lib/libmysqlclient_r.so
    /usr/lib/mysql
    /usr/lib/mysql/libdbug.a
    /usr/lib/mysql/libheap.a
    /usr/lib/mysql/libmyisam.a
    /usr/lib/mysql/libmyisammrg.a
    /usr/lib/mysql/libmysqlclient.a
    /usr/lib/mysql/libmysqlclient.la
    /usr/lib/mysql/libmysqlclient.so
    /usr/lib/mysql/libmysqlclient_r.a
    /usr/lib/mysql/libmysqlclient_r.la
    /usr/lib/mysql/libmysqlclient_r.so
    /usr/lib/mysql/libmysqld.a
    /usr/lib/mysql/libmystrings.a
    /usr/lib/mysql/libmysys.a
    /usr/lib/mysql/libvio.a

    Can someone help me ?
    Thanks in advance
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    Hmm.. I have mysql-server installed instead.
    Supposing you did install it in /usr/lib,

    Try adding the following during the ./configure
    --with-mysql-libraries=/usr/lib/

    Comment

    • maesen
      Junior Member
      • Sep 2009
      • 6

      #3
      the package mysql-5.0.67-13.15 is the same as mysql-server

      If I add the --with-mysql-libraries=/usr/lib I have the same error

      Comment

      • Calimero
        Senior Member
        • Nov 2006
        • 481

        #4
        ldconfig -p | grep libmysql

        does that find something ?

        /usr/bin/mysql_config --libs
        check what "path" (-L) it returns.

        Comment

        • maesen
          Junior Member
          • Sep 2009
          • 6

          #5
          ldconfig -p | grep libmysql

          libmysqlclient_r.so.15 (libc6,x86-64) => /usr/lib64/libmysqlclient_r.so.15
          libmysqlclient.so.15 (libc6,x86-64) => /usr/lib64/libmysqlclient.so.15
          libmysqlclient.so.15 (libc6) => /usr/lib/libmysqlclient.so.15
          libmysqlclient.so (libc6) => /usr/lib/libmysqlclient.so

          mysql_config --libs

          -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto

          I also tried --with-mysql-libraries=/usr/lib64 , but still the same error

          Comment

          • Calimero
            Senior Member
            • Nov 2006
            • 481

            #6
            Looks like you're trying an x86_64 build against i386 libs.

            Unless you really need them, remove mysql*.i386 packages (and probably others i386 packages).
            Mixing both x86_64 and i386 packages can quickly turn into a nightmare.

            Comment

            • nelsonab
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Sep 2006
              • 1233

              #7
              when you install the packages using yast or zypper it should choose the architecture automagically for you.

              I haven't played with the newer SLES versions but on OpenSuSE this is what you would do.

              Code:
              # zypper search mysql
              This will show all mysql packages available for install

              Code:
              # zypper inststall mysql-devel mysql mysql-client php-mysql
              That should install all the mysql related packages you would need
              RHCE, author of zbxapi
              Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
              Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

              Comment

              • maesen
                Junior Member
                • Sep 2009
                • 6

                #8
                I still have find a solution for my problem.
                So i have compiled zabbix with ----with-pgsql .

                Comment

                • RichardCA
                  Junior Member
                  • Sep 2009
                  • 18

                  #9
                  What I did was just download a MySQL package from mysql.com and stage it in /opt/mysql. Then when I did the build I passed in this:

                  --with-mysql=/opt/mysql/bin/mysql_config

                  That's guaranteed to work.

                  Comment

                  Working...