On Tue, Apr 20, 2021 at 09:20:40AM -0400, Wietse Venema wrote: > Paul Menzel: > > Would you accept a patch to add fix the instructions in `DB_README`? > > I think your problem is that /etc/ld.so.conf needs updating when you > install libdb in a nonstandard place.
But one can also augment the default search path with: AUXLIBS="-Wl,-R,/some/path ..." When I build Postfix for my FreeBSD server, I use: make -f Makefile.init dynamicmaps=yes shared=yes pie=yes \ 'CCARGS=-DDEF_MAIL_OWNER=\"postfix\" -DDEF_SGID_GROUP=\"maildrop\" -DHAS_EAI -DUSE_SASL_AUTH -I/usr/local/include -DHAS_PCRE -DUSE_CYRUS_SASL -I/usr/local/include/sasl -DUSE_TLS -I/usr/local/include/db5 -DHAS_CDB -DHAS_LMDB' \ 'AUXLIBS=-L/usr/local/lib -lsasl2 -lpam -lcrypt -Wl,-rpath,/usr/local/lib -fstack-protector-strong -lssl -lcrypto -L/usr/local/lib/db5 -ldb-5.3' \ 'AUXLIBS_CDB=-L/usr/local/lib -Wl,-R,/usr/local/lib -lcdb' \ 'AUXLIBS_PCRE=-L/usr/local/lib -Wl,-R/usr/local/lib -lpcre' \ 'AUXLIBS_LMDB=-L/usr/local/lib -Wl,-R/usr/local/lib -llmdb' \ command_directory=/usr/local/sbin \ config_directory=/usr/local/etc/postfix \ daemon_directory=/usr/local/libexec/postfix \ data_directory=/var/db/postfix \ mailq_path=/usr/local/bin/mailq \ newaliases_path=/usr/local/bin/newaliases \ queue_directory=/var/spool/postfix \ sendmail_path=/usr/local/sbin/sendmail \ shlib_directory=/usr/local/lib/postfix \ html_directory=/usr/local/share/doc/postfix \ manpage_directory=/usr/local/man \ readme_directory=/usr/local/share/doc/postfix \ makefiles I don't need ".../db5" in the runpath for db-5.3, because the version-explicit SONAME library is also installed into /usr/local/lib. Only the bare .so and .a files require /usr/local/lib/db5. So I use "/usr/local/lib" instead. -- Viktor.