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. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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. :)
Kyrian, i have the exactly same error.. do u know how to fix this?
Thanks.
kERPLUNK
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
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.
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.
scuby, i have gcc 3.2.2 (Slackware 9 Default) and this new error:
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
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