> On 25 Feb 2023, at 12:09 pm, Wietse Venema <wie...@porcupine.org> wrote:
> 
> James Brown:
>> Now it just has one error:
>> 
>> dict_mysql.c:171:10: fatal error: 'mysql.h' file not found
>> #include <mysql.h>
>>         ^~~~~~~~~
>> 1 error generated.
>> make: *** [dict_mysql.o] Error 1
>> make: *** [update] Error 1
>> 
>> % locate mysql.h
>> /opt/homebrew/Cellar/mysql/8.0.32/include/mysql/mysql.h
>> 
>> Thanks so much for your help again.
> 
> I suspect a missing -I directive in CCARGS.
> 
>       Wietse

Thanks Wietse.

Not sure how to do that. I do feel very stupid with all this. 

Added ‘mysql’ to end of path for DHAS_MYSQL which seemed to help, got to an 
error saying it couldn’t find mysqlclient. Put ‘-L/opt/homebrew/lib’ in AUXLIBS:

 % make -f Makefile.init makefiles CCARGS="-DUSE_TLS -DUSE_SASL_AUTH \
-DDEF_SERVER_SASL_TYPE=\\\\"dovecot\\\\" \
-DDEF_COMMAND_DIR=\\\"/usr/local/sbin\\\" \
-DDEF_CONFIG_DIR=\\\"/usr/local/etc/postfix\\\" \
-DDEF_DAEMON_DIR=\\\"/usr/local/libexec/postfix\\\" \
-DHAS_PCRE -I/opt/homebrew/include \
-DHAS_SSL -I/opt/homebrew/Cellar/openssl@3/3.0.8/include/ \
-DHAS_MYSQL -I/opt/homebrew/Cellar/mysql/8.0.32/include/mysql/ " \
AUXLIBS_MYSQL='-I/opt/homebrew/Cellar/mysql/8.0.32/include/mysql -lmysqlclient 
-lz -lm' \
AUXLIBS='-L/usr/local/lib -lpcre -L/opt/homebrew/opt/openssl@3/lib 
-L/opt/homebrew/lib -lssl -lcrypto'  sendmail_path=/usr/local/sbin/sendmail 
newaliases_path=/usr/local/bin/newaliases mailq_path=/usr/local/bin/mailq 

Now it gets to:

cp cleanup ../../libexec
[src/smtpd]
cc -I. -I../../include -DUSE_TLS -DUSE_SASL_AUTH 
-DDEF_SERVER_SASL_TYPE=\\dovecot\\ -DDEF_COMMAND_DIR=\"/usr/local/sbin\" 
-DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\" 
-DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\" -DHAS_PCRE 
-I/opt/homebrew/include -DHAS_SSL 
-I/opt/homebrew/Cellar/openssl@3/3.0.8/include/ -DHAS_MYSQL 
-I/opt/homebrew/Cellar/mysql/8.0.32/include/mysql/ -DBIND_8_COMPAT -DNO_NETINFO 
-DRESOLVE_H_NEEDS_ARPA_NAMESER_COMPAT_H -DNO_EAI -DDEF_SMTPUTF8_ENABLE=\"no\" 
-DHAS_DEV_URANDOM -DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\" 
-DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" 
-DDEF_SENDMAIL_PATH=\"/usr/local/sbin/sendmail\" -UUSE_DYNAMIC_LIBS 
-DDEF_SHLIB_DIR=\"no\" -UUSE_DYNAMIC_MAPS -Wmissing-prototypes -Wformat 
-Wno-comment -fno-common -g -O -I. -I../../include -DMACOSX -c smtpd.c
smtpd.c:6562:23: error: expected expression
        VAR_SMTPD_SASL_TYPE, DEF_SMTPD_SASL_TYPE, &var_smtpd_sasl_type, 1, 0,
                             ^
../../include/mail_params.h:1700:29: note: expanded from macro 
'DEF_SMTPD_SASL_TYPE'
#define DEF_SMTPD_SASL_TYPE     DEF_SERVER_SASL_TYPE
                                ^
<command line>:3:30: note: expanded from here
#define DEF_SERVER_SASL_TYPE \dovecot\\
                             ^
1 error generated.
make: *** [smtpd.o] Error 1
make: *** [update] Error 1

Definitely have to buy to few beers or bottles of wine when we get this working!

Thanks, James.

Reply via email to