Mailing List Archive

building libspf2 on NetBSD and Linux: questions and patches
Hi,

while giving the Postfix libspf2 patch a try I ran into some problems
building libspf2. These were:

1) on a SuSE Linux system gcc 2.95.3 complained as follows:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/include -I../../src -g -O2 -Wall -c spfquery.c
spfquery.c: In function `response_print_errors':
spfquery.c:265: parse error before `int'
spfquery.c:275: `i' undeclared (first use in this function)
spfquery.c:275: (Each undeclared identifier is reported only once
spfquery.c:275: for each function it appears in.)

The first attached patch should fix this.


2) on NetBSD 2.1 system (gcc 3.3.3) building failed with:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/include -I../../src -g -O2 -W -Wall -Wmissing-prototypes -Wwrite-strings -MT spf_dns_rr.lo -MD -MP -MF .deps/spf_dns_rr.Tpo -c spf_dns_rr.c -fPIC -DPIC -o .libs/spf_dns_rr.o
spf_dns_rr.c: In function `SPF_dns_rr_new_nxdomain':
spf_dns_rr.c:48: error: `NXDOMAIN' undeclared (first use in this function)
spf_dns_rr.c:48: error: (Each undeclared identifier is reported only once
spf_dns_rr.c:48: error: for each function it appears in.)
*** Error code 1

On NetBSD 2, NXDOMAIN is defined in arpa/nameser.h but resolv.h doesn't
include that file. After applying the second attached patch (not sure
if it's a correct solution...) building failed again:

gcc -g -O2 -W -Wall -Wmissing-prototypes -Wwrite-strings -o .libs/spfquery spfquery.o ../../src/libspf2/.libs/libspf2.so -lpthread -lintl -Wl,--rpath -Wl,/usr/local/lib
../../src/libspf2/.libs/libspf2.so: undefined reference to `res_ninit'
../../src/libspf2/.libs/libspf2.so: undefined reference to `res_nclose'
*** Error code 1

While `configure' correctly detected the absence of `res_ninit' and
thus config.h contained `#define HAVE_DECL_RES_NINIT 0',
src/libspf2/spf_dns_resolv.c seems to contain calls to
`res_n(init|close)' not protected by `HAVE_DECL_RES_NINIT'. I wasn't
sure how to fix this.

NetBSD-current (and probably NetBSD 3, but I didn't test) doesn't have
the problem reported above since the resolver library knows about the
functions in question.


3) On all platforms I tried to build libspf2, `make check' failed with

[...]
=======================================
6 of 7 tests failed
Please report to libspf2@rt.anarres.org
=======================================
[...]

Is this a known problem or should I really send a report?


Comments are welcome.

TIA, Jukka

--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com