This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fstream, egcs, and seg faults


This may be offtopic, but I'm hoping someone here has come across this problem
before and has a solution.  I searched the last two months of egcs archives with
no luck.

The following two programs will segfault on my Linux machine:

#include <fstream.h>
void main(void)
{
        ifstream *IS;
        IS = new ifstream("test.cpp");
}

#include <fstream.h>
void main(void)
{
        ifstream IS;
        char line[256];
        IS.open("test.cpp");
        IS.getline(line, 255);
}

I came across this problem while trying to compile VTK on my machine.  I
searched dejanews for similar reports, and came across a few people who had. 
Here's the versions of software I'm running:

spoke:~> g++ -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

glibc2.1, Binutils 2.9.1.0.21, kernel 2.2.3

glibc hasn't been recompiled with a glibc2.1 compiled compiler.


Any ideas?  Should I attempt recompiling glibc2.1?

Thanks,
Dave


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]