LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-07-2005, 05:27 PM   #1
alexjordan02
LQ Newbie
 
Registered: Jan 2004
Location: Lawton, Oklahoma
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
GCC install


Hello everyone. I have downloaded the lastest stable version of GCC from
their website. I noticed that it had tons of prereq's you had to install before installing the GCC tarball. Is there an easier way to install GCC without having to install all of the prereq packages. Can you use cpan ?

Thanks a bunch for your responses?

Tony
 
Old 07-07-2005, 05:47 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Unfortunally you can't use cpan here, it is for Perl modules...

For proper compilation and installation of gcc in slackware,
try refer to the official slackbuild script :
ftp://ftp.belnet.be/packages/slackwa...gcc.SlackBuild
 
Old 07-08-2005, 03:37 PM   #3
alexjordan02
LQ Newbie
 
Registered: Jan 2004
Location: Lawton, Oklahoma
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
So what do I do with this script ?
Thanks,

Tony
 
Old 07-08-2005, 04:19 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Do you want to compile gcc or just do an easy install ?
 
Old 07-11-2005, 09:05 AM   #5
alexjordan02
LQ Newbie
 
Registered: Jan 2004
Location: Lawton, Oklahoma
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Easy install.
 
Old 07-11-2005, 09:39 AM   #6
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Before you bust your Slack install - ask yourself why you want to upgrade GCC.

You can, theoretically, ./configure && make && make install a new GCC. It will probably work.

It is, however, not advisable.

GCC, glibC, binutils and the kernel headers (not the kernel source) are all intertwined in your system and are collective known as "the toolchain". Frequently when upgrading one of those components, it will cease to function and require you up to upgrade another one first, but of course, it's a circular dependancy that will result in you having to "bootstrap" GCC to build the rest.

There's no reason why you can't have more than one compiler on your system (although you'll have to learn how to use a different compiler, and not just ./configure && make && make install) and I would recommend looking into something called "crosstool" to do this. I'm positive you can have multiple compilers (I'm sorry for botching, Kai!) with the same glibc, binutils and kernel headers, but off the top of my head I couldn't say how, and I suspect it's not safe to do so.

The crosstool build matrix is here: http://kegel.com/crosstool/crosstool-0.37/buildlogs/
And the crosstool main page is here: http://kegel.com/crosstool/

Detailed reading of the crosstool source will give you a starting point for upgrading your toolchain (since binutils and glibc are better off built by the same GCC you are using ... ), but ultimately you should probably learn how the toolchain is put together so you don't break it.

Back to the original question, though: why do you want to upgrade GCC?

Because it's got a higher version number? Because it's "better" than the one you got with Slack? Because you want to learn how the toolchain works?

I don't think there's a wrong reason for wanting to upgrade, but I wanted you to be aware of the amount of issues you may cause by doing so. Messing with GCC is more sensible than messing with glibC, but do your homework first!

Good luck,
- Piete.

PS: The .SlackBuild script is what is used to make the original Slackware packages. In short it takes the raw tar.bz2 and builds the gcc*.tgz files from source. You will have to modify the SlackBuild script to make it work with the newer GCC and possibly even patch the GCC sources (this is unlikely for an x86 architecture).

PPS: Prerequisites are required. You cannot avoid them. You likely have most of them installed anyway since you have a full toolchain already. GCC can compile itself with only a bare minimal host toolchain in certain circumstances.

PPPS: LFS (linuxfromscratch) is your friend.
 
Old 07-11-2005, 12:47 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
alexjordan02, for an easy install, get the gcc package from
any mirror you want:
http://slackware.com/pb/download.php...c-3.3.6-i486-1

then install it with : installpkg gcc-3.3.6-i486-1.tgz
 
  


Reply



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
how to install gcc? xelt Linux - Newbie 4 04-13-2005 10:03 AM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM
What is GCC and how to you install it? lazicsavo Linux - Software 5 10-25-2004 01:58 PM
Must have gcc to install gcc? thafusion Linux - Software 4 05-28-2004 10:20 PM
cc....gcc....install??? sparrot Linux - Newbie 10 03-31-2003 08:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:41 AM.

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