LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-09-2006, 04:09 PM   #1
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Rep: Reputation: 46
Is updateing gcc difficult?


I think i need update gcc because everytime I compile, I just started receiving "Internal Compiler Error" message at the end of make.
I looked over the installing instructions on the gnu website but it looks really confusing. Are there any simple steps or hints to make it easier?
Thanks.
 
Old 04-09-2006, 06:52 PM   #2
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
I think upgrading GCC might prove to be somewhat difficult, but I have installed GCC 4.0 under Slackware with no problems. Keeping two versions (in different locations, of course) is probably better idea than just plain upgrading, for several safety reasons. For example, if you run a standard Linux distro, most of the software on it was probably compiled under the version of GCC it came with. Also, keeping the old version around ensures you always have a working compiler.

But anyways, I just downloaded and extracted the source, and made a separate build directory that WAS NOT located inside the source directory. Then move to the build directory and configure:
Code:
cd ./build
../source/configure --prefix=/usr/local --program-suffix=4.0
Here I used /usr/local to install into and added 4.0 to all the installed files (to separate them from the previous versions). After configure runs, just do a `make`. (You used to have to do `make bootstrap` first, but apparently not anymore.)

If you have DejaGNU, Tcl, and Expect installed, you can do automated testing of the tools you just built by executing `make -k check` in the object directory. I didn't do this, but it's probably a very good idea.

Finally, do `make install`. Look for your binaries in the prefix directory you specified during configuration. As the installation page suggests, you probably don't want to install into a directory where a previous version of GCC exists.

So it's actually a lot like a standard software installation. In truth, it's even been streamlined a little bit since I compiled my latest version. The only difference is that it takes a really long time, and you should use a separate build directory.

[Also, note that "make" has to refer to GNU Make, so if you're using a BSD make sure to call it "gmake". But if you're using a BSD, why not just download a package or use Ports/pkgsrc?]
 
Old 04-09-2006, 11:26 PM   #3
vmlinuz.gz
Member
 
Registered: Nov 2005
Posts: 123

Rep: Reputation: 15
I've heard all sorts of bad things about upgrading gcc, but I did it running Debian 3.1 with no problems.
 
Old 04-11-2006, 01:26 PM   #4
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Original Poster
Rep: Reputation: 46
I think I might give it a try on another system. All of a sudden the compiler errors I was getting went away. Could rebooting have something to do with that? Oh well, at least I can use make now.
 
  


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
Updateing Slackware 10.2 RIB-EYE Slackware 4 10-25-2005 07:35 PM
updateing Kernal LoGic82 Fedora 1 05-27-2005 02:56 PM
updateing AGilley007 Slackware 7 07-09-2004 04:55 AM
updateing the kernel im1crazyassmofo Linux - General 6 03-04-2003 10:45 PM
updateing to 8.1 kylo8787 Slackware 1 04-16-2002 03:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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