--- In milter-greylist@yahoogroups.com, manu@... wrote: > > randersson2 <robert@...> wrote: > > > What does work is to: > > configure --enable-dnsrbl (Note, *no* --with-libbind) > > Then edit the resulting Makefile and replace: > > LIBS= -lresolv -lnsl -lpthread -lmilter > > with: > > LIBS= /usr/lib/libresolv.a -lnsl -lpthread -lmilter > > > > After this the make works and the resulting binary works fine even > > under heavy load. > > > > Something is really strange here. Why is libresolv.a and libresolv.so > > different? And why doesn't libbind.so appear to be threadsafe? Go > > figure, the above workaround made things work for me. > > Very strange indeed. If you build a milter-greylist with -lresolv -lnsl > -lpthread -lmilter, does ldd shows /usr/lib/libresolv.so is used? That library mix is what I get with: ./configure --enable-dnsrbl This doesn't link at all, the error message is: dnsrbl.o: In function `dnsrbl_check_source': /local/home/robert/milter-greylist-3.0rc5/dnsrbl.c:167: undefined reference to `__ns_initparse' /local/home/robert/milter-greylist-3.0rc5/dnsrbl.c:174: undefined reference to `__ns_parserr' ns_initparse and ns_parserr are #defined to __ns_initparse and __ns_parserr in /usr/include/arpa/nameser.h, but in /usr/lib/libresolv.so which symlinks to /lib/libresolv.so.2 which symlinks to /lib/libresolv-2.4.so these two symbols are defined as local. In /usr/lib/libresolv.a the two symbols are global and the link succeeds. Hmm, looks like a glibc 2.4 bug if you ask me. > Do you have multiple /usr/lib/libresolv.so.*? No. It seems this has been an issue in the glibc resolver for years, just google after: ns_initparse glibc Regards, Robert.
Message
Re: thread-unsafety on RedHat solved
2006-10-20 by randersson2
Attachments
- No local attachments were found for this message.