Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

[milter-greylist] configure problem for libspf2

2012-06-12 by Bruncsak, Attila

Hello,

I recently tried to compile milter-greylist with libspf2.
I run into trouble already at configure time.

Output of the configure script:

checking for pthread_create in -lpthread... yes
checking for SPF_server_new in -lspf2... no
checking for SPF_server_new in -lspf2 -lintl... no
libspf2 not found, check config.log for details
Remove --with-libspf2 to build without SPF support

In the config.log file:

configure:5086: checking for SPF_server_new in -lspf2
configure:5111: gcc -o conftest  -Wall -I/usr/local/src/sendmail/libmilter/include -I/usr/local/src/spf/current/include   -L/usr/local/src/sendmail/libmilter/lib -Wl,--rpath=/usr/local/src/sendmail/libmilter/lib -L/usr/local/src/spf/current/lib -Wl,--rpath=/usr/local/src/spf/current/lib conftest.c -lspf2   -lpthread >&5
/usr/local/src/spf/current/lib/libspf2.a(spf_dns_resolv.o): In function `SPF_dns_resolv_lookup':
/usr/local/src/spf/libspf2-1.2.9/src/libspf2/spf_dns_resolv.c:297: undefined reference to `__res_nquery'
/usr/local/src/spf/current/lib/libspf2.a(spf_dns_resolv.o): In function `SPF_dns_resolv_debug':
/usr/local/src/spf/libspf2-1.2.9/src/libspf2/spf_dns_resolv.c:170: undefined reference to `__ns_get16'
/usr/local/src/spf/current/lib/libspf2.a(__ns_initparse.o): In function `__ns_skiprr':
/usr/local/src/spf/libspf2-1.2.9/src/libreplace/__ns_initparse.c:82: undefined reference to `__dn_skipname'
/usr/local/src/spf/current/lib/libspf2.a(__ns_initparse.o): In function `__ns_parserr':
/usr/local/src/spf/libspf2-1.2.9/src/libreplace/__ns_initparse.c:165: undefined reference to `__dn_expand'
collect2: ld returned 1 exit status
configure:5111: $? = 1

It is clearly visible that the configure script has found
the libspf2.a in the directory /usr/local/src/spf/current/lib/,
but it has reported not being found.

It is known that the SPF needs resolver library to function.
I do not find any problem that the libspf2.a
refers to some external resolver library functions.

I have them all on my system:

nm /lib64/libresolv-2.5.so | grep -e ' '__res_nquery -e ' '__ns_get16 -e ' '__dn_skipname -e ' '__dn_expand
00000031ae6050a0 T __dn_expand
00000031ae605060 T __dn_skipname
00000031ae60bab0 T __ns_get16
00000031ae6083b0 T __res_nquery
00000031ae607f40 T __res_nquerydomain

I think that the configure script should be aware that
the libspf2 library search may fail if the resolver library
is not provided, it should provide the library for that test as well.

The configure script searches for the resolver library
at a later stage because the milter-greylist uses it
directly no only through SPF.

I suggest to move the libspf2 search in the configure script
at a later stage after the resolver library search,
and provide the result of the resolver library search
to the libspf2 library search in order to avoid failure
due to the lack of resolver library functions.

If my idea is acceptable to fix the issue,
unfortunately I do not know how to manage autoconfigure
so some expert help is needed here for a patch.

Bests,
Attila

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.