LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-10-2003, 10:22 PM   #1
mla
Member
 
Registered: Sep 2003
Location: Canada
Posts: 86

Rep: Reputation: 15
gcc compiler install problem


help please with GCC compiler installation.
I found very detailed document on installation.
I follow instructions.
When I run configure I get:

[root@localhost objdir]# ../gcc-3.3.1/configure --prefix=/opt/gcc-3.3.1
Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /gcc3/objdir using "mt-frag"
../gcc-3.3.1/configure: line 8: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
[root@localhost objdir]#

How to set the environment...
Please provide detailed help.
Thanks.
Michael.
 
Old 10-11-2003, 04:24 AM   #2
IsNoGood
Member
 
Registered: Oct 2003
Posts: 67

Rep: Reputation: 15
Are you trying to compile gcc from source?
If so you'll need a working compiler to do so first or follow the steps at the gcc homepage.
If you already got a version of gcc on there you'll find where it is with whereis gcc.
Normally its /usr/bin/gcc as a symlink to whatever version you got on there.
 
Old 10-11-2003, 04:26 AM   #3
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
"export CC=/usr/bin/cc" should work (if that's where your cc lives).

You need a compiler to compile the new compiler.

hw
 
Old 10-11-2003, 06:59 AM   #4
mla
Member
 
Registered: Sep 2003
Location: Canada
Posts: 86

Original Poster
Rep: Reputation: 15
Probably I don't have any compiler
I think I didn't install packages for development
50Chapter3 •
It is recommended to run the configure script in a directory other than the source code directory so that the source code tree is completely separate from the place where you build thecompiler.

For the sake of this example, I have created a directory /gcc3/objdir and I ran the configure script from that directory. As you already know, the source code tree is under the /gcc3/gcc-3.0.4directory. You may need to add a prefix for GCC installation files. The pre-fix shows the directory where GCC files will be finally installed. The default prefix is /usr/local. This means that GCC binary files will be installed in /usr/local/bindirectory.
For installation purposes, I have selected /opt/gcc-3.0.4directory as the prefix. In a typical development environment, you would do something similar to that. Just create a directory under /opt and install all of your tools and applications under /opt. The following command line will configure the GCC compilation process and will create many files under /gcc3/objdir. These files will be used later on to build the compiler.

When you start the configure script, the following messages will start scrolling up.
[root@laptop objdir]# ../gcc-3.0.4/configure --prefix=/opt/gcc-3.0.4

Configuring for a i686-pc-linux-gnu host.Created "Makefile" in /gcc3/gcc-3.0.4 using "mt-frag"Configuring libiberty...creating cache ../config.cachechecking host system type... i686-pc-linux-
 
Old 10-11-2003, 07:03 AM   #5
mla
Member
 
Registered: Sep 2003
Location: Canada
Posts: 86

Original Poster
Rep: Reputation: 15
If possible check please text in previous post.
I created directories exactly as explained.
May be I have to do something else for updating env....
 
  


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
no gcc in suse 9.1...how do i install a compiler? set235 Linux - Newbie 2 07-28-2005 11:34 PM
Can't install GCC compiler!??!?! MickBurke Linux - Newbie 3 03-07-2005 02:53 PM
why i can't install gcc or any other C compiler? HoreC Debian 3 11-21-2004 11:51 AM
GCC Compiler Install Alpha-01 Linux - Newbie 6 10-03-2004 09:48 AM
Install GCC compiler on Mandrake 9.2 p4priya Linux - Software 1 02-19-2004 01:34 AM

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

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