LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 03-31-2006, 05:09 PM   #1
Jagtek
LQ Newbie
 
Registered: Mar 2006
Posts: 13

Rep: Reputation: 0
GCC configuring help PLEASE!!!


Im trying to configure GCC so that I can build it and im a little stuck! Here is what the ReadMe is telling me to do:

To configure GCC:

% mkdir objdir
% cd objdir
% srcdir/configure [options] [target]

the location of the GCC file i downloaded is /home/john/Desktop

Do I enter?:

cd /home/john/Desktop/gcc-4.1.0
mkdir objdir
cd objdir
srcdir/configure [options] [target]

when i did this it kept telling me that there is no such dir as srcdir... not really sure how do to this and any help would be appriciated!!!
 
Old 03-31-2006, 09:24 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Try this:
Code:
cd /home/john/Desktop/gcc-4.1.0
mkdir objdir
cd objdir
../srcdir/configure
 
Old 03-31-2006, 10:26 PM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
actually there really is no directory srcdir
error messages are so cool that way

Code:
cd /home/john/Desktop/gcc-4.1.0
mkdir ../objdir
cd ../objdir
../gcc-4.1.0/configure
 
Old 04-01-2006, 10:23 AM   #4
Jagtek
LQ Newbie
 
Registered: Mar 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Thank you so much... now its telling me that there is no acceptable cc found in path$
 
Old 04-01-2006, 11:06 AM   #5
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Do you have a C compiler installed? If you want to build from source, you need a compiler! If you do have a C compiler installed, then check the location of the executable and put it in your PATH environment variable. I think you do this with something like

export PATH=$PATH:/directory/to/be/added.

Check this though, as I'm not certain this is correct. Do you really need to build GCC though?
 
Old 04-01-2006, 11:12 AM   #6
Jagtek
LQ Newbie
 
Registered: Mar 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Adding CC to terminal

I have been trying to configure GCC and i have gotten to a part where the terminal is outputting the following and I'm stuck!!!:
Code:
john@ubuntu:~/Desktop/gcc-4.1.0$ ../gcc-4.1.0/configure
creating cache ./config.cache
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
checking build system type... i686-pc-linux-gnuoldld
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
john@ubuntu:~/Desktop/gcc-4.1.0$
john@ubuntu:~/Desktop/gcc-4.1.0$
How do I get CC into the terminal for use... I am using the latest distro of Ubuntu... Do I have CC or where can i get it? how do I add it to the terminal? Thanks!!!
 
Old 04-01-2006, 12:10 PM   #7
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Looks like you need to install a gcc compiler. Do a search on the drive for gcc. If not there then you need to install one. If there then it may not be in your path. If you know the location then to temporary add to your path use the commmnad .
export PATH=$PATH:/some/path:/another/path

Brian1
 
Old 04-01-2006, 01:19 PM   #8
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 278

Rep: Reputation: 41
Export CC

You can have multiple versions of gcc as well and tell it which one you want to use at compile time.

Code:
su
CC=gcc-3.4
export CC
exit
CC=gcc-3.4
export CC
You can replace the -3.4 with whatever compiler you want, provided it is installed and in your path.
 
Old 04-01-2006, 02:42 PM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You need gcc to compile gcc, believe it or not. if you don't have gcc installed, you'll need to get and install a binary package. Since you're using Ubuntu, sudo apt-get install gcc ought to do the trick.
 
Old 04-01-2006, 03:27 PM   #10
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Two threads have been merged. They are about one problem and, together, give a better view on the situation.
 
Old 04-01-2006, 05:42 PM   #11
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Jagtek - did you locate a binary copy of gcc and install it (e.g. with "apt-get gcc")? Are things squared away, or do you still want to build gcc from source too?
 
Old 04-03-2006, 12:29 PM   #12
Jagtek
LQ Newbie
 
Registered: Mar 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Yea. I actually found a thread on Ubuntu's fourms today that solved it for me. Thanks for all the help!!!! hopefully soon I will be able to contribute some back!

Oh on a side not anyone with Ubuntu can get gcc installed by just puttting in

sudo apt-get install build-essential

Maybe that will help someone in my situation out!!

Last edited by Jagtek; 04-03-2006 at 12:31 PM.
 
  


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
configuring gcc from source spooodini Linux - Software 4 10-20-2010 04:14 PM
okok how about configuring the gcc Quiber SUSE / openSUSE 2 10-20-2010 01:09 PM
Error configuring GCC, First Pass lloyd_smart Linux From Scratch 8 10-29-2004 11:45 AM
error while configuring gcc-3.3.3 (pass1) alext_29 Linux From Scratch 4 09-28-2004 11:48 PM
Installing / configuring GCC ca9mbu Programming 0 11-21-2001 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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