LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GCC configuring help PLEASE!!! (https://www.linuxquestions.org/questions/linux-newbie-8/gcc-configuring-help-please-430461/)

Jagtek 03-31-2006 05:09 PM

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!!!

paulsm4 03-31-2006 09:24 PM

Try this:
Code:

cd /home/john/Desktop/gcc-4.1.0
mkdir objdir
cd objdir
../srcdir/configure


foo_bar_foo 03-31-2006 10:26 PM

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


Jagtek 04-01-2006 10:23 AM

Thank you so much... now its telling me that there is no acceptable cc found in path$

Nylex 04-01-2006 11:06 AM

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?

Jagtek 04-01-2006 11:12 AM

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!!!

Brian1 04-01-2006 12:10 PM

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

Dragineez 04-01-2006 01:19 PM

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.

btmiller 04-01-2006 02:42 PM

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.

Mara 04-01-2006 03:27 PM

Two threads have been merged. They are about one problem and, together, give a better view on the situation.

paulsm4 04-01-2006 05:42 PM

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?

Jagtek 04-03-2006 12:29 PM

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!!


All times are GMT -5. The time now is 03:34 AM.