bug-gnulib
[Top][All Lists]
Advanced

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

Re: new module 'c++defs'


From: John W. Eaton
Subject: Re: new module 'c++defs'
Date: Tue, 23 Feb 2010 00:03:25 -0500

On 23-Feb-2010, Bruno Haible wrote:

| John W. Eaton wrote:
| >   ../libgnu/stdio.h:1087: error: previous declaration of 'int 
_gl_cxxalias_dummy' with 'C++' linkage
| >   ../libgnu/signal.h:246: error: conflicts with new declaration with 'C' 
linkage
| 
| Thanks for reporting this. I'll handle it through the patch below.
| 
| But this error also means that you are including <signal.h> within an
| 'extern "C"'. Which is fishy and may cause trouble elsewhere.
| 
| Other than that, no problems? (I'll also write a unit test for this, but
| it's more interesting to hear about your success or not.)

I think I misunderstood how to enable the namespace (I should have
read the new documentation more carefully).  After adding

  #define GNULIB_NAMESPACE gnulib

to Octave's config.h file, I first saw this error:

  libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/home/jwe/src/octave/liboctave 
-I.. -I../libgnu -I/home/jwe/src/octave/libgnu 
-I/home/jwe/src/octave/libcruft/misc -ggdb3 -DHAVE_CONFIG_H 
-I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -ggdb3 
-pthread -ggdb3 -MT liboctave_la-CollocWt.lo -MD -MP -MF 
.deps/liboctave_la-CollocWt.Tpo -c /home/jwe/src/octave/liboctave/CollocWt.cc  
-fPIC -DPIC -o .libs/liboctave_la-CollocWt.o
  In file included from /usr/include/c++/4.4/cstring:45,
                   from /home/jwe/src/octave/liboctave/oct-mem.h:27,
                   from /home/jwe/src/octave/liboctave/idx-vector.h:37,
                   from /home/jwe/src/octave/liboctave/Array.h:36,
                   from /home/jwe/src/octave/liboctave/Array2.h:32,
                   from /home/jwe/src/octave/liboctave/MArray2.h:28,
                   from /home/jwe/src/octave/liboctave/dMatrix.h:27,
                   from /home/jwe/src/octave/liboctave/CollocWt.h:29,
                   from /home/jwe/src/octave/liboctave/CollocWt.cc:30:
  ../libgnu/string.h:223: error: no matches converting function 'memchr' to 
type 'void* (* const)(const void*, int, size_t)'
  /usr/include/string.h:74: error: candidates are: void* memchr(void*, int, 
size_t)
  /usr/include/string.h:76: error:                 const void* memchr(const 
void*, int, size_t)
  ../libgnu/string.h:292: error: no matches converting function 'memrchr' to 
type 'void* (* const)(const void*, int, size_t)'
  /usr/include/string.h:114: error: candidates are: void* memrchr(void*, int, 
size_t)
  /usr/include/string.h:116: error:                 const void* memrchr(const 
void*, int, size_t)

I got past this problem by changing the declared return types for
memchr and memrchr in gnulib/lib/string.in.h to be "const void *"
instead of "void *".

The next problem I encountered was

  libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/home/jwe/src/octave/liboctave 
-I.. -I../libgnu -I/home/jwe/src/octave/libgnu 
-I/home/jwe/src/octave/libcruft/misc -ggdb3 -DHAVE_CONFIG_H 
-I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -ggdb3 
-pthread -ggdb3 -MT liboctave_la-oct-glob.lo -MD -MP -MF 
.deps/liboctave_la-oct-glob.Tpo -c /home/jwe/src/octave/liboctave/oct-glob.cc  
-fPIC -DPIC -o .libs/liboctave_la-oct-glob.o
  In file included from /home/jwe/src/octave/liboctave/oct-glob.cc:31:
  ../libgnu/glob.h:215: internal compiler error: in start_decl, at 
cp/decl.c:4231
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.

I have not investigated any further.

jwe




reply via email to

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