Ad Widget

Collapse

Compile problem for RedHat RPMs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clahti
    Senior Member
    • Jan 2007
    • 126

    #1

    Compile problem for RedHat RPMs

    Hello all:

    I am trying to roll RPMs for the 1.3.4 release as I have done for 1.3.2 and 1.3.3 to post here to the forums, but I am having a strange compile problem. Here is the configure line:

    ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-jabber --with-libcurl

    This works perfectly compiling from source for both 1.3.3 AND 1.3.4 on both Fedora Core 6 and CentOS 3.8. I have narrowed down the problem to the make line, rpmbuild fires the following standard make command (I am not sure I can change this):

    make -j2 'CFLAGS= -pipe -m32 -march=i386 -mtune=pentium4'


    This works fine for zabbix 1.3.3 and prior, but blows up for 1.3.4:

    Code:
    <...snip>
    
    Making all in zbxdb
    make[3]: Entering directory `/usr/src/redhat/BUILD/zabbix-1.3.4/src/libs/zbxdb'
    if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include     -pipe -m32 -march=i386 -mtune=pentium4 -MT db.o -MD -MP -MF ".deps/db.Tpo" -c -o db.o db.c; \
    then mv -f ".deps/db.Tpo" ".deps/db.Po"; else rm -f ".deps/db.Tpo"; exit 1; fi
    In file included from ../../../include/db.h:28,
                     from db.c:22:
    ../../../include/zbxdb.h:31:20: mysql.h: No such file or directory
    ../../../include/zbxdb.h:32:21: errmsg.h: No such file or directory
    ../../../include/zbxdb.h:33:27: mysqld_error.h: No such file or directory
    In file included from ../../../include/db.h:28,
                     from db.c:22:
    ../../../include/zbxdb.h:118: error: syntax error before '*' token
    ../../../include/zbxdb.h:118: warning: data definition has no type or storage class
    ../../../include/zbxdb.h:119: error: syntax error before '*' token
    ../../../include/zbxdb.h:119: warning: data definition has no type or storage class
    ../../../include/zbxdb.h:120: error: syntax error before "zbx_db_fetch"
    ../../../include/zbxdb.h:120: error: syntax error before '*' token
    ../../../include/zbxdb.h:120: warning: data definition has no type or storage class
    In file included from db.c:22:
    ../../../include/db.h:414: error: syntax error before '*' token
    ../../../include/db.h:414: warning: data definition has no type or storage class
    ../../../include/db.h:415: error: syntax error before '*' token
    ../../../include/db.h:415: warning: data definition has no type or storage class
    ../../../include/db.h:416: error: syntax error before "DBfetch"
    ../../../include/db.h:416: error: syntax error before '*' token
    ../../../include/db.h:416: warning: data definition has no type or storage class
    ../../../include/db.h:451: error: syntax error before "MYSQL_ROW"
    db.c:34: error: syntax error before '*' token
    db.c:34: warning: data definition has no type or storage class
    db.c: In function `zbx_db_connect':
    db.c:80: warning: assignment makes pointer from integer without a cast
    db.c:112: error: `CR_SERVER_GONE_ERROR' undeclared (first use in this function)
    db.c:112: error: (Each undeclared identifier is reported only once
    db.c:112: error: for each function it appears in.)
    db.c:113: error: `CR_CONNECTION_ERROR' undeclared (first use in this function)
    db.c:114: error: `CR_SERVER_LOST' undeclared (first use in this function)
    db.c:115: error: `ER_SERVER_SHUTDOWN' undeclared (first use in this function)
    db.c:116: error: `ER_UNKNOWN_ERROR' undeclared (first use in this function)
    db.c: At top level:
    db.c:198: error: syntax error before '*' token
    db.c: In function `zbx_db_select':
    db.c:201: error: `MYSQL_RES' undeclared (first use in this function)
    db.c:201: error: `result' undeclared (first use in this function)
    db.c: In function `zbx_db_vexecute':
    db.c:363: error: `CR_SERVER_GONE_ERROR' undeclared (first use in this function)
    db.c:364: error: `CR_CONNECTION_ERROR' undeclared (first use in this function)
    db.c:365: error: `CR_SERVER_LOST' undeclared (first use in this function)
    db.c:366: error: `ER_SERVER_SHUTDOWN' undeclared (first use in this function)
    db.c:367: error: `ER_UNKNOWN_ERROR' undeclared (first use in this function)
    db.c: At top level:
    db.c:495: error: syntax error before "zbx_db_fetch"
    db.c:495: error: syntax error before '*' token
    db.c: In function `zbx_db_fetch':
    db.c:498: error: `result' undeclared (first use in this function)
    db.c:498: warning: return makes integer from pointer without a cast
    db.c:568: warning: return makes integer from pointer without a cast
    db.c: At top level:
    db.c:575: error: syntax error before '*' token
    db.c: In function `zbx_db_vselect':
    db.c:578: error: `MYSQL_RES' undeclared (first use in this function)
    db.c:578: error: `result' undeclared (first use in this function)
    db.c:611: error: `CR_SERVER_GONE_ERROR' undeclared (first use in this function)
    db.c:612: error: `CR_CONNECTION_ERROR' undeclared (first use in this function)
    db.c:613: error: `CR_SERVER_LOST' undeclared (first use in this function)
    db.c:614: error: `ER_SERVER_SHUTDOWN' undeclared (first use in this function)
    db.c:615: error: `ER_UNKNOWN_ERROR' undeclared (first use in this function)
    db.c:616: error: syntax error before ')' token
    db.c:619: error: syntax error before ')' token
    db.c: At top level:
    db.c:765: error: syntax error before '*' token
    make[3]: *** [db.o] Error 1
    make[3]: Leaving directory `/usr/src/redhat/BUILD/zabbix-1.3.4/src/libs/zbxdb'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/usr/src/redhat/BUILD/zabbix-1.3.4/src/libs'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/src/redhat/BUILD/zabbix-1.3.4/src'
    make: *** [all-recursive] Error 1
    Interestingly enough, make -j2 works just fine on 1.3.4 (chop out the CFLAGS that rpmbuild uses) Any ideas? What could have changed in the source to cause this problem? As soon as I get this resolved I will release the RPMs for 1.3.4 for Fedora Core 6, CentOS 4.x and CentOS 3.x

    /Christian
  • beavrz1
    Junior Member
    • Aug 2006
    • 6

    #2
    I get the same errors on just simple compile

    make install produces the same output for me on Cent4.4 running mysql 5.0.27 (rpm install) were you able to track down the issue?

    Comment

    • clahti
      Senior Member
      • Jan 2007
      • 126

      #3
      I have not been able to devote any time to this, I am going to try and get this going tonight.

      Comment

      • H@rry
        Junior Member
        • Jul 2006
        • 24

        #4
        Any progress on this? I am having the same problem trying to compile 1.3.5 on CentOS 4.4 x86_64.

        [edit]
        I checked what rpmbuild did in my case:
        Code:
        make -j2 'CFLAGS=-O2 -g'
        some output:
        Code:
        Making all in zbxdb
        make[3]: Entering directory `/usr/src/redhat/BUILD/zabbix-1.3.5/src/libs/zbxdb'
        if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include     -O2 -g -MT db.o -MD -MP -MF ".deps/db.Tpo" -c -o db.o db.c; \
        then mv -f ".deps/db.Tpo" ".deps/db.Po"; else rm -f ".deps/db.Tpo"; exit 1; fi
        In file included from ../../../include/db.h:28,
                         from db.c:22:
        [/edit]
        Last edited by H@rry; 24-04-2007, 11:35.

        Comment

        • H@rry
          Junior Member
          • Jul 2006
          • 24

          #5
          Just to keep you posted with my progress.

          I managed to compile 1.3.5, but it now stalls at some post compile things. I believe that has to do with my spec file (out of 1.1.7.fc6.src.rpm).

          Code:
          make[1]: Leaving directory `/usr/src/redhat/BUILD/zabbix-1.3.5'
          + rm -rf '/var/tmp/zabbix-1.3.5-1-root-root/usr/lib64/libzbx*.a'
          + /usr/lib/rpm/brp-compress
          + /usr/lib/rpm/brp-strip
          + /usr/lib/rpm/brp-strip-static-archive
          + /usr/lib/rpm/brp-strip-comment-note
          Processing files: zabbix-1.3.5-1
          Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.517
          + umask 022
          + cd /usr/src/redhat/BUILD
          + cd zabbix-1.3.5
          + DOCDIR=/var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-1.3.5
          + export DOCDIR
          + rm -rf /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-1.3.5
          + /bin/mkdir -p /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-1.3.5
          + cp -pr AUTHORS ChangeLog COPYING FAQ NEWS README /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-1.3.5
          + cp -pr create/data create/mysql /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-1.3.5
          cp: cannot stat `create/mysql': No such file or directory
          error: Bad exit status from /var/tmp/rpm-tmp.517 (%doc)
          Processing files: zabbix-agent-1.3.5-1
          Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.518
          + umask 022
          + cd /usr/src/redhat/BUILD
          + cd zabbix-1.3.5
          + DOCDIR=/var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-agent-1.3.5
          + export DOCDIR
          + rm -rf /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-agent-1.3.5
          + /bin/mkdir -p /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-agent-1.3.5
          + cp -pr AUTHORS ChangeLog COPYING FAQ NEWS README /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-agent-1.3.5
          + exit 0
          Provides: config(zabbix-agent) = 1.3.5-1
          Requires(interp): /bin/sh /bin/sh /bin/sh
          Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
          Requires(pre): /bin/sh /usr/sbin/useradd
          Requires(post): /bin/sh /sbin/chkconfig
          Requires(preun): /bin/sh /sbin/chkconfig /sbin/service
          Requires: /bin/sh config(zabbix-agent) = 1.3.5-1 libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libcrypt.so.1()(64bit) libcrypto.so.4()(64bit) libm.so.6()(64bit) libmysqlclient.so.15()(64bit) libnetsnmp.so.5()(64bit) libnsl.so.1()(64bit) libresolv.so.2()(64bit) libresolv.so.2(GLIBC_2.2.5)(64bit) libssl.so.4()(64bit) libz.so.1()(64bit) logrotate
          Processing files: zabbix-web-1.3.5-1
          Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.518
          + umask 022
          + cd /usr/src/redhat/BUILD
          + cd zabbix-1.3.5
          + DOCDIR=/var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-web-1.3.5
          + export DOCDIR
          + rm -rf /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-web-1.3.5
          + /bin/mkdir -p /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-web-1.3.5
          + cp -pr README /var/tmp/zabbix-1.3.5-1-root-root/usr/share/doc/zabbix-web-1.3.5
          + exit 0
          Provides: config(zabbix-web) = 1.3.5-1
          Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
          Requires: config(zabbix-web) = 1.3.5-1 php php-gd php-mysql
          
          
          RPM build errors:
              Bad exit status from /var/tmp/rpm-tmp.517 (%doc)
          Gettin' there!

          Comment

          • H@rry
            Junior Member
            • Jul 2006
            • 24

            #6
            The doc section is changed. There is no longer a create/mysql folder, instead there is a data and a schema folder. I fixed it and it perfectly drops out some RPM's I attached my spec file
            Attached Files

            Comment

            • H@rry
              Junior Member
              • Jul 2006
              • 24

              #7
              ok one final question:

              I installed everything, and it workes like a charm, including init scipts etc. But when i run the installation wizard, it gevies me this error:

              Code:
                  * fopen(/usr/share/zabbix/conf/zabbix.conf.php) [function.fopen]: failed to open stream: Permission denied[/usr/share/zabbix/include/setup.inc.php:435]
              this ofcourse has to do with permissions. So this means i am gonna h ave to add a permission adding piece to my spec file. I already saw %atttr in it, but i dont really get it yet.

              Can anyone help me?

              Comment

              • clahti
                Senior Member
                • Jan 2007
                • 126

                #8
                I have rolled new zabbix RPMs for 1.3.5, I will be posting the URL shortly.

                Comment

                Working...