On Wed, Oct 15, 2014 at 09:49:21AM +1100, James Brown wrote: > Thanks Viktor - that worked! > > I added -lresolv to AUXLIBS: > > make -f Makefile.init makefiles \ > CCARGS='-arch x86_64 -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/include > -DHAS_MYSQL -I/usr/local/mysql/include' \ > AUXLIBS='-L/usr/local/lib -lpcre -lssl -lcrypto -L/usr/local/mysql/lib > -lmysqlclient -lz -lm -lresolv'
Note two important things about this: 1. The "-I" include directives are consistent with the "-L" include directives, paired in the same order as "-I/some/where/include" and "-L/some/where/lib". 2. There is no chaotic going back and forth with some "-L" directives mentioned multiple times in the vain hope that some "-l" libraries will use a different search path than others. The "-L" options simply don't work that way. The relative order of "-L" vs. "-l" is immaterial. You can put all the "-L" options before all the "-l" options to keep this clear, but it is traditional to introduce a "-L" before the first library that needs it. The above is substantially less chaotic than the original, and discards useless baggage which has no effect "-DHAS_SSL", "-llber", ... Keep it simple. The best way to do that is often to start with no options, and build up, adding only bare essentials one at a time with care. Good luck. -- Viktor.