Subject: | |
From: | |
Reply To: | |
Date: | Tue, 19 Feb 2013 07:03:51 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi
I have manually compiled gcc/g++-4.1 on SL6.3 which has gcc/g++-4.4 by default. Problem is, when I run a simple c++ code, I get a crash.
#include <fstream>
using namespace std;
int main()
{
ofstream fout ("test.txt", fstream::out);
return 0;
}
[mahmood@localhost ~]$ /opt/gcc-4.1.2-built/bin/g++ -g -ggdb -o test test.cpp
[mahmood@localhost ~]$ gdb test
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
...
Reading symbols from /home/mahmood/test...done.
(gdb) r
Starting program: /home/mahmood/test
Program received signal SIGSEGV, Segmentation fault.
0x00000037e26f22d0 in ?? () from /usr/lib64/libstdc++.so.6
Missing
separate debuginfos, use: debuginfo-install
glibc-2.12-1.80.el6_3.5.x86_64 libgcc-4.4.6-4.el6.x86_64
libstdc++-4.4.6-4.el6.x86_64
(gdb) bt
#0 0x00000037e26f22d0 in ?? () from /usr/lib64/libstdc++.so.6
#1 0x0000000000000000 in ?? ()
(gdb)
From the output, I see that although I used g++-4.1, at runtime the program uses libgcc-4.4. Now what I want to do is to install a package like libgcc.x86_64 which supports g++-4.1.
I couldn't find "compat-libgcc.x86_64".
Is there anyway to install libgcc-4.1?
Regards,
Mahmood
|
|
|