Problem with g++

Pierre pierre@epinetworx.com
Sun Jun 2 02:12:00 GMT 2002


On 2002.05.27 09:36 Pierre wrote:
> Hi,
> 
> I try to compile arts 1.0.1 (a KDE application) on my linux system 
> with gcc-3.1
> there was no problem with the configure, but for the make i got :
> 
> # gmake
> gmake  all-recursive
> gmake[1]: Entering directory `/tmp/arts-1.0.1'
> Making all in libltdl
> gmake[2]: Entering directory `/tmp/arts-1.0.1/libltdl'
> gmake  all-am
> gmake[3]: Entering directory `/tmp/arts-1.0.1/libltdl'
> gmake[3]: Leaving directory `/tmp/arts-1.0.1/libltdl'
> gmake[2]: Leaving directory `/tmp/arts-1.0.1/libltdl'
> Making all in mcop
> gmake[2]: Entering directory `/tmp/arts-1.0.1/mcop'
> source='mcopconfig.cc' object='mcopconfig.lo' libtool=yes \
> depfile='.deps/mcopconfig.Plo' tmpdepfile='.deps/mcopconfig.TPlo' \
> depmode=gcc3 /bin/sh ../admin/depcomp \
> /bin/sh ../libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. 
> -I. -I.. -I../libltdl -I/usr/local/kde/include 
> -I/usr/local/qt/include -I/usr/X11R6/include  -I../libltdl  
> -DQT_THREAD_SUPPORT -O3 -march=i686 -D_REENTRANT 
> -DEXTENSION_DIR='"/usr/local/kde/lib"' 
> -DTRADER_DIR='"/usr/local/kde/lib/mcop"' -O2 -O3 -march=i686 
> -fno-exceptions -fno-check-new  -ftemplate-depth-99  -c -o 
> mcopconfig.lo `test -f mcopconfig.cc || echo './'`mcopconfig.cc
> g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../libltdl 
> -I/usr/local/kde/include -I/usr/local/qt/include -I/usr/X11R6/include 
> -I../libltdl -DQT_THREAD_SUPPORT -O3 -march=i686 -D_REENTRANT 
> -DEXTENSION_DIR=\"/usr/local/kde/lib\" 
> -DTRADER_DIR=\"/usr/local/kde/lib/mcop\" -O2 -O3 -march=i686 
> -fno-exceptions -fno-check-new -ftemplate-depth-99 -c mcopconfig.cc 
> -MT mcopconfig.lo -MD -MP -MF .deps/mcopconfig.TPlo  -fPIC -DPIC -o 
> .libs/mcopconfig.o
> In file included from /usr/local/include/g++-v3/fstream:48,
>                  from mcopconfig.cc:25:
> /usr/local/include/g++-v3/bits/basic_file.h:52: parse error before 
> `{' token
> /usr/local/include/g++-v3/bits/basic_file.h:57: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:57: function `int 
> std::overflow(int    = -1)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:60: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:60: function `int 
> std::underflow()'    is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:63: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:63: function `int 
> std::uflow()' is    initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:66: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:66: function `int    
> std::pbackfail(int)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:69: parse error before 
> `*' token
> /usr/local/include/g++-v3/bits/basic_file.h:69: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:69: function 
> `streamsize    std::xsputn(...)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:72: `_CharT' was not 
> declared in    this scope
> /usr/local/include/g++-v3/bits/basic_file.h:72: `__s' was not 
> declared in this    scope
> /usr/local/include/g++-v3/bits/basic_file.h:72: parse error before 
> `)' token
> /usr/local/include/g++-v3/bits/basic_file.h:72: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:72: function 
> `streamsize    std::xsgetn(...)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:76: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:76: function 
> `streamoff    std::seekoff(long int, std::_Ios_Seekdir, 
> std::_Ios_Openmode =    std::operator|(std::_Ios_Openmode,    
> std::_Ios_Openmode)((std::_Ios_Openmode)8, (std::_Ios_Openmode)16))' 
> is    initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:80: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:80: function 
> `streamoff    std::seekpos(long int, std::_Ios_Openmode =    
> std::operator|(std::_Ios_Openmode,    
> std::_Ios_Openmode)((std::_Ios_Openmode)8, (std::_Ios_Openmode)16))' 
> is    initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:83: `_CharT' was not 
> declared in    this scope
> /usr/local/include/g++-v3/bits/basic_file.h:83: `__b' was not 
> declared in this    scope
> /usr/local/include/g++-v3/bits/basic_file.h:83: parse error before 
> `)' token
> /usr/local/include/g++-v3/bits/basic_file.h:83: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:83: function 
> `std::streambuf*    std::setbuf(...)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:86: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:86: function `int 
> std::sync()' is    initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:89: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:89: function `int 
> std::doallocate()
>    ' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:92: `_CharT' was not 
> declared in    this scope
> /usr/local/include/g++-v3/bits/basic_file.h:92: `__s' was not 
> declared in this    scope
> /usr/local/include/g++-v3/bits/basic_file.h:92: parse error before 
> `)' token
> /usr/local/include/g++-v3/bits/basic_file.h:92: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:92: function 
> `streamsize    std::sys_read(...)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:95: parse error before 
> `*' token
> /usr/local/include/g++-v3/bits/basic_file.h:95: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:95: function 
> `streamsize    std::sys_write(...)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:98: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:98: function 
> `streamoff    std::sys_seek(long int, std::_Ios_Seekdir)' is 
> initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:101: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:101: function `int 
> std::sys_close()
>    ' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:104: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:104: function `int    
> std::sys_stat(void*)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:107: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:107: function `int 
> std::showmanyc()
>    ' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:110: virtual outside 
> class    declaration
> /usr/local/include/g++-v3/bits/basic_file.h:110: function `void    
> std::imbue(void*)' is initialized like a variable
> /usr/local/include/g++-v3/bits/basic_file.h:128: '__c_wfile_type' is 
> used as a    type, but is not defined as a type.
> /usr/local/include/g++-v3/bits/basic_file.h:133: parse error before 
> `*' token
> /usr/local/include/g++-v3/bits/basic_file.h:136: parse error before 
> `::' token
> /usr/local/include/g++-v3/bits/basic_file.h:141: type specifier 
> omitted for    parameter `ios_base'
> /usr/local/include/g++-v3/bits/basic_file.h:141: parse error before 
> `::' token
> /usr/local/include/g++-v3/bits/basic_file.h:148: parse error before 
> `::' token
> /usr/local/include/g++-v3/bits/basic_file.h:185: `streamsize' 
> declared as a    `virtual' field
> /usr/local/include/g++-v3/bits/basic_file.h:185: parse error before 
> `(' token
> /usr/local/include/g++-v3/bits/basic_file.h:191: `streamsize' 
> declared as a    `virtual' field
> /usr/local/include/g++-v3/bits/basic_file.h:191: declaration of 
> `int    __basic_file<_CharT>::streamsize'
> /usr/local/include/g++-v3/bits/basic_file.h:185: conflicts with 
> previous    declaration `int __basic_file<_CharT>::streamsize'
> /usr/local/include/g++-v3/bits/basic_file.h:191: parse error before 
> `(' token
> /usr/local/include/g++-v3/bits/basic_file.h:197: `streamoff' declared 
> as a    `virtual' field
> /usr/local/include/g++-v3/bits/basic_file.h:197: parse error before 
> `(' token
> /usr/local/include/g++-v3/bits/basic_file.h:204: `streamoff' declared 
> as a    `virtual' field
> /usr/local/include/g++-v3/bits/basic_file.h:204: declaration of 
> `int    __basic_file<_CharT>::streamoff'
> /usr/local/include/g++-v3/bits/basic_file.h:197: conflicts with 
> previous    declaration `int __basic_file<_CharT>::streamoff'
> /usr/local/include/g++-v3/bits/basic_file.h:204: parse error before 
> `(' token
> /usr/local/include/g++-v3/bits/basic_file.h:207: `streambuf' declared 
> as a    `virtual' field
> /usr/local/include/g++-v3/bits/basic_file.h:207: parse error before 
> `*' token
> /usr/local/include/g++-v3/bits/basic_file.h:220: `streamsize' 
> declared as a    `virtual' field
> /usr/local/include/g++-v3/bits/basic_file.h:220: declaration of 
> `int    __basic_file<_CharT>::streamsize'
> /usr/local/include/g++-v3/bits/basic_file.h:185: conflicts with 
> previous    declaration `int __basic_file<_CharT>::streamsize'
> /usr/local/include/g++-v3/bits/basic_file.h:220: parse error before 
> `(' token
> /usr/local/include/g++-v3/bits/basic_file.h:226: `streamsize' 
> declared as a    `virtual' field
> /usr/local/include/g++-v3/bits/basic_file.h:226: declaration of 
> `int    __basic_file<_CharT>::streamsize'
> /usr/local/include/g++-v3/bits/basic_file.h:185: conflicts with 
> previous    declaration `int __basic_file<_CharT>::streamsize'
> /usr/local/include/g++-v3/bits/basic_file.h:226: parse error before 
> `(' token
> /usr/local/include/g++-v3/bits/basic_file.h:232: `streamoff' declared 
> as a    `virtual' field
> /usr/local/include/g++-v3/bits/basic_file.h:232: declaration of 
> `int    __basic_file<_CharT>::streamoff'
> /usr/local/include/g++-v3/bits/basic_file.h:197: conflicts with 
> previous    declaration `int __basic_file<_CharT>::streamoff'
> /usr/local/include/g++-v3/bits/basic_file.h:232: parse error before 
> `(' token
> /usr/local/include/g++-v3/bits/basic_file.h:246: parse error before 
> `}' token
> In file included from /usr/local/include/g++-v3/bits/basic_file.h:250,
>                  from /usr/local/include/g++-v3/fstream:48,
>                  from mcopconfig.cc:25:
> /usr/local/include/g++-v3/i686-pc-linux-gnu/bits/basic_file_model.h:38: 
> parse    error before `*' token
> /usr/local/include/g++-v3/i686-pc-linux-gnu/bits/basic_file_model.h:38: 
> confused by earlier errors, bailing out
> gmake[2]: *** [mcopconfig.lo] Error 1
> gmake[2]: Leaving directory `/tmp/arts-1.0.1/mcop'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/tmp/arts-1.0.1'
> gmake: *** [all] Error 2
> 
> 
> 
> It would be great if you could help me with this !
> 
> Best regards,
> 
> Pierre.
> 

I have the same problem compiling fluxbox :


[...]
Making all in src
gmake[2]: Entering directory `/tmp/fluxbox-0.1.9/src'
g++ -DHAVE_CONFIG_H -I. -I. -I..   -Wall -O3 -march=i686 
-DLOCALEPATH=\"/usr/local/share/fluxbox/nls\" 
-DDEFAULTMENU=\"/usr/local/share/fluxbox/menu\" 
-DDEFAULTSTYLE=\"/usr/local/share/fluxbox/styles/Clean\" 
-DDEFAULTKEYSFILE=\"/usr/local/share/fluxbox/keys\" 
-DDEFAULT_INITFILE=\"/usr/local/share/fluxbox/init\"  -O3 -march=i686  
-I/usr/X11R6/include -DSHAPE -DSLIT  -DINTERLACE   -DTIMEDCACHE  
-DGNOME  -c BaseDisplay.cc
g++ -DHAVE_CONFIG_H -I. -I. -I..   -Wall -O3 -march=i686 
-DLOCALEPATH=\"/usr/local/share/fluxbox/nls\" 
-DDEFAULTMENU=\"/usr/local/share/fluxbox/menu\" 
-DDEFAULTSTYLE=\"/usr/local/share/fluxbox/styles/Clean\" 
-DDEFAULTKEYSFILE=\"/usr/local/share/fluxbox/keys\" 
-DDEFAULT_INITFILE=\"/usr/local/share/fluxbox/init\"  -O3 -march=i686  
-I/usr/X11R6/include -DSHAPE -DSLIT  -DINTERLACE   -DTIMEDCACHE  
-DGNOME  -c Basemenu.cc
In file included from /usr/local/include/g++-v3/fstream:48,
                  from Screen.hh:64,
                  from Basemenu.cc:39:
/usr/local/include/g++-v3/bits/basic_file.h:52: parse error before `{' 
token
/usr/local/include/g++-v3/bits/basic_file.h:57: virtual outside 
class    declaration
/usr/local/include/g++-v3/bits/basic_file.h:57: function `int 
std::overflow(int    = -1)' is initialized like a variable
[...]



Pierre.




More information about the Gcc-help mailing list