bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gettext 0.17 build problem with libcroco


From: Bruno Haible
Subject: Re: gettext 0.17 build problem with libcroco
Date: Thu, 8 Nov 2007 02:04:53 +0100
User-agent: KMail/1.5.4

Hello Paul,

Paul Eggert wrote:
> I get the following build failure on Solaris 10 (sparc) with GCC 4.2.2:
> 
>         /bin/bash ../libtool --tag=CC   --mode=compile gcc -std=gnu99 
> -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I..  -I../intl 
> -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 
> -DLIBXML_STATIC -I../intl   -I./libcroco  -D_REENTRANT  -g -O2 -c -o 
> term-styled-ostream.lo term-styled-ostream.c
>          gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" 
> -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 
> -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I../intl -I./libcroco -D_REENTRANT -g 
> -O2 -c term-styled-ostream.c  -fPIC -DPIC -o .libs/term-styled-ostream.o
>         In file included from ./libcroco/cr-input.h:29,
>                          from ./libcroco/cr-parser.h:28,
>                          from ./libcroco/cr-om-parser.h:31,
>                          from term-styled-ostream.oo.c:25:
>         ./libcroco/cr-utils.h:43: error: expected '=', ',', ';', 'asm' or 
> '__attribute__' before 'enum'
>         ...
>         make[4]: *** [term-styled-ostream.lo] Error 1
>         make[4]: Leaving directory 
> `/var/run/rpc_door/eggert/gettext-0.17/gettext-tools/gnulib-lib'
> 
> It appears that the code depends on having something like this in an include
> file somewhere:
> 
>         #ifdef  __cplusplus
>         # define G_BEGIN_DECLS  extern "C" {
>         # define G_END_DECLS    }
>         #else
>         # define G_BEGIN_DECLS
>         # define G_END_DECLS
>         #endif

Yes, that's what I guess as well.

Here's how things should be (in directory gettext-tools/gnulib-lib/):

  - libcroco/cr-utils.h includes <glib.h>.
  - The "-I." causes glib.h to be found in this directory.
  - glib.h includes <glib/ghash.h>.
  - glib/ghash.h includes <glib/gtypes.h>.
  - glib/gtypes.h includes <glibconfig.h>.
  - glibconfig.h is found in this directory and contains

      #ifdef  __cplusplus
      # define G_BEGIN_DECLS  extern "C" {
      # define G_END_DECLS    }
      #else
      # define G_BEGIN_DECLS
      # define G_END_DECLS
      #endif

> But there isn't any include file like that.
> gnulib-local/lib/glibconfig.in.h and
> gettext-tools/gnulib-lib/glibconfig.in.h are templates for that sort
> of thing, but at the point of that compilation they haven't been
> turned into .h files yet, and they aren't being included either.
> 
> For reference, I attach the complete output of "configure" and "make".

Thanks. It appears to be this:

  checking whether included glib is requested... no
  checking for glib... yes
  checking whether to use the included glib... no

Can you look at the version of glib.h and glibconfig.h that you have installed?
(And in which directory are they installed?)
In a preinstalled glib, the G_BEGIN_DECLS should be defined in <glib/gmacros.h>
which is included from <glibconfig.h>. It's only in the glib substitute that
I moved this to <glibconfig.h>.

In any case, the error should go away if you configure with
--with-included-glib.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]