Ad Widget

Collapse

Problem with make on OS X

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbobkiewicz
    Member
    • Aug 2005
    • 36

    #1

    Problem with make on OS X

    Hi,
    I´ve some trouble with building zabbix 1.1 alpha 12 on a Mac OS X 10.4.2 client system. It first starts with make not finding my mysql 4.0.x installation, stops with an error message mysqlclient can´t be found. So i´ve downloaded the latest stable 4.1 and calling make stops with some error messages telling some mysql functions are missing. So I thought it would be a good idea to just trash the zabbix folder and get a new one by unpacking the tar archieve. I ran ./configure --with-mysql everything looks good so far. The make comes out with the following output:
    Making all in src
    make[2]: Nothing to be done for `all-am'.
    make[1]: Nothing to be done for `all-am'.
    To be sure my system is ok I´ve downloaded the latest stable zabbix 1.0, build it, created configuration files and all daemons are running without trouble.
    What´s wrong with me and Zabbix 1.1? Any suggestions what to do to make make run again?
  • sauron
    Senior Member
    • Jan 2005
    • 215

    #2
    May added --enable-agent --enable-server ?

    Comment

    • mbobkiewicz
      Member
      • Aug 2005
      • 36

      #3
      Thanks for the reply. Now make starts but then stops with these error codes:
      /usr/bin/ld: Undefined symbols:
      _mysql_free_result
      _mysql_affected_rows
      _mysql_close
      _mysql_data_seek
      _mysql_errno
      _mysql_error
      _mysql_fetch_row
      _mysql_init
      _mysql_insert_id
      _mysql_num_rows
      _mysql_query
      _mysql_real_connect
      _mysql_select_db
      _mysql_store_result
      collect2: ld returned 1 exit status
      make[3]: *** [zabbix_server] Error 1

      What may be wrong? From my point of view zabbix seems to find the mysql libs. And while I´m using the offical tar.gz distro from mysql.org there shouldn´t be any mess ups from apple inside them.

      Comment

      • tommie
        Junior Member
        • Aug 2005
        • 7

        #4
        No, that means the linker can't find the mysql library functions. If the -lmysqlclient (or -lmysql, whatever) is on the linker command line, this is pretty serious. But since it doesn't complain about not finding the library, it's probably not even on the command line. (But what I've seen from the Mac ld, anything goes)

        Comment

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

          #5
          Compile agents only:

          ./configure --enable-agent

          Compile server only:

          ./configure --enable-server --with-mysql

          Compile both:

          ./configure --enable-server --with-mysql --enable-agent
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • mbobkiewicz
            Member
            • Aug 2005
            • 36

            #6
            Trashed the zabbix folder, unpacked the tar.gz file, did run configure as you suggested Alexei, still the same missing mysql functions.

            Comment

            • chaosloth
              Junior Member
              • Aug 2005
              • 6

              #7
              I encountered the same problem on 10.3.9 ..
              Downloaded the latest release of MySQL to no avail.

              Was able to compile after doing the following..

              Modify Makefile in ./src/zabbix_server

              Added reference to libmysqlclient.a .. Search for line starting with "zabbix_server_LDADD"

              zabbix_server_LDADD = /usr/local/mysql/lib/libmysqlclient.a ../libs/zbx... blah..blah

              Hope this helps ..

              Comment

              • chaosloth
                Junior Member
                • Aug 2005
                • 6

                #8
                Follow up ..

                A better way is to modify the makefile.in in the /src/zabbix_server

                Line 171:
                zabbix_server_LDADD = ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxlog/libzbxlog.a ../libs/zbxpid/libzbxpid.a ../libs/zbxconf/libzbxconf.a ../libs/zbxdbhigh/libzbxdbhigh.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/zbxcommon/libzbxcommon.a

                Changes to:
                zabbix_server_LDADD = /usr/local/mysql/lib/libmysqlclient.a ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxlog/libzbxlog.a ../libs/zbxpid/libzbxpid.a ../libs/zbxconf/libzbxconf.a ../libs/zbxdbhigh/libzbxdbhigh.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/zbxcommon/libzbxcommon.a

                Comment

                • mbobkiewicz
                  Member
                  • Aug 2005
                  • 36

                  #9
                  Thanks a lot chaosloth, now it works!

                  Comment

                  Working...