Solved

gcc-c++-4.1.2 on Centos 7

Posted on 2014-10-15
16
790 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
  • 7
  • 7
  • 2
16 Comments
 
LVL 61

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 37

Expert Comment

by:Gerwin Jansen
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 61

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
 

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 61

Expert Comment

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

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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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 61

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 61

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 37

Expert Comment

by:Gerwin Jansen
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 61

Accepted Solution

by:
gheist earned 500 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now