DevHeads.net

Compiler error on 3.3.1. Mac Mojave

It’s almost through the build but failing on this.

Undefined symbols for architecture x86_64:
"_db_create", referenced from:
import-atom in libpostfix-util.dylib
"_db_env_create", referenced from:
import-atom in libpostfix-util.dylib
"_db_version", referenced from:
import-atom in libpostfix-util.dylib
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [master] Error 1
make: *** [update] Error 1
make: *** [update] Error 2

My Make script is this:

make -f Makefile.init dynamicmaps=yes CCARGS='-DHAS_MYSQL -I/usr/local/include/mysql -DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/opt/local/include/sasl -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sasl -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DHAS_PCRE -I/opt/local/include -DEF_COMMAND_DIR=\"/usr/local/sbin\" -DEF_CONGIG_DIR=\"/usr/local/etc/postfix\" -DEF_DAEMON_DIR=\"/usr/local/libexec/postfix\" -DEF_DATA_DIR=\"/var/lib/postfix\" -DEF_MAILQ_PATH=\"/usr/local/bin/mailq\" -DEF_HTML_DIR=\"/usr/share/doc/postfix/html\" -DEF_MANPAGE_DIR=\"/usr/local/man\" -DEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" -DEF_QUEUE_DIR=\"/private/var/spool/postfix\" -DEF_README_DIR=\"/usr/share/doc/postfix\" -DEF_SENDMAIL_PATH=\"/usr/local/sbin/sendmail\"' 'AUXLIBS=-L/usr/lib -lsasl2 -L/usr/local/opt/openssl/lib -lssl -lcrypto -L/usr/local/lib' 'AUXLIBS_IUUC=-L/usr/local/Cellar/icu4c/62.1/lib -licuuc' 'AUXLIBS_MYSQL=-L/usr/local/lib -lmysqlclient -lz -lm' 'AUXLIBS_PCRE=-L/usr/local/lib -lpcre’

any ideas where to turn?
Thanks
Robert

Comments

Re: Compiler error on 3.3.1. Mac Mojave

By James Brown at 11/08/2018 - 05:33

On 8 Nov 2018, at 8:20 pm, Robert Chalmers < ... at gmail dot com> wrote:
Here’s my make script:

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/usr/local/opt//include \
-DHAS_SSL -I/usr/local/opt/ ... at 1 dot 1 \
-DHAS_MYSQL -I/usr/local/opt/ ... at 5 dot 7/include/mysql' AUXLIBS='-L/usr/local/lib -lpcre -lssl -lcrypto -L/usr/local/opt/ ... at 5 dot 7/lib \
-lmysqlclient -lz -lm' sendmail_path=/usr/local/sbin/sendmail newaliases_path=/usr/local/bin/newaliases mailq_path=/usr/local/bin/mailq

Victor Dukhovni suggested this a week ago on this mailing list:

You can make the recipe cleaner:

set -- -DUSE_TLS
set -- "$@" -DUSE_SASL_AUTH '-DDEF_SERVER_SASL_TYPE=\"dovecot\"'
set -- "$@" -DHAS_PCRE -I/usr/local/opt/include
set -- "$@" -DHAS_SSL -I/usr/local/opt/ ... at 1 dot 1
set -- "$@" -DHAS_MYSQL -I/usr/local/opt/ ... at 5 dot 7/include/mysql
CCARGS="$@"

set -- -L/usr/local/lib
set -- "$@" -lpcre
set -- "$@" -lssl -lcrypto
set -- "$@" -L/usr/local/opt/ ... at 5 dot 7/lib -lmysqlclient -lz -lm
AUXLIBS="$@"

set -- config_directory=/usr/local/etc/postfix
set -- "$@" command_directory=/usr/local/sbin
set -- "$@" daemon_directory=/usr/local/libexec/postfix
set -- "$@" sendmail_path=/usr/local/sbin/sendmail
set -- "$@" newaliases_path=/usr/local/bin/newaliases
set -- "$@" mailq_path=/usr/local/bin/mailq

make -f Makefile.init makefiles "$@" "CCARGS=${CCARGS}" "AUXLIBS=${AUXLIBS}"