------- Additional Comments From nileshrg at hotmail dot com 2005-03-22 06:11 ------- Hi GNU GCC developer,
To keep this updated, i resolved this bug myself, by applying following resolution. I first applied the HPUX 11.11 Quality Pack (Base and App) 412 , latest available as on March 22nd, 2005. This did not resovle the program crash, but then applying the patch for ld and linker tools patch , this crash with core got resolved completely. And program works fine now. PHSS_30970 (s700_800 11.11 ld(1) and linker tools cumulative patch) Latest patches can be found at HP's website. http://www2.itrc.hp.com/service/patch/mainPage.do Regards, Nilesh Gujarathi (In reply to comment #0) > Problem Statement: > ================== > When a simple C++ program containg one "cout", is compoled with following > command. It runs fine on system where gcc is installed but not on different > HPUX system where no GCC component are present. libstdc++.sl.5 and libgcc_s.sl > are also copied along with program so that "ldd program" resolves fine. > Compilation command: > ==================== > g++ -Wall -o mtest -lstdc++ test.cpp > System options, gcc configuration options, and Version > g++ -v: > =============== > Reading specs from /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.3.3/specs > Configured with: /scratch/zack/pkgbuild/3.3.1/hpux-11/gcc-3.3.3/configure -- > enable-languages=c,c++ --enable-threads=posix --disable-nls --with-gnu-as -- > without-gnu-ld --with-as=/usr/local/bin/as --prefix=/usr/local > Thread model: posix > gcc version 3.3.3 > uname -a: > ========= > HP-UX hpsms02 B.11.11 U 9000/800 2298023925 unlimited-user license > Compiler output: > ================= > No outpput. Programm compiled successfully. > PROGRAM FILE: > ============= > #include<iostream> > #include<string> > using namespace std; > int main() > { > string str("test"); > cout << "test string " << str << endl; > } > CORE: > ====== > hpsms05$gdb mtest core > HP gdb 3.3 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00. > Copyright 1986 - 2001 Free Software Foundation, Inc. > Hewlett-Packard Wildebeest 3.3 (based on GDB) is covered by the > GNU General Public License. Type "show copying" to see the conditions to > change it and/or distribute copies. Type "show warranty" for warranty/support. > ..Autoloading size threshold (in megabytes) of shared library symbols is 804. > /home/ngujarat/.gdbinit:2: Error in sourced command file: > No symbol table is loaded. Use the "file" command. > Core was generated by `mtest'. > Program terminated with signal 11, Segmentation fault. > warning: The shared libraries were not privately mapped; setting a > breakpoint in a shared library will not work until you rerun the program. > warning: Can't find file /opt/graphics/OpenGL/lib/libogltls.sl referenced in > dld_list. > /opt/graphics/OpenGL/lib/libogltls.sl: No such file or directory. > #0 0xc5c16500 in _ZNSo6sentryC1ERSo+0x20 () from /usr/local/lib/libstdc++.sl.5 > (gdb) bt > #0 0xc5c16500 in _ZNSo6sentryC1ERSo+0x20 () from /usr/local/lib/libstdc++.sl.5 > #1 0xc5c16bec in _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0xec > () > from /usr/local/lib/libstdc++.sl.5 > #2 0x2ebc in main () at mtest.cpp:8 > (gdb) > Thanks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20575