[syslog-ng] Syslog-ng-2.05 Segmentation Fault
bazsi at balabit.hu
Tue Nov 13 09:21:22 CET 2007
On Tue, 2007-11-13 at 11:19 +1100, Daniel Szmandiuk wrote:
> I think I know the source of the problem. (with my very limited
> It looks like I have both the 32 & 64bit versions of GLIB2 installed and
> the configure script is picking up the 32bit version instead of the
> I've compared Tim's config.log with mine and can see differences like
> CPPFLAGS=' -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> CPPFLAGS=' -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/eventlog -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD
> -DHAVE_NET_ETHERNET_H -D_GNU_SOURCE -D_LARGEFILE_SOURCE
> I don't have /usr/include/glib-2.0, so in my case it is picking up
> /usr/lib/glib-2.0/include. In Tim's case /usr/lib64/glib-2.0/include
> So question is why is the configure script not picking up my 64bit
> libraries? I suspect this is my binary seg faults...
> How do I force ./configure to use /usr/lib64/glib-2.0/include instead of
It all depends on pkg-config program and your PKG_CONFIG_PATH
environment variable, which defaults to /usr/lib/pkgconfig. I assume you
have both /usr/lib/pkgconfig/glib-2.0.pc
and /usr/lib64/pkgconfig/glib-2.0.pc, right?
I'm not sure how pkg-config should handle this situation, as it does not
really have an option to specify the target system type.
Until pkg-config gets something like this, the PKG_CONFIG_PATH has to be
All I can do is add a patch like this, which triggers an error in the
case above, however it does not work when cross-compiling.
Could you please check if this error message is actually triggered with
this patch without specifying PKG_CONFIG_PATH?
I've also pushed this patch to my git repository, so it might be easier
to check that out.
diff --git a/configure.in b/configure.in
index 75e4b2f..d100794 100644
@@ -320,6 +320,30 @@ blb_cv_static_glib=yes,
+AC_CACHE_CHECK(sanity checking Glib headers,
+ if (sizeof(long) != GLIB_SIZEOF_LONG)
+ return 1;
+ return 0;
+if test "x$blb_cv_glib_sane" = "xno"; then
+ AC_MSG_ERROR([Glib headers inconsistent with current compiler setting. You might be using 32 bit Glib with a 64 bit compiler, check PKG_CONFIG_PATH])
if test "x$enable_dynamic_linking" = "xyes" -a "x$enable_static_linking" = "xyes"; then
AC_MSG_ERROR([You cannot specify dynamic and static linking at the same time.])
More information about the syslog-ng