Situation
emerging surf 1.04 on Gentoo kernel 2.6.5 with gcc
version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6,
ssp-3.3.2-2, pie-8.7.6)
Compilation fails with the following error message :-
g++ -DPACKAGE=\"surf\" -DVERSION=\"1.0.4\"
-DSTDC_HEADERS=1 -DYYTEXT_POINTER=1
-DHAVE_EXPLICIT_TEMPLATE_INSTANTIATION=1
-DHAVE_LIBPTHREAD=1 -D_REENTRANT=1 -DHAVE_LIBM=1
-DHAVE_LIBZ=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBTIFF=1
-DHAVE_LIBGMP=1 -I. -I. -I../src -I../drawfunc
-I../yaccsrc -I../image-formats -I../curve -I../gtkgui
-I../mt -I../draw -I../misc -I../debug -I../xpm
-I../dither -DDATADIR=\"/usr/share\" -O2
-march=pentium3 -fomit-frame-pointer -fno-rtti
-fno-exceptions -Wall -W -Wwrite-strings
-Wpointer-arith -Wconversion -Wno-unused
-Wstrict-prototypes -Wmissing-prototypes
-Woverloaded-virtual -Wno-deprecated
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2
-I/usr/lib/glib/include -I/usr/X11R6/include
-I/usr/X11R6/include -c Script.cc
g++ -DPACKAGE=\"surf\" -DVERSION=\"1.0.4\"
-DSTDC_HEADERS=1 -DYYTEXT_POINTER=1
-DHAVE_EXPLICIT_TEMPLATE_INSTANTIATION=1
-DHAVE_LIBPTHREAD=1 -D_REENTRANT=1 -DHAVE_LIBM=1
-DHAVE_LIBZ=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBTIFF=1
-DHAVE_LIBGMP=1 -I. -I. -I../src -I../drawfunc
-I../yaccsrc -I../image-formats -I../curve -I../gtkgui
-I../mt -I../draw -I../misc -I../debug -I../xpm
-I../dither -DDATADIR=\"/usr/share\" -O2
-march=pentium3 -fomit-frame-pointer -fno-rtti
-fno-exceptions -Wall -W -Wwrite-strings
-Wpointer-arith -Wconversion -Wno-unused
-Wstrict-prototypes -Wmissing-prototypes
-Woverloaded-virtual -Wno-deprecated
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2
-I/usr/lib/glib/include -I/usr/X11R6/include
-I/usr/X11R6/include -c ExecuteScriptStruct.cc
In file included from Script.cc:39:
../misc/Misc.h:29:23: strstream.h: No such file or
directory
In file included from Script.cc:39:
../misc/Misc.h:36: error: `ostrstream' was not declared
in this scope
../misc/Misc.h:36: error: `ostr' was not declared in
this scope
../misc/Misc.h:36: error: invalid data member
initialization
../misc/Misc.h:36: error: (use `=' to initialize static
data members)
../misc/Misc.h:36: error: variable or field `alert'
declared void
../misc/Misc.h:36: error: declaration of `int Misc::alert'
../misc/Misc.h:35: error: conflicts with previous
declaration `static void
Misc::alert(const char*)'
Script.cc: In static member function `static void
Script::beforeScriptExecution()':
Script.cc:199: error: `ostrstream' undeclared (first
use this function)
Script.cc:199: error: (Each undeclared identifier is
reported only once for
each function it appears in.)
Script.cc:199: error: parse error before `;' token
Script.cc:200: error: `str' undeclared (first use this
function)
Script.cc: In static member function `static char*
Script::readFile(const
char*)':
Script.cc:254: error: `ostrstream' undeclared (first
use this function)
Script.cc:254: error: parse error before `;' token
Script.cc:255: error: `ostr' undeclared (first use this
function)
Script.cc:263: error: parse error before `;' token
Script.cc:271: error: parse error before `;' token
Script.cc:283: error: parse error before `;' token
Script.cc: In static member function `static void
Script::checkVariables()':
Script.cc:684: error: parse error before `;' token
etc....
Expected behaviour
Successful compliation
Hypothesis
--
strstream.h is deprecated and should be replaced by sstream
but as I know nothing about C++ don't take my word for
it...
--
File : Misc.h
--
#ifndef MISC_H
#define MISC_H
#include <strstream.h>
class Misc
{
public:
static bool haveGUI ();
static void alert (const char *);
static void alert (ostrstream &ostr);
static void setDoing (const char *str, double
val=-1.0);
static void setDone (double done);
};
#endif
--
A similar bug is reported with surf on Suse 8.2
Logged In: YES
user_id=17929
This has been fixed in cvs.
Thanks for your bug report.
Logged In: YES
user_id=97638
This bug has also been confirmed on Gentoo Linux as of June,
2004.
Logged In: YES
user_id=1104351
titty,
can you make an update of the package for download?
thanx.