bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

STL/dyn_string_init problem/SIGSEGV


From: Stefan Bruehl
Subject: STL/dyn_string_init problem/SIGSEGV
Date: Fri, 13 Dec 2002 12:52:19 +0100

Hi there,

I have a problem with the STL as is shipped with gcc
3.2.1(libstdc++.so.5.0.1) 
running under SunOS 5.8 Generic sun4u sparc SUNW,Ultra-60.
I make use of the vector class and get a SIGSEGV in the 
function dyn_string_init() when I print a string that is part of the vector
to cout.

When I compile this program with gcc 2.95.2 (libstdc++.so.2.10.0) 
running under HP-UX l1000 B.11.00 I get a SIGSEGV in
#0  0x18b10 in basic_string<char, string_char_traits<char>,
__default_alloc_template<0, 0> >::find (this=0x19, s=0xda550 ":", pos=0,
n=1)
    at
/usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.95.2/../../../../include/g++-
3/std/bastring.h:154
154         { return rep ()->len; }
I saw a patch for the STL concerning the string class, so I guess
this is an already known error.

Has anyone seen this behaviour before; is there a workaround/fix
for this problem available?

Grateful for any help
Stefan Bruehl

PS: How can I link a program statically with g++?
Here is the output I get when I use the link flad -static
1) SunOS 5.8 Generic sun4u sparc SUNW,Ultra-60
g++ -o medmig medmig.o app.o ari.o errori.o fp.o getopt.o group.o histring.o
hiutil.o host.o mystring.o preferences.o regex.o robot.o savefile.o status.o
tape.o vmgr.o hitdef.o netfunc.o wclsipc.o mynode.o list.o pool.o stacker.o
device.o -static  -lsocket -lnsl -lm 
Undefined                       first referenced
 symbol                             in file
dlclose                             /usr/lib/libnsl.a(netdir.o)
_dlopen                             /usr/lib/libc.a(nss_deffinder.o)
_dlclose                            /usr/lib/libc.a(nss_deffinder.o)
dlsym                               /usr/lib/libnsl.a(netdir.o)
dlopen                              /usr/lib/libnsl.a(netdir.o)
dlerror                             /usr/lib/libnsl.a(netdir.o)
_dlsym                              /usr/lib/libc.a(nss_deffinder.o)
ld: fatal: Symbol referencing errors. No output written to medmig

2) HP-UX l1000 B.11.00 
g++ -o medmig medmig.o app.o ari.o errori.o fp.o getopt.o group.o histring.o
hiutil.o host.o mystring.o preferences.o regex.o robot.o savefile.o status.o
tape.o vmgr.o hitdef.o netfunc.o wclsipc.o mynode.o list.o pool.o stacker.o
device.o -static  -lnsl -lm
/usr/bin/ld: Unsatisfied symbols:
   shl_load (first referenced in /usr/lib/libc.a(start_what.o)) (code)
   shl_unload (first referenced in /usr/lib/libc.a(start_what.o)) (code)
   shl_findsym (first referenced in /usr/lib/libc.a(start_what.o)) (code)
collect2: ld returned 1 exit status
------------------------------------------
Stefan Bruehl
Software Engineer
address@hidden
Fon: +49 40 6380914
Fax: +49 40 6380929
------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]