Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

gcc-c++-4.1.2 on Centos 7

Posted on 2014-10-15
16
Medium Priority
?
1,328 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 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
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month13 days, 3 hours left to enroll

578 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