LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2012, 11:42 AM   #1
gaurav.rustagi
LQ Newbie
 
Registered: Jan 2012
Location: Mumbai, India
Distribution: Red Hat
Posts: 23

Rep: Reputation: Disabled
Building GCC 4.6.3 from Source Code on Linux


Hi Guys,

I am trying to build gcc compiler with the required options enabled on Linux 64 machine. I need gcc to be complied with 64 bit machine so that i can compile C and C++ program in both the modes (with 32 and 64 machine). I know there are many gcc rpm which are already available, however, i want to understand how can we build gcc compiler on our own.

May be some day i' ll have to build it on Solaris or other platform.

Could you please tell me some links or document which would be helpful to get started ?

Below, i have mentioned machine configuration.

$ uname -a
Linux HOSTNAME 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

Thanks,

Last edited by gaurav.rustagi; 07-06-2012 at 11:43 AM.
 
Old 07-06-2012, 11:49 AM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
http://www-numi.fnal.gov/offline_sof...stall_gcc.html

BAM!

---------- Post added 07-06-12 at 09:49 AM ----------

Steps are correct but GCC is newer version than the link in that article. Get your tarball from: gcc.gnu.org/releases.html
 
Old 07-06-2012, 12:59 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,661

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
# 2 : The latest versions of gcc ( from gcc-4.3 ? )
have a completely different build method than the example gcc-3.2.


# 1 : Example gcc-4.7 : The procedure is valid for 4.6.x too ..
http://nosemaj.org/debian-gcc-4-7

.
 
1 members found this post helpful.
Old 07-06-2012, 01:00 PM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
I wasn't aware the method had changed, I guess I need to update my bookmarks as that one is really old. Thanks for the follow up knudfl
 
Old 07-08-2012, 03:54 PM   #5
gaurav.rustagi
LQ Newbie
 
Registered: Jan 2012
Location: Mumbai, India
Distribution: Red Hat
Posts: 23

Original Poster
Rep: Reputation: Disabled
Thanks guys.. I will check the links and will try to build gcc on Linux. Although, my final aim is to build the gcc on Solaris machine.

Cheers
 
Old 07-09-2012, 07:16 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,371

Rep: Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381Reputation: 2381
You do know you can get that as a Solaris pkg?
 
Old 07-10-2012, 01:46 AM   #7
gaurav.rustagi
LQ Newbie
 
Registered: Jan 2012
Location: Mumbai, India
Distribution: Red Hat
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
You do know you can get that as a Solaris pkg?
Could you help me with some links where i can get the complete gcc pkg for Solaris ?

Actually, I am struggling to run some shared library on Solaris with the current gcc 3.4.6 installed on the machine.

It fails during the run time saying "_cxaatexit" symbol are not found. When i do gcc -v, i can see that the cxaatexit has not been enabled while building this gcc. Therefore, I am trying to build latest gcc, hoping that everything would fall in place.
 
  


Reply

Tags
gcc46, gcc47


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
[SOLVED] error after building Linux source code for android preetb123 Linux - Mobile 4 12-14-2011 12:43 AM
[SOLVED] make use of gcc source code to parse c++ source file famsinyi Programming 14 10-19-2009 06:47 PM
building X from source code on a Slack Box User0x45 Slackware 6 07-23-2008 03:17 PM
building source code, getting a little lost in it fognight Linux - Newbie 12 01-16-2006 01:01 PM
Source-code error in Tripwire when building Ephracis Linux - Software 2 02-24-2005 12:02 PM


All times are GMT -5. The time now is 10:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration