The check for liblmdb fails when linking to libbsd because the library path for the check is not complete.
For example, compare the check for smfi_version vs lmdb:
configure:16987: gcc -std=gnu99 -o conftest -pthread -g -O0 -I/opt/zimbra/sendmail/include -I/opt/zimbra/libxml2/include/libxml2 -I/opt/zimbra/cyrus-sasl-2.1.26.2z/include -I/opt/zimbra/libxml2/include -I/opt/zimbra/curl/include -I/opt/zimbra/libbsd/include -I/opt/zimbra/openssl-1.0.1f/include -I/opt/zimbra/libtool-2.2.6b/include -pthread -L/opt/zimbra/sendmail/lib -L/opt/zimbra/openssl-1.0.1f/lib -L/opt/zimbra/cyrus-sasl-2.1.26.2z/lib -L/opt/zimbra/openldap-2.4.39.2z/lib -L/opt/zimbra/libtool-2.2.6b/lib -L/opt/zimbra/libxml2/lib -L/opt/zimbra/libbsd/lib -Wl,-rpath,/opt/zimbra/libbsd/lib -Wl,-rpath,/opt/zimbra/openssl-1.0.1f/lib -Wl,-rpath,/opt/zimbra/cyrus-sasl-2.1.26.2z/lib -Wl,-rpath,/opt/zimbra/openldap-2.4.39.2z/lib -Wl,-rpath,/opt/zimbra/libtool-2.2.6b/lib conftest.c -lmilter -lbsd >&5
configure:19118: gcc -std=gnu99 -o conftest -pthread -I/opt/zimbra/libxml2/include/libxml2 -I/opt/zimbra/cyrus-sasl-2.1.26.2z/include -I/opt/zimbra/libxml2/include -I/opt/zimbra/curl/include -I/opt/zimbra/libbsd/include -I/opt/zimbra/openssl-1.0.1f/include -I/opt/zimbra/libtool-2.2.6b/include -L/opt/zimbra/openldap/lib conftest.c -llmdb -lbsd >&5
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lbsd
For lmdb, the -L/rpath bits are completely missing the pieces for libbsd, even though the path to libbsd is part of LDFLAGS
Problem appears to be this line:
I think it should probably be something like:
This fixed the build issue for me.
Try this instead:
LDFLAGS="-L$mdbpath/lib $STRL_LIBS"
That resolves the issue as well.
Starting a 2.9.1 beta shortly; watch the opendkim lists for the announcement. This way we can be sure this and other issues are indeed fixed before releasing.
Never mind, it does NOT fix the issue. I built on the wrong platform.
On the 3 platforms that have the issue, the above solution still fails with:
configure:19118: gcc -std=gnu99 -o conftest -pthread -I/opt/zimbra/libxml2/include/libxml2 -I/opt/zimbra/cyrus-sasl-2.1.26.2z/include -I/opt/zimbra/libxml2/include -I/opt/zimbra/curl/include -I/opt/zimbra/libbsd/include -I/opt/zimbra/openssl-1.0.1f/include -I/opt/zimbra/libtool-2.2.6b/include -L/opt/zimbra/openldap/lib -lbsd conftest.c -llmdb -lbsd >&5
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lbsd
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lbsd
collect2: ld returned 1 exit status
configure:19118: $? = 1
configure: failed program was:
Can you attach a config.log from that run?
Here we go. :)
Looks like I'm throwing away user-provided CPPFLAGS, LDFLAGS, etc. Need to fix that.
Fixed in 2.9.1.Beta1.
v2.9.1 released.