LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-13-2016, 07:05 AM   #1
tommilaiho
LQ Newbie
 
Registered: Nov 2003
Posts: 25

Rep: Reputation: 0
Question Is it possible to compile an ancient GCC 4.1.2 compiler to Centos 7.2?


Hello to everybody!

This is probably very stupid project because I would like to have an ancient
GCC 4.1.2 compiler to work in a brand new Centos 7.2 with its default compilers.

There are reasons for this why I need this very old compiler however.

I get this error from the compiler:


Code:
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gccbug
config.status: creating mklibgcc
config.status: creating libada-mk
config.status: creating auto-host.h
config.status: executing default commands
Bootstrapping the compiler
make[1]: Entering directory `/home/*****666/tools/gcc412/build/src/gcc'
make[1]: *** No rule to make target `bootstrap'.  Stop.
make[1]: Leaving directory `/home/*****666/tools/gcc412/build/src/gcc'
make: *** [bootstrap] Error 2
[*****666@veijo src]$
If there is ever any sense in this attempt and you dear reader think that you could help in this
rather hopeless matter please do help me. Thank you in advance.

Should I fix the Makefile somehow? I have no single clue how to do it....
 
Old 04-13-2016, 07:46 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora 34
Posts: 3,729

Rep: Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079
What instructions are you following? It looks like you left out a step. I remember 3 phases to building GCC were making the bootstrap, making the intermediate compiler, then remaking the compiler with the intermediate compiler.
 
Old 04-13-2016, 07:52 AM   #3
tommilaiho
LQ Newbie
 
Registered: Nov 2003
Posts: 25

Original Poster
Rep: Reputation: 0
Well yes the phases are:

1.
Code:
../src/configure --prefix=/opt/gcc412 --program-suffix=412 --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit
2.
Code:
make -j 2 bootstrap
3.
Code:
su root
   make install
4.
Code:
cd /usr/bin
         ln -s /opt/gcc412/bin/gcc412 .
         ln -s /opt/gcc412/bin/g++412 .
...in case everything goes smoothly. I hope this helps to find out my mistake.
 
Old 04-13-2016, 03:48 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,534

Rep: Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622Reputation: 2622
gcc 4.1 should be in the cent repos

but most things should build with 4.3 or 4.8

what is the exact need for that specific version
 
Old 04-13-2016, 06:10 PM   #5
tommilaiho
LQ Newbie
 
Registered: Nov 2003
Posts: 25

Original Poster
Rep: Reputation: 0
please give me a link for centos 7. So far I have found gcc 4.1.2 only for Centos 5.
 
  


Reply

Tags
centos7, compile error, gcc412


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: GCC 4.9 vs. GCC 5.1 vs. GCC 6.0 SVN Compiler Benchmarks LXer Syndicated Linux News 0 06-08-2015 02:00 PM
Cannot compile gcc 4.1.2 in Centos 6.5 tommilaiho Linux - Software 13 10-08-2014 09:22 AM
handlling two gcc compiler on one Centos install jyunker Linux - Newbie 8 03-05-2014 03:26 PM
[SOLVED] [Question] How to compile a gcc compiler for another machine which got no c compiler on it shone27 Linux - Newbie 9 09-28-2011 08:32 PM
How to compile gcc when there is no c compiler installed!? So confused... chuckycharms Linux - Newbie 18 11-17-2009 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration