RE: Error rebuilding package rep-gtk




> I am rebuilding all the Helix Gnome rpm packages (for
> Red Hat 6) from SRPMS in order to remove the -g
> compilation option (my computer is low on disk and
> memory). Before doing that I have installed all the
> development packages.
> 
> But rep-gtk-0.10-0_helix_1.src.rpm is failing with the
> messages:
[snip]
> libglade-glue.c: In function `Fglade_xml_textdomain':
> libglade-glue.c:476: structure has no member named `textdomain'

This happened because of changes in libglade.  I reported this to John
Harper a while back and he sent me the following message, along with a
patch for rep-gtk which fixed the problem:

-------------
Troy Carter writes:
|libglade-glue.c: In function `Fglade_xml_textdomain':
|libglade-glue.c:476: structure has no member named `textdomain'
|make: *** [libglade-glue.lo] Error 1
|rm gdk-1.2.defs.jl gtk-1.2.defs.jl libglade-glue.c libglade.defs.jl
|
|I was able to get it to compile with the --without-libglade option to
|configure.  I have installed libglade-0.13.  Is this a problem with the
|newest libglade, or a problem in my non-root user directory setup? 

thanks for reporting this -- they changed the `textdomain' field to be
called `txtdomain' in libglade 0.13

I think the attached patch should fix the problem; please let me know
if it works or not.. (after applying it, you need to run `autoconf' in
the distribution directory)

        John
-------------

The patch is attached.  

-Troy 

--
Troy Carter                    
tcarter@princeton.edu
Index: config.h.in
===================================================================
RCS file: /dcs/vlsi/john/cvsroot/rep-gtk/config.h.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 config.h.in
--- config.h.in	1999/03/16 15:10:23	1.1.1.1
+++ config.h.in	2000/05/26 12:31:31
@@ -1,4 +1,4 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+/* config.h.in. */
 
 /* Define if you have the gdk_color_copy function.  */
 #undef HAVE_GDK_COLOR_COPY
@@ -14,3 +14,6 @@
 
 /* Define if you have the m library (-lm).  */
 #undef HAVE_LIBM
+
+/* Define if <glade/glade-xml.h> has `txtdomain' not `textdomain' field */
+#undef LIBGLADE_XML_TXTDOMAIN
Index: configure.in
===================================================================
RCS file: /dcs/vlsi/john/cvsroot/rep-gtk/configure.in,v
retrieving revision 1.21
diff -u -r1.21 configure.in
--- configure.in	2000/05/09 18:27:52	1.21
+++ configure.in	2000/05/26 14:12:39
@@ -94,6 +94,14 @@
     GNOME_LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs gnome`
     AC_SUBST(GNOME_LIBGLADE_LIBS)
     AC_SUBST(GNOME_LIBGLADE_CFLAGS)
+    AC_MSG_CHECKING([whether <glade/glade-xml.h> has "txtdomain" field])
+    _cppflags=${CPPFLAGS}
+    CPPFLAGS="${CPPFLAGS} ${LIBGLADE_CFLAGS}"
+    AC_EGREP_HEADER([char \*txtdomain;], [glade/glade-xml.h],
+		    [AC_MSG_RESULT(yes)
+		     AC_DEFINE(LIBGLADE_XML_TXTDOMAIN,1)],
+		    [AC_MSG_RESULT(no)])
+    CPPFLAGS="${_cppflags}"
     OUT="$OUT libglade-gnome.la"
   else
     AC_MSG_ERROR([libglade wasn't compiled with GNOME support])
Index: libglade-support.c
===================================================================
RCS file: /dcs/vlsi/john/cvsroot/rep-gtk/libglade-support.c,v
retrieving revision 1.8
diff -u -r1.8 libglade-support.c
--- libglade-support.c	2000/04/16 13:46:58	1.8
+++ libglade-support.c	2000/05/26 14:11:11
@@ -94,6 +94,17 @@
 				      root, domain);
 }
 
+char *
+sgtk_glade_xml_textdomain (GladeXML *xml)
+{
+#ifdef LIBGLADE_XML_TXTDOMAIN
+    /* libglade 0.13 onwards */
+    return xml->txtdomain;
+#else
+    return xml->textdomain;
+#endif
+}
+
 
 /* dl hooks / init */
 
Index: libglade.defs
===================================================================
RCS file: /dcs/vlsi/john/cvsroot/rep-gtk/libglade.defs,v
retrieving revision 1.3
diff -u -r1.3 libglade.defs
--- libglade.defs	1999/12/17 15:10:48	1.3
+++ libglade.defs	2000/05/26 12:25:52
@@ -5,7 +5,7 @@
 (define-object GladeXML (GtkData)
   (fields
    (string filename)
-   (string textdomain)))
+   (string textdomain (getter sgtk_glade_xml_textdomain))))
 
 (define-func glade_xml_new
   GladeXML
Index: rep-libglade.h
===================================================================
RCS file: /dcs/vlsi/john/cvsroot/rep-gtk/rep-libglade.h,v
retrieving revision 1.2
diff -u -r1.2 rep-libglade.h
--- rep-libglade.h	1999/12/16 22:53:51	1.2
+++ rep-libglade.h	2000/05/26 12:27:03
@@ -33,6 +33,8 @@
 extern GladeXML *sgtk_glade_xml_new_from_string (repv text, const char *root,
 						 const char *domain);
 
+extern char *sgtk_glade_xml_textdomain (GladeXML *xml);
+
 extern void sgtk_init_gtk_libglade_glue (void);
 
 #endif /* REP_LIBGLADE_H */


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