[bijiben] build: Failed with redundant-decls error



commit bf04763c85b75368169d09dc572b52ff16072db5
Author: Isaque Galdino <igaldino gmail com>
Date:   Tue Jun 20 23:13:25 2017 -0300

    build: Failed with redundant-decls error
    
    Ubuntu 17.10 is not being able to build it. Build fails with redundant
    redeclaration of marshaller code. Ubuntu 17.04 builds fine though.
    
    The issue is related to a new version of glib (2.53.2) which changed the
    way glib-genmarshal generates marshallers code
    (https://bugzilla.gnome.org/show_bug.cgi?id=781755).
    
    This patch fixes that while remains compatible with older glib versions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783878

 configure.ac            |    6 ++++++
 src/libbiji/Makefile.am |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4623c7a..42a6a39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,6 +67,12 @@ PKG_CHECK_MODULES([TRACKER], [tracker-sparql-1.0], [sparql_version="tracker-spar
    [PKG_CHECK_MODULES([TRACKER], [tracker-sparql-0.18], [sparql_version="tracker-sparql-0.18"])
 ])
 
+PKG_CHECK_MODULES([GENMARSHAL],
+  [glib-2.0 >= 2.53.2],
+  [include_marshalers=""],
+  [include_marshalers="#include \\\"biji-marshalers.h\\\""])
+AC_SUBST([include_marshalers])
+
 PKG_CHECK_MODULES([BIJIBEN],
                   [libecal-1.2 >= $EDS_REQUIRED_VERSION
                    libedataserver-1.2 >= $EDS_REQUIRED_VERSION
diff --git a/src/libbiji/Makefile.am b/src/libbiji/Makefile.am
index 1c0c39e..87c9522 100644
--- a/src/libbiji/Makefile.am
+++ b/src/libbiji/Makefile.am
@@ -128,7 +128,7 @@ stamp-biji-marshalers.h: biji-marshalers.list Makefile
 
 biji-marshalers.c: biji-marshalers.list biji-marshalers.h Makefile
        $(AM_V_GEN) ( \
-               echo "#include \"biji-marshalers.h\"" > xgen-tmc \
+               echo "@include_marshalers@" > xgen-tmc \
                && ( glib-genmarshal \
                        --prefix=_biji_marshal \
                        --body $(srcdir)/biji-marshalers.list \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]