SegFault in created C++ binary
Ingo Krabbe
ingo@gokra.ping.de
Thu May 25 10:09:00 GMT 2000
host = i586-pc-linux-gnu
Hi debuggers,
I don't think thats really a bug, its more or less my personal
exception,
but I think my configuration is common enough to send to this list.
First of all the newly compiled gcc-2.95.2 works well with my systems
library. The time I encounter a problem is when I'm trying to build
a C++ binary with an own glibc library which went into another path than
the
standard one. Here is my configuration:
1. built binutils, gcc and gdb with the system libraries
and installed them into --prefix=/home/System
2. built a new glibc-2.1.3 with --prefix=/home/NativeLibc
3. configured the specs file to -dynamic-linker
/home/NativeLibc/lib/ld-linux.so.2
4. set LD_RUN_PATH=/home/NativeLibc/lib:/home/System/lib,
set LIBRARY_PATH=$LD_RUN_PATH
optional set C_INCLUDE_PATH=/home/NativeLibc/include
5. tried to compile a simple hello, world ! with iostream and
cout ...
6. ./a.out gives a segmentation fault in genops.c:197
when it tries to call _IO_OVERFLOW
gdb.output:
Program received signal SIGSEGV, Segmentation fault.
0x400c5d3d in __overflow (f=0x4004b9a0, ch=-1) at genops.c:197
197 return _IO_OVERFLOW (f, ch);
(gdb) l
192 int
193 __overflow (f, ch)
194 _IO_FILE *f;
195 int ch;
196 {
197 return _IO_OVERFLOW (f, ch);
198 }
The same happens after recompiling the complete gcc with the new
NativeLibc
hmm... the gcc works with the new libraries but not the c++
compiltation.
I think that must be a fixed header problem or a libstdc++ recompile
problem.
I don't know what to do anymore in this state. I'm going to bed now,
please help me ...
THANX
CU INGO
More information about the Gcc-bugs
mailing list