SCIENTIFIC-LINUX-USERS Archives

February 2013

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mahmood Naderan <[log in to unmask]>
Reply To:
Mahmood Naderan <[log in to unmask]>
Date:
Tue, 19 Feb 2013 08:26:13 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (75 lines)
> But why, exactly, do you want to do this?
That is my guess. What do you understand from the gdb output? Do you have a recommendation?

>Why, exactly, do you need gcc-4.1?
We have a simulator which is old. I can fix the compiler errors under gcc 4.4 for the code *itself*. However the code uses boost 1.33.1 and this version of boost won't compile on gcc4.4. 

Since I am not familiar with the complex structure of boost, at this time I have to find a way to *just* run the code.

 
Regards,
Mahmood



----- Original Message -----
From: Nico Kadel-Garcia <[log in to unmask]>
To: Mahmood Naderan <[log in to unmask]>
Cc: "[log in to unmask]" <[log in to unmask]>
Sent: Tuesday, February 19, 2013 7:50 PM
Subject: Re: searching for libgcc-4.1

On Tue, Feb 19, 2013 at 10:03 AM, Mahmood Naderan <[log in to unmask]> wrote:
> 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.

I see you put it in /opt/. *Good*, keep it out of the dfault /usr/bin
or /usr/local/bin locations.

> #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.

Good luck with that, it's a *lot* of work and likely to cause
conflicts with tyour gcc-4.4 components. You can put them in /opt if
you like. But why, exactly, do you want to do this?


> I couldn't find  "compat-libgcc.x86_64".
>
> Is there anyway to install libgcc-4.1?

libgcc and compat-gcc-34 are built from gcc source code, as part of
building up all of gcc.

Why, exactly, do you need gcc-4.1?


ATOM RSS1 RSS2