Ad Widget

Collapse

Compile Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sgoodliff
    Junior Member
    • Jul 2005
    • 20

    #1

    Compile Problem

    Hello All,

    OS = RHES4

    1.1alpha10 is running on the machine fine, I tried to install to beta1,

    "./configure --enable-server --with-mysql --with-net-snmp --prefix=/usr/local/zabbix-1.1beta1"

    Works OK, however the make fails with the following,

    "poller/libzbxpoller.a(poller.o)(.text+0x1a6): In function `get_minnextcheck':
    /tmp/zabbix-1.1beta1/src/zabbix_server/poller/poller.c:132: undefined reference to `mysql_free_result'
    poller/libzbxpoller.a(poller.o)(.text+0x261):/tmp/zabbix-1.1beta1/src/zabbix_server/poller/poller.c:165: more undefined references to `mysql_free_result' follow"

    There are many errors all have undefined references to mysql_free_result.

    Any ideas ?
  • BryanR
    Junior Member
    • Oct 2005
    • 4

    #2
    Perhaps it's struggling to find either your MySQL include dir or lib dir?

    Try adding -I/usr/include/mysql -L/usr/lib/mysql (or wherever your mysql files are kept) to the configure line.

    Comment

    • ftpuser
      Junior Member
      • Feb 2005
      • 11

      #3
      Same problem

      I am also having the same problem. I just tried the offered solution and it didn't work. I am on FC3 though...

      Comment

      • ftpuser
        Junior Member
        • Feb 2005
        • 11

        #4
        tried to consolidate these posts

        I tried to go into all the posts I could find about this problem and put a link to this post... Having done that, I should have also done the reverse and put all of them in here.... Maybe next time.

        Either way it seems to be a problem with mysql and where and how it was installed. I will attempt to figure out the symlink suggestion, as was in another post, and will post my results.

        Comment

        • ftpuser
          Junior Member
          • Feb 2005
          • 11

          #5
          Solution worked



          this seemed to work.... now to continue the configuration....

          I had /usr/lib/libmysqlclient.so.14.0.0

          but did not have /usr/lib/mysql/libmysqlclient.so

          after doing
          ln -s /usr/lib/libmysqlclient.so.14.0.0 /usr/lib/mysql/libmysqlclient.so

          I ran the ./configure then the make install and it seemed to compile without a problem.

          Thanks everyone for your help.

          Comment

          • pasci
            Junior Member
            • Jul 2005
            • 9

            #6
            SuSE Linux 9.1

            On SuSE Linux 9.1 your solution (with published symlink) works also fine!

            Thanks!

            Comment

            • sgoodliff
              Junior Member
              • Jul 2005
              • 20

              #7
              Symlink solution worked a treat.

              Thank you

              Comment

              • jeremy.lecour
                Junior Member
                • Sep 2005
                • 4

                #8
                WTF with my RH7.2

                Hi,

                I have this :
                Code:
                # ls -l /usr/lib | grep mysql
                lrwxrwxrwx    1 root     root           26 jan  9  2005 libmysqlclient_r.so -> libmysqlclient_r.so.10.0.0
                lrwxrwxrwx    1 root     root           26 jan  9  2005 libmysqlclient_r.so.10 -> libmysqlclient_r.so.10.0.0
                -rwxr-xr-x    1 root     root       230560 sep 11  2003 libmysqlclient_r.so.10.0.0
                lrwxrwxrwx    1 root     root           24 jan  9  2005 libmysqlclient.so -> libmysqlclient.so.10.0.0
                lrwxrwxrwx    1 root     root           24 jan  9  2005 libmysqlclient.so.10 -> libmysqlclient.so.10.0.0
                -rwxr-xr-x    1 root     root       224606 sep 11  2003 libmysqlclient.so.10.0.0
                drwxr-xr-x    2 root     root         4096 jan  9  2005 mysql

                What could I do to fix those compilation errors (zabbix1.1beta2) :

                Code:
                evalfunc.o: In function `evaluate_COUNT':
                /home/zabbix/zabbix/src/zabbix_server/evalfunc.c:93: undefined reference to `mysql_free_result'
                evalfunc.o: In function `evaluate_SUM':
                /home/zabbix/zabbix/src/zabbix_server/evalfunc.c:142: undefined reference to `mysql_free_result'
                evalfunc.o: In function `evaluate_AVG':
                /home/zabbix/zabbix/src/zabbix_server/evalfunc.c:192: undefined reference to `mysql_free_result'
                evalfunc.o: In function `evaluate_MIN':
                /home/zabbix/zabbix/src/zabbix_server/evalfunc.c:242: undefined reference to `mysql_free_result'
                evalfunc.o: In function `evaluate_MAX':
                /home/zabbix/zabbix/src/zabbix_server/evalfunc.c:292: undefined reference to `mysql_free_result'
                evalfunc.o:/home/zabbix/zabbix/src/zabbix_server/evalfunc.c:342: more undefined references to `mysql_free_result' follow
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBclose':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:47: undefined reference to `mysql_close'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBconnect':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:66: undefined reference to `mysql_init'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:67: undefined reference to `mysql_real_connect'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:69: undefined reference to `mysql_error'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:70: undefined reference to `mysql_error'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:71: undefined reference to `mysql_errno'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:71: undefined reference to `mysql_errno'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:78: undefined reference to `mysql_select_db'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:81: undefined reference to `mysql_error'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:82: undefined reference to `mysql_error'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBexecute':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:128: undefined reference to `mysql_errno'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:128: undefined reference to `mysql_error'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:129: undefined reference to `mysql_errno'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:129: undefined reference to `mysql_errno'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:134: undefined reference to `mysql_query'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBselect':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:174: undefined reference to `mysql_errno'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:174: undefined reference to `mysql_error'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:175: undefined reference to `mysql_errno'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:175: undefined reference to `mysql_errno'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:180: undefined reference to `mysql_query'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBget_field':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:214: undefined reference to `mysql_data_seek'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:215: undefined reference to `mysql_fetch_row'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:218: undefined reference to `mysql_error'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:219: undefined reference to `mysql_error'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBinsert_id':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:236: undefined reference to `mysql_insert_id'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBaffected_rows':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:250: undefined reference to `mysql_affected_rows'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBnum_rows':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:294: undefined reference to `mysql_num_rows'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBget_function_result':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:346: undefined reference to `mysql_free_result'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBget_prev_trigger_value':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:373: undefined reference to `mysql_free_result'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:382: undefined reference to `mysql_free_result'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:389: undefined reference to `mysql_free_result'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:398: undefined reference to `mysql_free_result'
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o):/home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:402: more undefined references to `mysql_free_result' follow
                ../libs/zbxdbhigh/libzbxdbhigh.a(db.o): In function `DBselect':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/db.c:182: undefined reference to `mysql_store_result'
                ../libs/zbxdbhigh/libzbxdbhigh.a(action.o): In function `DBget_action_by_actionid':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/action.c:92: undefined reference to `mysql_free_result'
                ../libs/zbxdbhigh/libzbxdbhigh.a(action.o): In function `DBadd_action_to_linked_hosts':
                /home/zabbix/zabbix/src/libs/zbxdbhigh/action.c:131: undefined reference to `mysql_free_result'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/action.c:137: undefined reference to `mysql_free_result'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/action.c:177: undefined reference to `mysql_free_result'
                /home/zabbix/zabbix/src/libs/zbxdbhigh/action.c:179: undefined reference to `mysql_free_result'
                ../libs/zbxdbhigh/libzbxdbhigh.a(graph.o):/home/zabbix/zabbix/src/libs/zbxdbhigh/graph.c:105: more undefined references to `mysql_free_result' follow
                collect2: ld returned 1 exit status
                make[3]: *** [zabbix_server] Erreur 1
                make[3]: Quitte le répertoire `/home/zabbix/zabbix/src/zabbix_server'
                make[2]: *** [all-recursive] Erreur 1
                make[2]: Quitte le répertoire `/home/zabbix/zabbix/src/zabbix_server'
                make[1]: *** [all-recursive] Erreur 1
                make[1]: Quitte le répertoire `/home/zabbix/zabbix/src'
                make: *** [all-recursive] Erreur 1
                Thanks for any help

                Comment

                • rushowr
                  Member
                  • Jul 2005
                  • 30

                  #9
                  Even symlink solution did not work

                  I'm attempting to compile 1.1beta2 and getting the following output:

                  Code:
                  evalfunc.o(.text+0x81): In function `evaluate_COUNT':
                  /usr/src/zabbix-1.1beta2/src/zabbix_server/evalfunc.c:93: undefined reference to `mysql_free_result'
                  evalfunc.o(.text+0x129): In function `evaluate_SUM':
                  /usr/src/zabbix-1.1beta2/src/zabbix_server/evalfunc.c:142: undefined reference to `mysql_free_result'
                  evalfunc.o(.text+0x1d5): In function `evaluate_AVG':
                  /usr/src/zabbix-1.1beta2/src/zabbix_server/evalfunc.c:192: undefined reference to `mysql_free_result'
                  evalfunc.o(.text+0x289): In function `evaluate_MIN':
                  /usr/src/zabbix-1.1beta2/src/zabbix_server/evalfunc.c:242: undefined reference to `mysql_free_result'
                  evalfunc.o(.text+0x33d): In function `evaluate_MAX':
                  /usr/src/zabbix-1.1beta2/src/zabbix_server/evalfunc.c:292: undefined reference to `mysql_free_result'
                  evalfunc.o(.text+0x3f1):/usr/src/zabbix-1.1beta2/src/zabbix_server/evalfunc.c:342: more undefined references to `mysql_free_result' follow
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0xc): In function `DBclose':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:47: undefined reference to `mysql_close'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x25): In function `DBconnect':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:66: undefined reference to `mysql_init'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x55):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:67: undefined reference to `mysql_real_connect'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x6d):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:69: undefined reference to `mysql_error'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x8d):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:70: undefined reference to `mysql_error'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0xa9):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:71: undefined reference to `mysql_errno'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0xc0):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:71: undefined reference to `mysql_errno'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x11b):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:78: undefined reference to `mysql_select_db'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x131):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:81: undefined reference to `mysql_error'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x151):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:82: undefined reference to `mysql_error'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x191): In function `DBexecute':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:124: undefined reference to `mysql_query'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x1b7):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:128: undefined reference to `mysql_errno'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x1c8):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:128: undefined reference to `mysql_error'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x1e5):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:129: undefined reference to `mysql_errno'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x1fc):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:129: undefined reference to `mysql_errno'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x24d): In function `DBselect':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:170: undefined reference to `mysql_query'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x26f):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:174: undefined reference to `mysql_errno'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x280):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:174: undefined reference to `mysql_error'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x29d):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:175: undefined reference to `mysql_errno'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x2b4):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:175: undefined reference to `mysql_errno'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x305): In function `DBget_field':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:214: undefined reference to `mysql_data_seek'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x30d):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:215: undefined reference to `mysql_fetch_row'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x331):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:218: undefined reference to `mysql_error'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x351):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:219: undefined reference to `mysql_error'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x38a): In function `DBinsert_id':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:236: undefined reference to `mysql_insert_id'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x39c): In function `DBaffected_rows':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:250: undefined reference to `mysql_affected_rows'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x3ca): In function `DBnum_rows':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:294: undefined reference to `mysql_num_rows'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x475): In function `DBget_function_result':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:346: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x53c): In function `DBget_prev_trigger_value':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:398: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x570):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:373: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x5c6):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:382: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x5f4):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:389: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x664):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:402: more undefined references to `mysql_free_result' follow
                  ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x2dd): In function `DBselect':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:182: undefined reference to `mysql_store_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x10d): In function `DBget_action_by_actionid':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:92: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x307): In function `DBadd_action_to_linked_hosts':
                  /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:131: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x33a):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:137: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x5be):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:177: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x5cf):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:179: undefined reference to `mysql_free_result'
                  ../libs/zbxdbhigh/libzbxdbhigh.a(graph.o)(.text+0x154):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/graph.c:105: more undefined references to `mysql_free_result' follow
                  collect2: ld returned 1 exit status
                  make[3]: *** [zabbix_server] Error 1
                  make[3]: Leaving directory `/usr/src/zabbix-1.1beta2/src/zabbix_server'
                  make[2]: *** [all-recursive] Error 1
                  make[2]: Leaving directory `/usr/src/zabbix-1.1beta2/src/zabbix_server'
                  make[1]: *** [all-recursive] Error 1
                  make[1]: Leaving directory `/usr/src/zabbix-1.1beta2/src'
                  make: *** [all-recursive] Error 1
                  Linking the libmysqlclient.so did not alleviate the problem..


                  Any thoughts?

                  Comment

                  • James Wells
                    Senior Member
                    • Jun 2005
                    • 664

                    #10
                    Greetings,

                    Jeremy, Rushowr, could you both please post the command that is being executed when you get the error. I suspect that the command line shows you are not linking against MySQL.
                    Unofficial Zabbix Developer

                    Comment

                    • rushowr
                      Member
                      • Jul 2005
                      • 30

                      #11
                      sir, I run the following configure command:

                      configure --enable-server --enable-client --with-mysql --with-snmp

                      and then run make

                      Comment

                      • James Wells
                        Senior Member
                        • Jun 2005
                        • 664

                        #12
                        Originally posted by rushowr
                        configure --enable-server --enable-client --with-mysql --with-snmp
                        I should have been clearer. When you execute make, it goes through and spits out a lot of stuff as it is compiling. That is what I need. What you and Jeremy are showing, in your previous posts, is just the last couple of lines of the output, which doesn't contain the actual linker command that is being executed. I suspect the error is on the linker command line itself.
                        Unofficial Zabbix Developer

                        Comment

                        • rushowr
                          Member
                          • Jul 2005
                          • 30

                          #13
                          Here's the offending command:

                          gcc -static -g -O2 -o zabbix_server -L/usr/lib/mysql -lmysqlclient -lm -lz 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 escalator/libzbxescalator.a housekeeper/libzbxhousekeeper.a alerter/libzbxalerter.a timer/libzbxtimer.a trapper/libzbxtrapper.a ../libs/zbxemail/libzbxemail.a ../libs/zbxdbhigh/libzbxdbhigh.a ../libs/zbxcommon/libzbxcommon.a

                          Hope this helps, as at this point I've even got the CEO chewin' my ass about getting Zabbix working today or replace it, and I've been hard pressed to find something that works as well as Zabbix for environment we have.

                          Thanks

                          Comment

                          • James Wells
                            Senior Member
                            • Jun 2005
                            • 664

                            #14
                            Originally posted by rushowr
                            gcc -static -g -O2 -o zabbix_server -L/usr/lib/mysql -lmysqlclient
                            Okay, so the linker knows where and what to link for a shared lib build. Check in your /usr/lib/mysql directory to see if you have libmysqlclient.a. If so try this command line;
                            Code:
                            gcc -static -g -O2 -o zabbix_server -lm -lz 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 escalator/libzbxescalator.a housekeeper/libzbxhousekeeper.a alerter/libzbxalerter.a timer/libzbxtimer.a trapper/libzbxtrapper.a ../libs/zbxemail/libzbxemail.a ../libs/zbxdbhigh/libzbxdbhigh.a ../libs/zbxcommon/libzbxcommon.a /usr/lib/mysqlclient.a
                            Failing that, the only thing I could suggest at this point would be to try a non-static build and make sure it compiles correctly.
                            Unofficial Zabbix Developer

                            Comment

                            • rushowr
                              Member
                              • Jul 2005
                              • 30

                              #15
                              Still not working

                              Hello,
                              I appreciate all your help thus far!
                              Here's the output of locate libmysqlclient.a
                              Code:
                              /usr/lib/mysql/libmysqlclient.a
                              /usr/lib/mysql/lib/mysql/libmysqlclient.a
                              /usr/src/mysql-4.1.15/libmysql/.libs/libmysqlclient.a
                              When trying your suggestion, I ran:

                              configure --with-mysql --enable-server
                              Here's the relevant output of that:

                              checking for MySQL support... yes

                              and then make

                              Here's the last command being sent by make:
                              gcc -g -O2 -o zabbix_server -L/usr/lib/mysql -lmysqlclient -lm -lz evalfunc.o expression.o actions.o zlog.o functions.o server.o ../libs/zbxsysinfo/lib zbxsysinfo.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 escalator/libzbxescalator.a housekeeper/libzbxhousekeeper.a alerter/libzbxalerter.a timer/libzbxtimer.a trapper/libzbxtrapper.a ../libs/zbxemail/libzbxemail.a ../libs/zbxdbhigh/libzbxdbhigh.a ../libs/zbxcommon/libzbxcommon.a -lresolv -lnsl

                              Here's a few of the errors from make:
                              ../libs/zbxdbhigh/libzbxdbhigh.a(db.o)(.text+0x2dd): In function `DBselect': /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/db.c:182: undefined reference to `mysql_store_result' ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x10d): In function `DBget_action_by_actionid': /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:92: undefined reference to `mysql_free_result'
                              ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x307): In function `DBadd_action_to_linked_hosts':
                              /usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:131: undefined reference to `mysql_free_result'
                              ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x33a):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:137: undefined reference to `mysql_free_result'
                              ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x5be):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:177: undefined reference to `mysql_free_result'
                              ../libs/zbxdbhigh/libzbxdbhigh.a(action.o)(.text+0x5cf):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/action.c:179: undefined reference to `mysql_free_result'
                              ../libs/zbxdbhigh/libzbxdbhigh.a(graph.o)(.text+0x154):/usr/src/zabbix-1.1beta2/src/libs/zbxdbhigh/graph.c:105: more undefined references to `mysql_free_result' follow

                              So, and it of course did not compile. I even downloaded and recompiled the client binaries with the most recent source available from MySQL.

                              Any ideas on this?

                              Comment

                              Working...