From: <fre...@va...> - 2005-07-22 09:40:07
|
Hi, There seems to be a problem then compiling on Solaris (9): # sh Build ...lot of output.... gcc -o sid-filter -lpthread -L/opt/csw/bdb4/lib -R/opt/csw/bdb4/lib = -L/opt/csw/lib -R/opt/csw/lib sid-filter.o rfc2822.o util.o = -lmilter /var/tmp/sid-milter-0.2.9/obj.SunOS.5.9.sun4/libar/libar.a = /var/tmp/sid-milter-0.2.9/obj.SunOS.5.9.sun4/libmarid/libmarid.a = /var/tmp/sid-milter-0.2.9/obj.SunOS.5.9.sun4/libsm/libsm.a -ldb = -lresolv -lsocket -lnsl -lldap Undefined first referenced symbol in file ar_res_init = /var/tmp/sid-milter-0.2.9/obj.SunOS.5.9.sun4/libar/libar.a(ar.o) ld: fatal: Symbol referencing errors. No output written to sid-filter collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `sid-filter' Current working directory = /var/tmp/sid-milter-0.2.9/obj.SunOS.5.9.sun4/sid-filter *** Error code 1 make: Fatal error: Command failed for target `all' |
From: <fre...@va...> - 2005-07-22 15:27:57
|
Thanks... What is the difference of ar_res_init and res_init? I want to have the async-resolver instead of the default OS resolver, and sid-filter/Makefile.m4 & libar/Makefile.m4 isn't changed. /P -----Original Message----- From: sid...@li... [mailto:sid...@li...]On Behalf Of Dick St.Peters Sent: den 22 juli 2005 16:28 To: sid...@li... Subject: RE: sid-milter v0.2.9 released fre...@va... writes: > There seems to be a problem then compiling on Solaris (9): ... > Undefined first referenced > symbol in file > ar_res_init = /var/tmp/sid-milter-0.2.9/obj.SunOS.5.9.sun4/libar/libar.a(ar.o) Change libar/ar.c line 1041 from "ar_res_init();" to "res_init();". In libar/fix.c, ar_res_init is #define'd to be res_init if NONSTANDARD_RES_STRUCTURE is not defined, but that didn't make it into libar/ar.c. -- Dick St.Peters, stpeters@NetHeaven.com=20 Gatekeeper, NetHeaven, Saratoga Springs, NY ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. = http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick _______________________________________________ sid-milter-discuss mailing list sid...@li... https://lists.sourceforge.net/lists/listinfo/sid-milter-discuss |
From: Dick St.P. <stpeters@NetHeaven.com> - 2005-07-22 19:08:43
|
fre...@va... writes: > What is the difference of ar_res_init and res_init? > I want to have the async-resolver instead of the default OS resolver, > and sid-filter/Makefile.m4 & libar/Makefile.m4 isn't changed. The "Notes" in libar/README say: o If your vendor has decided to implement the global "_res" structure in a way that makes it unlike the de facto standard, you will need to enable some code that handles this. Check Makefile.m4 for the lines you will need to edit to make this work. libar/Makefile.m4 says: dnl If your operating system vendor changed the public-but-not-really dnl "_res" structure to something different than the de facto standard, dnl enable the next line. OpenBSD 3.7 needs this, and there may be others. dnl APPENDDEF(`confENVDEF', `-DNONSTANDARD_RES_STRUCTURE') The comment block above ar_res_init() in libar/fix.c says: ** AR_RES_STRUCTURE -- res_init() replacement for systems that don't follow ** the de facto standards (e.g. OpenBSD 3.7) ("AR_RES_STRUCTURE" is probably supposed to be "AR_RES_INIT") So you need ar_res_init() only if you both use the async resolver and use certain OSs. Otherwise, use res_init(). Anyway, the right way to make the change is to make it depend on the NONSTANDARD_RES_STRUCTURE switch, either by inserting these lines near the top of libar/ar.c #ifndef NONSTANDARD_RES_STRUCTURE #define ar_res_init res_init #endif or by changing the libar/ar.c code around line 1041 to read #ifdef NONSTANDARD_RES_STRUCTURE ar_res_init(); #else res_init(); #endif Then defining the switch will make all the changes on systems needing them. I do not know if Solaris needs them. -- Dick St.Peters, stpeters@NetHeaven.com Gatekeeper, NetHeaven, Saratoga Springs, NY |
From: Murray S. K. <ms...@se...> - 2005-07-25 18:13:01
|
On Fri, 22 Jul 2005, Dick St.Peters wrote: > Then defining the switch will make all the changes on systems needing > them. I do not know if Solaris needs them. The only OS that needs it (so far) is OpenBSD 3.x for x >= 4. (It may actually only be 3.7, but I've heard the change that hit me happened after 3.3 but before 3.7.) |
From: Murray S. K. <ms...@se...> - 2005-07-25 18:11:16
|
On Fri, 22 Jul 2005 fre...@va... wrote: > What is the difference of ar_res_init and res_init? res_init() loads the global "_res" structure with things like the retry counter for DNS queries, the interval between retries, the number of nameservers listed in /etc/resolv.conf and their addresses, etc. OpenBSD made the unfortunate choice to mess with this structure and do something different with it so that res_init() actually no longer does anything useful in multi-threaded programs. While they're technically right that it was never a fully documented and therefore necessarily supported method of using parts of the resolver, any multi-threaded program which accesses that structure will now break. (We're lucky sendmail is single-threaded; it makes 72 references to "_res".) ar_res_init() is a new wrapper function. If your system isn't one that messes with "_res", ar_res_init() just calls res_init(). If it is, ar_res_init() does the parts of res_init() that libar needs to function properly. |
From: <fre...@va...> - 2005-07-22 15:43:50
|
> What is the difference of ar_res_init and res_init? > I want to have the async-resolver instead of the default OS resolver, > and sid-filter/Makefile.m4 & libar/Makefile.m4 isn't changed. To clarify my post, i know that the async-resolver "libar" is the = default, if you don't modify sid-filter/Makefile.m4 which i _didn't_ = do... Re, /P |
From: Dick St.P. <stpeters@NetHeaven.com> - 2005-07-22 14:28:35
|
fre...@va... writes: > There seems to be a problem then compiling on Solaris (9): ... > Undefined first referenced > symbol in file > ar_res_init /var/tmp/sid-milter-0.2.9/obj.SunOS.5.9.sun4/libar/libar.a(ar.o) Change libar/ar.c line 1041 from "ar_res_init();" to "res_init();". In libar/fix.c, ar_res_init is #define'd to be res_init if NONSTANDARD_RES_STRUCTURE is not defined, but that didn't make it into libar/ar.c. -- Dick St.Peters, stpeters@NetHeaven.com Gatekeeper, NetHeaven, Saratoga Springs, NY |
From: Murray S. K. <ms...@se...> - 2005-07-25 18:05:44
|
Quite right. A commit in fix.c appears to have gone awry. This patch should fix it: ------------------------------------ Index: libar/fix.c diff -u libar/fix.c:1.2 libar/fix.c:1.3 --- libar/fix.c:1.2 Mon Jul 18 15:27:37 2005 +++ libar/fix.c Mon Jul 25 11:03:48 2005 @@ -31,7 +31,6 @@ #define SERVICE "domain" #define PROTOCOL "udp" -#ifdef NONSTANDARD_RES_STRUCTURE /* ** AR_RES_STRUCTURE -- res_init() replacement for systems that don't follow ** the de facto standards (e.g. OpenBSD 3.7) @@ -53,6 +52,7 @@ int ar_res_init(void) { +#ifdef NONSTANDARD_RES_STRUCTURE int data; int nscount = 0; FILE *f; @@ -140,10 +140,10 @@ _res.retry = RES_RETRY; return 0; -} #else /* NONSTANDARD_RES_STRUCTURE */ -# define ar_res_init res_init + return res_init(); #endif /* NONSTANDARD_RES_STRUCTURE */ +} #ifdef TEST int ------------------------------------ |
From: Dick St.P. <stpeters@NetHeaven.com> - 2005-08-04 18:27:21
|
Murray S. Kucherawy writes: > Quite right. A commit in fix.c appears to have gone awry. > > This patch should fix it: The patch generation seems to have gone awry also. There are extraneous single spaces at the beginning of most lines, and the patch fails to apply. (Note that this is not a space vs. tab difference that can be overcome with --ignore-whitespace.) Here's a version that does apply cleanly. Also posted at ftp://ftp.netheaven.com/pub/sid-milter/nh-res-init-0.2.9.patch ______________________________________________________________________ --- libar/fix.c.orig 2005-07-18 18:27:37.000000000 -0400 +++ libar/fix.c 2005-08-01 11:41:21.104959031 -0400 @@ -31,7 +31,6 @@ #define SERVICE "domain" #define PROTOCOL "udp" -#ifdef NONSTANDARD_RES_STRUCTURE /* ** AR_RES_STRUCTURE -- res_init() replacement for systems that don't follow ** the de facto standards (e.g. OpenBSD 3.7) @@ -53,6 +52,7 @@ int ar_res_init(void) { +#ifdef NONSTANDARD_RES_STRUCTURE int data; int nscount = 0; FILE *f; @@ -140,10 +140,10 @@ _res.retry = RES_RETRY; return 0; -} #else /* NONSTANDARD_RES_STRUCTURE */ -# define ar_res_init res_init + return res_init(); #endif /* NONSTANDARD_RES_STRUCTURE */ +} #ifdef TEST int |
From: Murray S. K. <ms...@se...> - 2005-08-04 18:32:53
|
On Thu, 4 Aug 2005, Dick St.Peters wrote: > The patch generation seems to have gone awry also. There are extraneous > single spaces at the beginning of most lines, and the patch fails to > apply. (Note that this is not a space vs. tab difference that can be > overcome with --ignore-whitespace.) The thing I sent applies fine here, but maybe it got mangled in transit. I'll try to punch out a patch release to Sourceforge later today incorporating the change so people can get clean builds. |