Ad Widget

Collapse

Compiling on Fedora Core 5 64

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gazzerh
    Member
    • Jun 2006
    • 36

    #1

    Compiling on Fedora Core 5 64

    I have been using Zabbix for a while now on 32 bit platforms. I have come across a problem when compiling on FC4 64bit.

    During the make I am getting this error:

    gcc -g -O2 -o zabbix_server -L/usr/lib/mysql -L/usr/lib evalfunc.o expression.o actions.o zlog.o functions.o server.o ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxsysinfo/linux/libzbxsysinfo2.a ../libs/zbxlog/libzbxlog.a ../libs/zbxpid/libzbxpid.a ../libs/zbxconf/libzbxconf.a ../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxnet/libzbxnet.a pinger/libzbxpinger.a poller/libzbxpoller.a housekeeper/libzbxhousekeeper.a alerter/libzbxalerter.a timer/libzbxtimer.a trapper/libzbxtrapper.a ../libs/zbxemail/libzbxemail.a ../libs/zbxsms/libzbxsms.a ../libs/zbxdbhigh/libzbxdbhigh.a ../libs/zbxcommon/libzbxcommon.a -lmysqlclient -lm -lz -lnetsnmp -lcrypto -lresolv -lnsl
    /usr/bin/ld: cannot find -lmysqlclient
    collect2: ld returned 1 exit status
    make[3]: *** [zabbix_server] Error 1
    make[3]: Leaving directory `/root/zabbix-1.1.3/src/zabbix_server'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/root/zabbix-1.1.3/src/zabbix_server'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/zabbix-1.1.3/src'
    make: *** [all-recursive] Error 1

    Any ideas on how to resolve this issue?

    Thanks,
    Garry
  • vrtareg
    Senior Member
    • May 2006
    • 293

    #2
    Hi

    Please check that this MySQL packages are installed:

    mysql-devel-5.0.18-2.1.x86_64.rpm
    mysql-5.0.18-2.1.x86_64.rpm

    Regards
    Areg

    Comment

    • disgruntleddutch
      Member
      • Oct 2006
      • 34

      #3
      vrtareg is right.

      Notice this line:
      Code:
      /usr/bin/ld: cannot find -lmysqlclient

      Comment

      • gazzerh
        Member
        • Jun 2006
        • 36

        #4
        I noticed this line and I wish the solution was that simple:

        # rpm -qa | grep mysql
        mysql-5.0.22-1.FC5.1
        mysqlclient10-devel-3.23.58-9.2
        mysql-server-5.0.22-1.FC5.1
        mysql-connector-odbc-3.51.12-1.2.1
        mysql-devel-5.0.22-1.FC5.1
        mysqlclient14-devel-4.1.14-4.2
        mysql-5.0.22-1.FC5.1
        libdbi-dbd-mysql-0.8.1a-1.2.1
        mysqlclient14-4.1.14-4.2
        mysqlclient10-3.23.58-9.2

        Any other ideas?

        Comment

        • Alexei
          Founder, CEO
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2004
          • 5654

          #5
          I believe this is because ZABBIX autoconf cannot detect /usr/lib64/mysql directory. You may change either configure.in or generated Makefiles. This will be fixed in 1.1.4.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • gazzerh
            Member
            • Jun 2006
            • 36

            #6
            That did it. Thanks Alexei. I just went into src/zabbix_server and ran the gcc command with -L /usr/lib64/mysqld and -L /usr/lib64

            Comment

            • just2blue4u
              Senior Member
              • Apr 2006
              • 347

              #7
              i made a symlink "/usr/lib64 -> /usr/lib" and it worked!
              Big ZABBIX is watching you!
              (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

              Comment

              • gazzerh
                Member
                • Jun 2006
                • 36

                #8
                This is not an ideal solution. Programs you have installed may require 32-bit libs. It's a bit extreme. The configure is just not picking up lib64 so the make files are incorrect. No need to make such a sledgehammer system change.

                My solution is more system safe.

                Garry

                Comment

                • just2blue4u
                  Senior Member
                  • Apr 2006
                  • 347

                  #9
                  If you meant my solution: well, i removed the link after compilation!
                  Big ZABBIX is watching you!
                  (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

                  Comment

                  • vaneet
                    Junior Member
                    • Nov 2006
                    • 3

                    #10
                    64 bit problem

                    Hello all,

                    I am having same problem . cannot find -lmysqlclient

                    What could be the best solution. On the forums, i found three solutions

                    1) http://www.zabbix.com/forum/showthread.php?t=1652 ( i dont want to change the /lib/ to /lib64 since i dont know what other effect it can give to other progams . but if someone can give me proper way to do above, i can try that.

                    2) I believe this is because ZABBIX autoconf cannot detect /usr/lib64/mysql directory. You may change either configure.in or generated Makefiles. This will be fixed in 1.1.4.
                    __________________
                    Alexei Vladishev
                    ZABBIX Product Manager
                    Riga, Latvia

                    Where can i find zabbix autoconf ?

                    3) another post says to make a symlink "/usr/lib64 -> /usr/lib" and it worked!
                    Can someone comment more on this 3 solution

                    Comment

                    • vaneet
                      Junior Member
                      • Nov 2006
                      • 3

                      #11
                      i tried symlink,

                      the problem still remain same ?

                      Comment

                      Working...