-   Slackware (
-   -   Slackware 13.1 + Postfix + MySQL (

jan.linux 06-01-2010 04:51 PM

Slackware 13.1 + Postfix + MySQL
I'm trying to compile Postfix with MySQL support on Slackware 13.1. This is what I get:


make -f Makefile.init makefiles \
>    'CCARGS=-DHAS_MYSQL -I/usr/include/mysql' \
>    'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm'


rm -f libexec/post-install && ln -sf ../conf/post-install libexec/post-install
rm -f libexec/postfix-files && ln -sf ../conf/postfix-files libexec/postfix-files
rm -f libexec/postfix-script && ln -sf ../conf/postfix-script libexec/postfix-script
rm -f libexec/postfix-wrapper && ln -sf ../conf/postfix-wrapper libexec/postfix-wrapper
rm -f libexec/ && ln -sf ../conf/ libexec/
rm -f libexec/ && ln -sf ../conf/ libexec/
rm -f libexec/postmulti-script && ln -sf ../conf/postmulti-script libexec/postmulti-script
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/milter src/master src/postfix src/fsstone src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr src/postmulti; do \
        (set -e; echo "[$i]"; cd $i; make 'CC=gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE ' update MAKELEVEL=) || exit 1; \
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c alldig.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c allprint.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c argv.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c argv_split.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c attr_clnt.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c attr_print0.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c attr_print64.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c attr_print_plain.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c attr_scan0.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c attr_scan64.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c attr_scan_plain.c
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/include/mysql -DHAS_PCRE  -g -O -I. -DLINUX2 -c auto_clnt.c
In file included from auto_clnt.c:105:
/usr/include/mysql/events.h:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Event_parse_data'
/usr/include/mysql/events.h:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Event_db_repository'
/usr/include/mysql/events.h:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Event_queue'
/usr/include/mysql/events.h:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Event_scheduler'
/usr/include/mysql/events.h:47: error: expected ')' before 's'
/usr/include/mysql/events.h:70: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Events'
make: *** [auto_clnt.o] Error 1
make: *** [update] Error 1

Slackware 13.1 with MySQL 5.1.46
Postfix 2.7.0

Any ideas?

mRgOBLIN 06-02-2010 04:03 AM

Yes I've hit the same issue myself.

Same builds fine on 13.0.

I'll let you know if I find a solution.

paissad 06-03-2010 03:36 AM

i have the same problem too, please let us know if ever you solved it ...
thanks in advance

conraid 06-03-2010 01:33 PM

Rename /usr/include/mysql/events.h, because postfix has a file src/util/events.h and when builds postfix with mysql support it will use the mysql files

jan.linux 06-03-2010 03:26 PM

Thank you, it worked :-)


cd /usr/include/mysql/
mv events.h events.h.bak

mRgOBLIN 06-03-2010 05:45 PM

Yes, Thank you.

Hans R Steiner 11-29-2012 05:50 PM

if you don't have root permissions

mv /usr/include/mysql/events.h /usr/include/mysql/events.h.bkp
mv: cannot move `/usr/include/mysql/events.h' to `/usr/include/mysql/events.h.bkp': Permission denied

you can replace #include <events.h> on #include "../../src/util/events.h" in sources


sed -ri 's!<events.h>!"events.h"!g ; s!"events.h"!"../../src/util/events.h"!g' $(grep -r '#include [<|"]events.h["|>]' * | cut -d: -f1 | uniq)

All times are GMT -5. The time now is 08:31 PM.