LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-09-2015, 11:52 AM   #1
anon002
LQ Newbie
 
Registered: May 2015
Posts: 10

Rep: Reputation: Disabled
Is there a way to compile gcc with an older version or build gcc manually?


Is there a way to buid gcc manually or to upgrade from a rather old version to the latest from source code? (I'm not looking for any apt or yum or any installing from repos I'm talking about straight from source code.)
 
Old 05-09-2015, 12:10 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Which gcc version do you have ? ? And which gcc version do you want ? Which OS ?


Example : gcc-5.1.0 compiles with no issues by using gcc-4.9.2 .



-

Last edited by knudfl; 05-10-2015 at 01:17 AM.
 
Old 05-09-2015, 02:07 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
How OLD ???
gcc 2 or gcc 3 ?
 
Old 05-09-2015, 08:39 PM   #4
anon002
LQ Newbie
 
Registered: May 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
The goal is to be able to build gcc for https://github.com/mathwhiz1212/auto...g-for-everyone so pretty much as old version of gcc as possible, how hard is really of no object although easier would be nicer.
P.S. The OS indicator is off, I don't use windows.

Last edited by anon002; 05-09-2015 at 08:41 PM.
 
Old 05-09-2015, 09:22 PM   #5
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You don't need an old version of gcc to compile gnupg.
 
Old 05-09-2015, 10:53 PM   #6
anon002
LQ Newbie
 
Registered: May 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
This https://gcc.gnu.org/install/ looks like it will work for my purpose and if anybody comes up with a better/easier solution than please tell us what you've found.
 
Old 05-10-2015, 02:03 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
???????
your first post is about USING a "rather OLD" version of gcc ( guessing 2 or 3 ) to build a NEW version of gcc ( guessing 4 or 5 )
Quote:
is there a way to buid gcc manually or to upgrade from a rather old version to the latest from source code?
HOW is that related to building GnuPG from a git hub page
 
Old 05-10-2015, 04:46 PM   #8
anon002
LQ Newbie
 
Registered: May 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
What I want to accomplish currently is to compile gcc 5 from gcc 2 preferably gcc 2.95, Do I have to compile any versions in between or can I do it directly?
The script I currently have compiles GnuPG which currently the script installs gcc through apt-get and I want to make it universal of operating systems so the only requirement to run my script is gcc 2 or later.

Last edited by anon002; 05-10-2015 at 04:51 PM. Reason: Mistakes
 
Old 05-10-2015, 05:41 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #8.

GCC-5.1.0 can be compiled with gcc-4.1.2 (theoretically), if I remember right.

An OS with gcc-2.95 / g++-2.95 :
Nothing at all will be usable for a contemporary gcc :
An OS that can handle gcc/g++ -2.95 has a glibc etc. etc. libs that are too early for any new gcc !


-
 
Old 05-10-2015, 11:35 PM   #10
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You may be able to compile gcc-2.95 with recent stable gcc compiler as it requires only a gnu89 capable compiler.
 
Old 05-11-2015, 01:05 AM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
gcc 2.95 ?
i have not seen that since 2002

is this a unsupported RHEL4 install or a even older RHEL3 or the almost antique RHEL2 install
if any of those three
NO NEW software will even build on it
you are stuck with software from 2002 to 2005
 
  


Reply


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
Older gcc,g++ and build essentials suryaemlinux Ubuntu 1 11-18-2010 01:57 PM
need an older gcc version parent's_basement Debian 4 12-18-2008 07:04 AM
how can I compile older versions of gcc? drkstr Slackware 11 06-11-2006 11:10 AM
kernel build problems -how to install older gcc version? kpachopoulos Fedora 3 07-04-2005 08:56 AM
using an older version of gcc win32sux Slackware 1 05-12-2004 01:53 AM

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

All times are GMT -5. The time now is 08:35 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