[haiku-development] Errors when compiling libstdc++ stuff.

  • From: "Bruno Albuquerque" <bga@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 27 Oct 2008 23:56:12

This seems to have been introduced with the recent changes to our legacy 
compiler. One of libraries used by IM Kit, libjabber, makes use of, for 
example, the streambuf.h file. When including it, I got erros like this 
when compiling under Haiku with the new GCC:

C++ libs/libjabber/JabberSocketPlug.o 
In file included from /boot/develop/headers/cpp/iostream.h:31,
                 from /boot/develop/headers/cpp/stl_algobase.h:53,
                 from /boot/develop/headers/cpp/list:30,
                 from /boot/home/development/imkit/libs/libjabber/
JabberHandler.h:5,
                 from /boot/home/development/imkit/libs/libjabber/
JabberSocketPlug.cpp:15:
/boot/develop/headers/cpp/streambuf.h:257: parse error before `inline'
/boot/develop/headers/cpp/streambuf.h:294: parse error before `static'
/boot/develop/headers/cpp/streambuf.h:427: parse error before `('
/boot/develop/headers/cpp/streambuf.h:453: parse error before `('
/boot/develop/headers/cpp/streambuf.h:454: semicolon missing after 
declaration of `filebuf'
/boot/develop/headers/cpp/streambuf.h:454: extraneous `char' ignored
/boot/develop/headers/cpp/streambuf.h: In function `class filebuf * cur
_ptr()':
/boot/develop/headers/cpp/streambuf.h:454: implicit declaration of 
function `int is_reading(...)'
/boot/develop/headers/cpp/streambuf.h:454: implicit declaration of 
function `int gptr(...)'
/boot/develop/headers/cpp/streambuf.h:454: implicit declaration of 
function `int pptr(...)'
/boot/develop/headers/cpp/streambuf.h:454: return to `filebuf *' from 
`int' lacks a cast
/boot/develop/headers/cpp/streambuf.h: In function `char * file_ptr()':
/boot/develop/headers/cpp/streambuf.h:456: implicit declaration of 
function `int eGptr(...)'
/boot/develop/headers/cpp/streambuf.h:456: return to `char *' from 
`int' lacks a cast
/boot/develop/headers/cpp/streambuf.h: At top level:
/boot/develop/headers/cpp/streambuf.h:458: virtual outside class 
declaration
/boot/develop/headers/cpp/streambuf.h:459: virtual outside class 
declaration
/boot/develop/headers/cpp/streambuf.h:460: virtual outside class 
declaration
/boot/develop/headers/cpp/streambuf.h:461: virtual outside class 
declaration
/boot/develop/headers/cpp/streambuf.h:462: virtual outside class 
declaration
/boot/develop/headers/cpp/streambuf.h:479: prototype for 
`ios::ios(streambuf *, ostream *)' does not match any in class `ios'
/boot/develop/headers/cpp/streambuf.h:128: candidate is: ios::ios(const 
ios &)
/boot/develop/headers/cpp/streambuf.h:489: parse error before `}'
/boot/develop/headers/cpp/iostream.h: In method `ostream::ostream()':

At least for the first 4 errors (lines 257, 294, 427 and 453), the 
problem seems to be the "protected" scope keyword in classes (I didn't 
check the other errors yet).

Considering this does not happen when cross-compiling im kit from Linux, 
I wonder if the problem is not that the new gcc requires some new 
headers we did not include? Keep in mind that before the compiler 
changes the same code would compile under Haiku without problems.

-Bruno


Other related posts: