gcc-c++-4.1.2 on Centos 7

Hi, i would like gcc-c++ to work on centos 7 , i have tried to find rpm's, but can't . can you please help
zen shawAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gheistCommented:
Nobody can prevent you from re-building RHEL5 source RPM of gcc 4.1.2 on CentOS7
Resurrecting a dinosaur would be more sane idea though.

Install gcc-c++ v4.8.2 instead and fix the code warnings - that had to be done some other day anyway.
0
Gerwin Jansen, EE MVETopic Advisor Commented:
You would need to compile it from source, you have a working C compiler installed on your CentOS machine, right?

Source for gcc-c++-4.1.2 is here: https://www.gnu.org/software/gcc/releases.html

Installation/building instructions here: https://gcc.gnu.org/install/
0
gheistCommented:
you can use CentOS5 yum-utils
run yumdownloader --source --resolve gcc-c++
And you have source to build
or at least add --prefix=/opt/old_cruft when running ./configure
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

zen shawAuthor Commented:
Hi gheist, it's very kind of you for replying.

would it effect if i

compile from source and install 4.1.2 and also, i keep gcc-4.8.2 as well.
basically, my question is, can both versions be kept, yes or no?

if yes, how would they effect it ?
0
zen shawAuthor Commented:
one of developer wants to install gc4.1.2 on centos 7, so i'm not sure, if i need to remove latest version to do so.
0
zen shawAuthor Commented:
sorry,if i  am annoying  you guys, how do i check if there is working c compiler installed on centos 7 machine or not?
0
gheistCommented:
touch true.c
cc -o true true.c
./true
0
gheistCommented:
GCC 4.8 gives more sophisticated warnings about common coding mistakes.
It is very very bad idea to use old compiler to conceal them
0
zen shawAuthor Commented:
basically developers have requested this ,they are using centos6 at the moment and they will be switching to centos7 ,

they want gcc4.1.2 compiler installed on centos 7 distro so that they don't have to update all their code for gcc4.8.x
so that they don't have problem when they switch to centos7

what's the best way to address this issue ?
0
zen shawAuthor Commented:
also, when i'll compile them, would i get rpm ?

or what would be the end result of compiled files

please help
0
gheistCommented:
CentOS 6 supplies gcc 4.4.7
They are liars.

Indeed they have to update all the code because GCC 4.8 warnings point to their mistakes, not to wrong compiler.

That should ent the epic story.
0
gheistCommented:
RHEL5 source does not compile with EL7 gcc 4.8, bails out.
Either they update their code or fix gcc 4.1 to build with gcc 4.8
0
zen shawAuthor Commented:
what do you mean by fix gcc4.1 to build with gcc 4.8
sorry,if i am asking very basic
0
zen shawAuthor Commented:
hi gheist, that sounds good idea, how can they do that ?
0
Gerwin Jansen, EE MVETopic Advisor Commented:
What we are trying to say is that your developers should adapt their code so it compiles with gcc 4.8

You want to migrate to the latest centos, but not the latest compiler. Your developers will have to adapt eventually, now seems a good time.

You could have both Centos 6 and 7 available to developers for a short period, say 3-6 months to give them some time and then quit with 6.
0
gheistCommented:
Well they are programmers who did not change code in last 10 years. Maybe they forgot their trade.
but GCC 4.1.2 will not compile with GCC 4.8.

You can still run programs compiled on EL5 on EL7

And you can use -W flags to disable failing checks in GCC4.8
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.