LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-09-2002, 03:04 PM   #1
uebernewbie|
LQ Newbie
 
Registered: Nov 2002
Posts: 1

Rep: Reputation: 0
Unhappy Can't install my GCC


I've just instaled Redmond Linux, but it didnt came with a compiler, iv'e downloaded GCC but in order to install it i need to change the enviromental variable and set it to the GCC directory. Im so dumb and i dont know how to do this... any help will be really apreciated.
 
Old 11-09-2002, 03:10 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
this is from the LFS 4.0 manual at linuxfromscratch.org

GCC 3.2 with patch


Installation of GCC

This package requires its patch to be applied before you can install it. Make sure it's unpacked before running the installation commands.

This package is known to behave badly when you have changed its default optimization flags (including the -march and -mcpu options). GCC is best left alone. Therefore, if you have defined any environment variables that override default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting or modifying them when building Gcc. You have been warned.

Install GCC by running the following commands. These commands will build the C and C++ compiler. Other compilers are available within the gcc package. If you want to build all the other available compilers too, leave out the --enable-languages=c,c++ option in the configure command. See the GCC documentation for more details on which additional compilers are available.

Note: the build of other compilers is not tested by the people who actively work on LFS.

patch -Np1 -i ../gcc-3.2.patch &&
mkdir ../gcc-build &&
cd ../gcc-build &&
../gcc-3.2/configure --prefix=/usr --enable-shared \
--enable-languages=c,c++ --enable-threads=posix \
--with-slibdir=/lib --enable-__cxa_atexit \
--enable-clocale=gnu &&
make bootstrap &&
make install &&
ln -s ../usr/bin/cpp /lib &&
ln -s ../bin/cpp /usr/lib &&
ln -s gcc /usr/bin/cc

Command explanations

--enable-threads=posix: This enables C++ exception handling for multithreaded code.

--enable-__cxa_atexit: This option will result in C++ shared libraries and C++ programs that are interoperable with other linux distributions.

--enable-clocale=gnu: There is a risk that some people will build ABI incompatible C++ libraries if they didn't install all of the glibc localedata. Using --enable-clocale=gnu ensures that the "right thing" is done in all cases. If you don't wish to use this option, then at least build the de_DE locale. When GCC finds this specific locale, then the correct locale mode (gnu) is implemented.
 
Old 11-09-2002, 03:29 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Re: Can't install my GCC

Quote:
Originally posted by uebernewbie|
I've just instaled Redmond Linux, but it didnt came with a compiler, iv'e downloaded GCC but in order to install it i need to change the enviromental variable and set it to the GCC directory. Im so dumb and i dont know how to do this... any help will be really apreciated.
well that's what you get for using a distribution like lycoris / redmond...
 
Old 11-09-2002, 06:26 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
The LFS instructions aren't going to help this guy because they assume that you have a host system with a working compiler.

You are going to need to install a binary GCC, instead of from source. To put it one way: You can't compile the compiler without a compiler. Don't quote me on this but I think you need glibc installed first.

Like acid_kewpie implied, you should choose a better distro if you want to be building apps from source.
 
Old 11-10-2002, 04:43 AM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
thats true,

I would rebuild it after installing the binary
 
  


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
cant install gcc nikoz Linux - Software 4 12-02-2004 02:23 AM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 03:13 PM
how to install gcc big_bailey Linux - Software 3 07-23-2004 01:47 AM
Install GCC BizHat.com Linux - Software 10 07-19-2004 05:26 PM
Must have gcc to install gcc? thafusion Linux - Software 4 05-28-2004 11:20 PM


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