[syslog-ng] [PATCH] Fix --enable-mixed-linking mode.

Balazs Scheidler bazsi at balabit.hu
Wed Mar 23 13:22:53 CET 2011


Hi,

Thanks, I've committed a slightly modified patch:

commit 028e7852025826182ca3791dd1e72c1be9d5ace7
Author: Balazs Scheidler <bazsi at balabit.hu>
Date:   Wed Mar 23 13:22:12 2011 +0100

    configure.in: Fix --enable-mixed-linking mode.
    
    When mixed linking is enabled, the tools (pdbtool, in particular)
    weren't linked against ivykis, which resulted in a link-time error,
    due to libsyslog-ng using ivykis, but not being linked to it.
    
    A similar problem was present in the linking of syslog-ng: -livykis
    DID appear in @SYSLOGNG_DEPS_LIBS@, but the neccessary library paths
    (when using the internal ivykis) did not.
    
    This patch fixes both problems by introducing an IVYKIS_NO_LIBTOOL_LIBS
    variable, to be used when the main binary is linked in mixed mode, and adding
    IVYKIS_LIBS to TOOLS_DEPS_LIBS too.
    
    Reported-By: Peter Czanik <czanik at balabit.hu>
    Signed-off-by: Gergely Nagy <algernon at balabit.hu>
    Signed-off-by: Balazs Scheidler <bazsi at balabit.hu>


On Sat, 2011-03-19 at 16:12 +0100, Gergely Nagy wrote:
> When mixed linking is enabled, the tools (pdbtool, in particular)
> weren't linked against ivykis, which resulted in a link-time error,
> due to libsyslog-ng using ivykis, but not being linked to it.
> 
> A similar problem was present in the linking of syslog-ng: -livykis
> DID appear in @SYSLOGNG_DEPS_LIBS@, but the neccessary library paths
> (when using the internal ivykis) did not.
> 
> This patch fixes both problems. There is probably a more correct
> solution, but this will do for the time being.
> 
> Signed-off-by: Gergely Nagy <algernon at balabit.hu>
> ---
>  configure.in          |    2 +-
>  syslog-ng/Makefile.am |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.in b/configure.in
> index 7e42b3e..4e0160c 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -801,7 +801,7 @@ else
>  
>  	# tools & unit tests that link against libsyslog-ng.so should be linked with this set of libraries.
>  	# other tools that do not use libsyslog-ng.so can use the _LIBS variables directly.
> -        TOOL_DEPS_LIBS="$LIBS $BASE_LIBS $GLIB_LIBS $EVTLOG_LIBS $RESOLV_LIBS $LIBCAP_LIBS $PCRE_LIBS $REGEX_LIBS $DL_LIBS"
> +        TOOL_DEPS_LIBS="$LIBS $BASE_LIBS $GLIB_LIBS $EVTLOG_LIBS $RESOLV_LIBS $LIBCAP_LIBS $PCRE_LIBS $REGEX_LIBS $IVYKIS_LIBS $DL_LIBS"
>  
>  	# libsyslog-ng.so is linked with this set of libraries
>  	CORE_DEPS_LIBS=""
> diff --git a/syslog-ng/Makefile.am b/syslog-ng/Makefile.am
> index 33378e0..889483d 100644
> --- a/syslog-ng/Makefile.am
> +++ b/syslog-ng/Makefile.am
> @@ -14,7 +14,7 @@ syslog_ng_SOURCES = main.c
>  # libtool, because in mixed mode libtool is not used for the final linking
>  # phase.  See the comment in the configure script for details.
>  
> -syslog_ng_LDADD = -L../lib/.libs -lsyslog-ng @SYSLOGNG_DEPS_LIBS@
> +syslog_ng_LDADD = -L../lib/.libs -L../lib/ivykis/lib/.libs -L../lib/ivykis/modules/.libs -lsyslog-ng @SYSLOGNG_DEPS_LIBS@
>  syslog_ng_LINK =  @SYSLOGNG_LINK@
>  syslog_ng_wrapper_SOURCES = wrapper.c
>  

-- 
Bazsi




More information about the syslog-ng mailing list