?
Solved

gcc-c++-4.1.2 on Centos 7

Posted on 2014-10-15
16
Medium Priority
?
1,147 Views
Last Modified: 2014-10-20
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
0
Comment
Question by:zen shaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
  • 2
16 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40383208
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
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40383220
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
 
LVL 62

Expert Comment

by:gheist
ID: 40383235
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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 

Author Comment

by:zen shaw
ID: 40383248
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
 

Author Comment

by:zen shaw
ID: 40383249
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
 

Author Comment

by:zen shaw
ID: 40383252
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
 
LVL 62

Expert Comment

by:gheist
ID: 40383255
touch true.c
cc -o true true.c
./true
0
 
LVL 62

Expert Comment

by:gheist
ID: 40383256
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
 

Author Comment

by:zen shaw
ID: 40383276
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
 

Author Comment

by:zen shaw
ID: 40383290
also, when i'll compile them, would i get rpm ?

or what would be the end result of compiled files

please help
0
 
LVL 62

Expert Comment

by:gheist
ID: 40383431
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
 
LVL 62

Expert Comment

by:gheist
ID: 40383441
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
 

Author Comment

by:zen shaw
ID: 40385688
what do you mean by fix gcc4.1 to build with gcc 4.8
sorry,if i am asking very basic
0
 

Author Comment

by:zen shaw
ID: 40385721
hi gheist, that sounds good idea, how can they do that ?
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40386032
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
 
LVL 62

Accepted Solution

by:
gheist earned 2000 total points
ID: 40386040
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

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month9 days, 5 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question