Archive: compilation error of 2.11 on a debian 3.0


compilation error of 2.11 on a debian 3.0
I have an old debian server 3.0 for a couple of month again :(
And I want to compile the new 2.11 version. my 2.09 compile without any problems.
I compile makensis like that:

scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all
I have the following error:
T_STANDARD_PREDEFINES -DNSIS_LOCKWINDOW_SUPPORT -DNSIS_CONFIG_PLUGIN_SUPPORT -DNSIS_FIX_COMMENT_HANDLING Source/Plugins.cpp
Source/Plugins.cpp: In function `size_t {anonymous}::file_size(ifstream &)':
Source/Plugins.cpp:50: parse error before `pos'
Source/Plugins.cpp:54: `pos_type' is not a member of type `ifstream'
Source/Plugins.cpp:54: parse error before `='
Source/Plugins.cpp:55: `result' undeclared (first use this function)
Source/Plugins.cpp:55: (Each undeclared identifier is reported only once
Source/Plugins.cpp:55: for each function it appears in.)
Source/Plugins.cpp:57: `pos' undeclared (first use this function)
Source/Plugins.cpp:60: warning: control reaches end of non-void function `{anonymous}::file_size(ifstream &)'
scons: *** [build/release/makensis/Plugins.o] Error 1

thats correspond on PLugins.cpp file to:
namespace {
size_t file_size(ifstream& file) {
const ifstream::pos_type pos = file.tellg();
on this realy old debian, my gcc version is 2.95.3
It is the problem ?
Could it be fixed ?
I maybe could have a 3.04 version, but I can't be my default gcc compiler. So could I can set it with scons ?
If could be fix, it will be better :)
Thanks :)

I only found it here:
/usr/include/g++-3/fstream.h
it maybe only a GGC 3 feature ;(


I suggest that you upgrade the server to Debian Sarge (3.1). Debian Woody (3.0) does not have as good security support as sarge, and the upgrade should be mostly painless depending on the server.


Of course, the migration is planned but not for today. It's a dev server of my company, and we can't change quickly (libc and gcc impact on our software), so for the moment, I only have my debian 3.0 :(


You can specify the compiler using CC and CXX:

scons CC=gcc-3.0 CXX=g++-3.0