Menu

Compile Error

Ed
2004-02-28
2004-04-06
  • Ed

    Ed - 2004-02-28

    Fresh sendmail 8.12.11 source, apply the 8.12.11-5 patch for mysql, the following site.config.m4:
    APPENDDEF(`confENVDEF', `-DUDBMYSQL -DMYSQLMAP -DSASL -DMILTER')
    APPENDDEF(`confINCDIRS',`-I/usr/include/mysql')
    APPENDDEF(`confLIBSEARCH', `mysqlclient')
    APPENDDEF(`confLIBDIRS', `-L/usr/lib/mysql/')
    APPENDDEF(`confLIBS',   `-lmysqlclient -lz')
    define(`confMANROOT', `/usr/man')
    define(`conf_mail_local_SRCADD', `mysql_local.c')

    And I end up with a compile error like this:
    cc -O2 -I. -I../../include  -I/usr/include/mysql -DNEWDB  -DUDBMYSQL -DMYSQLMAP -DSASL -DMILTER      -c -o udb.o udb.c
    udb.c: In function `udbexpand':
    udb.c:517: parse error before `char'
    udb.c:537: `mysqlkeybuf' undeclared (first use in this function)
    udb.c:537: (Each undeclared identifier is reported only once
    udb.c:537: for each function it appears in.)
    udb.c:569: warning: passing arg 2 of `sm_strlcpyn' makes integer from pointer without a cast
    make[1]: *** [udb.o] Error 1

    I've looked, and I can't really see a parse error before char on line 517, nor the line before it. . .anyone have any ideas?

    Thanks. :)

     
    • Nicolas Sigal

      Nicolas Sigal - 2004-02-28

      Kyrian, i have the exactly same error.. do u know how to fix this?
      Thanks.

      kERPLUNK

       
    • Nicolas Sigal

      Nicolas Sigal - 2004-02-28

      Kev, i have another error too:

      Configuration: pfx=, os=Linux, rel=2.4.18-3smp, rbase=2, rroot=2.4, arch=i686, sfx=, variant=optimized
      Making in /usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.18-3smp.i686/sendmail
      make[1]: Entering directory `/usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.18-3smp.i686/sendmail'
      cc -O2 -I. -I../../include  -I/usr/local/mysql/include/mysql -I/usr/include/mysql -DNEWDB  -DUDBMYSQL -DMYSQLMAP      -c -o udb.o udb.c
      udb.c: In function `udbexpand':
      udb.c:517: parse error before `char'
      udb.c:537: `mysqlkeybuf' undeclared (first use in this function)
      udb.c:537: (Each undeclared identifier is reported only once
      udb.c:537: for each function it appears in.)
      udb.c:569: warning: passing arg 2 of `sm_strlcpyn' makes integer from pointer without a cast
      make[1]: *** [udb.o] Error 1
      make[1]: Leaving directory `/usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.18-3smp.i686/sendmail'
      Making all in:
      /usr/src/8.12.11/sendmail-8.12.11/editmap

      Configuration: pfx=, os=Linux, rel=2.4.18-3smp, rbase=2, rroot=2.4, arch=i686, sfx=, variant=optimized
      Making in /usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.18-3smp.i686/mail.local
      make[1]: Entering directory `/usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.18-3smp.i686/mail.local'
      cc -O2 -I. -I../../sendmail   -I../../include  -I/usr/local/mysql/include/mysql -I/usr/include/mysql -DNEWDB  -DUDBMYSQL -DMYSQLMAP -DNOT_SENDMAIL      -c -o mysql_local.o mysql_local.c
      In file included from mysql_local.c:5:
      mysql_local.h:6: redefinition of `struct mysql_sendmail_struct'
      mysql_local.c: In function `get_mysql_pwd':
      mysql_local.c:173: `ml_mysql' undeclared (first use in this function)
      mysql_local.c:173: (Each undeclared identifier is reported only once
      mysql_local.c:173: for each function it appears in.)
      mysql_local.c: In function `get_mysql_uid':
      mysql_local.c:229: `ml_mysql' undeclared (first use in this function)
      make[1]: *** [mysql_local.o] Error 1

       
    • Scoubid00

      Scoubid00 - 2004-03-17

      Hi,

      What is your gcc version ? ( ~#gcc -v ).
      > gcc version 2.95.3 20010315 (release) ?
      Can you try with a gcc 3.x.x ? ( at line 517, it's a declaration and gcc 2.x does not like this... ).

      Olivier.

       
    • Scoubid00

      Scoubid00 - 2004-03-17

      You can try :

      add this declaration at line 149 ( udb.c )
      char *mysqlkeybuf;

      and replace line 517 (before add the declaration ;-) ):
      mysqlkeybuf=malloc((keylen*2+1) * sizeof(char));

      Olivier.

       
    • Nicolas Sigal

      Nicolas Sigal - 2004-03-23

      scuby, i have gcc 3.2.2 (Slackware 9 Default) and this new error:

      cc -o vacation  -L/usr/lib/mysql/ -L/usr/local/mysql/lib/mysql/ vacation.o      /usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.25.i686/libsmdb/libsmdb.a /usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.25.i686/libsmutil/libsmutil.a /usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.25.i686/libsm/libsm.a  -ldb -lresolv -lcrypt -lnsl -lmysqlclient -ldl -lmysqlclient -lz
      /usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.25.i686/libsm/libsm.a(sql.o)(.text+0x4de): In function `libsm_get_mysql_conf':
      undefined reference to `Mbdb'
      /usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.25.i686/libsm/libsm.a(sql.o)(.text+0x4fd): In function `libsm_get_mysql_conf':
      undefined reference to `UdbSpec'
      collect2: ld returned 1 exit status
      make[1]: *** [vacation] Error 1
      make[1]: Leaving directory `/usr/src/8.12.11/sendmail-8.12.11/obj.Linux.2.4.25.i686/vacation'
      make: *** [all] Error 2

      Thanks.

      kERPLUNK

       
    • Nicolas Sigal

      Nicolas Sigal - 2004-04-06

      All, i have installed Slackware 9.1 and compiled successfully the new patch..
      The compile errors cause is a problem of old libraries.. (i think..)

      kERPLUNK

       

Log in to post a comment.