RE: [syslog-ng]crashbug fix in recent syslog-ng versions
Well with a couple of changes I got it to work correctly on Solaris 8 x86. I ran configure a bunch of times with various corrections to configure.in because I originally got the HAVE_RES_INIT problem like the others did. Then of course the link problem with -lresolv came up during the compile. But I used the patch that Andrey sent for acconfig.h then I added a line to configure.in and voila! it worked perfectly for me "out of the box" so to speak. *** configure.in.orig Tue Oct 29 20:00:52 2002 --- configure.in Tue Oct 29 20:20:34 2002 *************** *** 151,156 **** --- 151,157 ---- if test "x$blb_cv_c_res_init" = "xyes"; then AC_DEFINE(HAVE_RES_INIT) + LIBS="$LIBS -lresolv" fi dnl Checks for library functions. That's all it took. This may work for some others that are having the -lresolv link error. I saw where it looked like it was checking for res_init twice, once it said yes then the next time it said no, I think what it is doing the first time it is looking for the function definition inside the header and the next time it is looking inside libresolv because when the line above was added it said "yes" both times instead of "no" the second time. Regards, Drew -----Original Message----- From: Balazs Scheidler [mailto:bazsi@balabit.hu] Sent: Tuesday, October 29, 2002 3:25 AM To: syslog-ng@lists.balabit.hu Subject: Re: [syslog-ng]crashbug fix in recent syslog-ng versions
I have found two problems which are the possible cause of the crashes reported on this list. expect a new release soon if the fixes below prove to be effective.
I am very happy to report that 1.5.23+libol-0.3.5 are running just fine in my environment. Before I discovered 1.5.23 was available I had already tested 1.5.21+the sources.c patch, and that worked for me as well.
Thanks very much for taking the time to stomp this bug out of existence!
cool, and thanks for testing the fix. if syslog-ng 1.5.23 proves to be stable, I'll release 1.6.0 Could you - not specifically you, rather the list - please test the configure.in changes as well on different platforms? I've tested it on Debian GNU/Linux, and Solaris 8 (Linux on x86, Solaris on Sparc). A test on one of the BSDs and HP-UX would be welcome. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
On Tue, Oct 29, 2002 at 02:38:11PM -0500, Hamilton, Andrew wrote:
Well with a couple of changes I got it to work correctly on Solaris 8 x86. I ran configure a bunch of times with various corrections to configure.in because I originally got the HAVE_RES_INIT problem like the others did. Then of course the link problem with -lresolv came up during the compile. But I used the patch that Andrey sent for acconfig.h then I added a line to configure.in and voila! it worked perfectly for me "out of the box" so to speak.
*** configure.in.orig Tue Oct 29 20:00:52 2002 --- configure.in Tue Oct 29 20:20:34 2002 *************** *** 151,156 **** --- 151,157 ----
if test "x$blb_cv_c_res_init" = "xyes"; then AC_DEFINE(HAVE_RES_INIT) + LIBS="$LIBS -lresolv" fi
dnl Checks for library functions.
That's all it took. This may work for some others that are having the -lresolv link error. I saw where it looked like it was checking for res_init twice, once it said yes then the next time it said no, I think what it is doing the first time it is looking for the function definition inside the header and the next time it is looking inside libresolv because when the line above was added it said "yes" both times instead of "no" the second time.
I'd rather add an AC_CHECK_LIB() function. Here's a diff against the configure.in found in 1.5.23, can you check if this is ok? diff -u -r1.59 configure.in --- configure.in 28 Oct 2002 08:52:51 -0000 1.59 +++ configure.in 30 Oct 2002 13:43:50 -0000 @@ -146,7 +146,7 @@ AC_DEFINE(HAVE_O_LARGEFILE, 1) fi -AC_CACHE_CHECK(for res_init, blb_cv_c_res_init, +AC_CACHE_CHECK(for res_init in <resolv.h>, blb_cv_c_res_init, [AC_EGREP_HEADER(res_init, resolv.h, blb_cv_c_res_init=yes)]) if test "x$blb_cv_c_res_init" = "xyes"; then @@ -156,9 +156,11 @@ dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_VPRINTF +AC_CHECK_LIB(resolv, res_init) +dnl on Linux res_init is a macro +AC_CHECK_LIB(resolv, __res_init) AC_CHECK_LIB(door, door_create) AC_CHECK_FUNCS(select snprintf vsnprintf strerror inet_aton strncpy getutent) -AC_CHECK_FUNCS(res_init) AC_CHECK_FUNC(getopt_long,,[LIBOBJS="getopt.o getopt1.o $LIBOBJS"]) AC_CHECK_FUNC(strcasecmp,,[LIBOBJS="strcasecmp.o $LIBOBJS"]) AC_CHECK_FUNC(strptime,,[LIBOBJS="strptime.o $LIBOBJS"]) -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Well with a couple of changes I got it to work correctly on Solaris 8 x86. I ran configure a bunch of times with various corrections to configure.in because I originally got the HAVE_RES_INIT problem like the others did. Then of course the link problem with -lresolv came up during the compile. But I used the patch that Andrey sent for acconfig.h then I added a line to configure.in and voila! it worked perfectly for me "out of the box" so to speak.
*** configure.in.orig Tue Oct 29 20:00:52 2002 --- configure.in Tue Oct 29 20:20:34 2002 *************** *** 151,156 **** --- 151,157 ----
if test "x$blb_cv_c_res_init" = "xyes"; then AC_DEFINE(HAVE_RES_INIT) + LIBS="$LIBS -lresolv" fi
dnl Checks for library functions.
This patch is obviously wrong. You cannot assume that libresolv exists just because res_init is found in some header. What is the right thing to do is to search for library that contains res_init. -andrey
participants (3)
-
Balazs Scheidler
-
Borzenkov Andrey
-
Hamilton, Andrew