Viktor Dukhovni wrote on 14/08/2014 10:08:
make -f Makefile.init makefiles \
'CCARGS=-DUSE_TLS -DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH
-DDEF_SERVER_SASL_TYPE=\"dovecot\"' \
'AUXLIBS=-L/lib64/libssl.so.10 -L/usr/lib64/mysql -lmysqlclient -lz
-lm'
Where did you get this broken recipe?
Is the script I have been using for many years,
Probabily it started from http://www.postfix.org/MYSQL_README.html, later I
added ssl and later on Dovecot support. Until now it worked and I didn't feel
the deed to fix it.
I would start with:
make -f Makefile.init makefiles \
CCARGS='-DUSE_TLS -DHAS_MYSQL -DUSE_SASL_AUTH
-DDEF_SERVER_SASL_TYPE=\"dovecot\"' \
AUXLIBS='-lssl -lcrypto -lmysqlclient -lz -lm'
That gives this error (onc CentOS 7 64bit with MariaDB):
dict_mysql.c:188:19: fatal error: mysql.h: No such file or directory
#include <mysql.h>
Then I made a modification:
make -f Makefile.init makefiles \
CCARGS='-DUSE_TLS -DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH
-DDEF_SERVER_SASL_TYPE=\"dovecot\"' \
AUXLIBS='-lssl -lcrypto -lmysqlclient -lz -lm'
which gave me this error:
/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make: *** [master] Error 1
make: *** [update] Error 1
Then I added another parameter:
make -f Makefile.init makefiles \
CCARGS='-DUSE_TLS -DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH
-DDEF_SERVER_SASL_TYPE=\"dovecot\"' \
AUXLIBS='-L/usr/lib64/mysql -lssl -lcrypto -lmysqlclient -lz -lm'
Which finally did the trick
To summarize: -lssl solved the SSL issue, but with CentOS 7 I still have to
specify MySQL/MariaDB paths
Thank you for the suggestions!
Ciao,
luigi
--
/
+--[Luigi Rosa]--
\
Bank manager: someone who lends you an umbrella when the sun is shining,
and who asks for it back when it starts to rain.