LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to configure GCC? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-configure-gcc-177445/)

co2 05-03-2004 02:49 PM

How to configure GCC?
 
Hi All

I've a problem elsewhere on this forum (unable to use rpm). However, rather than trying to fix this, I want to try and install GCC (which was the point of the rpm problem in the first place).

How do I configure GCC when I need a CC to configure it with? What do I need to ./configure GCC?

Thnx. :)

vivanovic 05-03-2004 03:44 PM

If I understand your question correctly, you don't have a C compiler available to you, but you want to build GCC from source.

Clearly without a C compiler, you will not be able to compile GCC from source, and no amount of setting of CC will help. Get yourself a binary distribution of GCC, then use that for compiling GCC.

My first recommendation is to fix your installation. Re-install your distribuition. I don't know how you got yourself to where you have a system, but no compiler. My guess is that it's likely that other things are broken as well.

Another thing you might do is to obtain a rescue CD that has a compiler on it, boot from it, and then compile GCC. You will have to set various command-line options like srcdir anud builddir correctly. Read the install README and use './configure --help' to find out more.

There are many rescue CDs out there. Googling for, say, "Linux rescue CD" should provide plenty of links, or you may check http://freshmet.net .

gregaryh 05-03-2004 03:51 PM

Why don't you just download the precompiled binaries for your system. You can get them here: http://gcc.gnu.org/install/binaries.html

To compile the GCC it is assumed you have a commercial C compiler already installed which is something of a recursive pain in the neck.

Of course, your distrobution came with the compiler on the disk image. If you did not choose to modify the default software list during installation then it was not installed. Open YaST -> Software ->Install and Remove Software. Search for GCC or filter for Package Groups and find it under development.

vivanovic 05-03-2004 04:05 PM

Ah ha! I googled for "GCC binary distribution" and didn't find the link you suggested. But "GCC binaries distribution" does bring it up as the first entry.

co2 05-04-2004 03:03 AM

Hi fellas. Thanks for the info.

Like I said, the binaries don't want to install (RPM is not functioning correctly). I presume rpm is the only way to install a binary? (Noob indicator right there! ;) )

The distro of SuSE was from a magazine, and very much cut down. Hence, no GCC.

Looks like a new install then?

Demonbane 05-04-2004 03:15 AM

RPM is not the only way but if you're using a distro that's built on rpms you better stick with it.
what error messages are you getting?

co2 05-04-2004 03:20 AM

None unfortunately, it simply doesn't do anything if I rpm -iv or use YaST. Thinks about it for a few seconds then goes back to what it was originally doing... i.e. if in the command line, will just go back to the cursor, no info, no error messages. I've check to see if it installed anything with rpm -q blah.rpm but nope, not installed.

:(

Demonbane 05-04-2004 03:22 AM

what happens when you type "rpm -qa" ?

Niteskye 05-04-2004 03:33 AM

Quote:

Originally posted by co2
The distro of SuSE was from a magazine, and very much cut down. Hence, no GCC.

Looks like a new install then?

Hey, I just got distro of SuSe 9.0 from a magazine (probably the same one!) and I've noticed the distinct lack of GCC and annoyingly an extreme lack of a decent window manager.
Once I get the chance I'm gonna have a long play with it to try get it working to my liking. I'll let you know how I get on.

co2 05-04-2004 03:51 AM

Cheers Niteskye... I presume you got the 2 x CD distro from LinuxUser? They do make apologise for not including everything. It'd be alright if my rpm or YaST was functioning correctly... does your YaST update work okay?

As for the rpm -qa, Demonbane... nope, nothing. Again, it thinks about it, but it just goes onto the command line cursor again without any feedback.

Demonbane 05-04-2004 04:10 AM

Try doing any rpm operation with -vv option, that should give you some debug messages
if you want to try installing the rpm without going through the rpm engine you can do this:
Code:

cd /
rpm2cpio /path/to/gccrpm.rpm | cpio -idv

that will extract files from the rpm to your file system, but it won't check for dependencies therefore GCC may or may not work properly.

co2 05-04-2004 04:16 AM

Nope, didn't help I'm afraid... extract all the files to the directory. If I try to configure something, still get he GCC no installed message.

Demonbane 05-04-2004 04:29 AM

gcc is properly not in the standard path, see if "whereis gcc" returns anything

co2 05-04-2004 04:35 AM

Nope, nothing. Just...

gcc:

Demonbane 05-04-2004 04:38 AM

can you tell me where you get the RPM from?


All times are GMT -5. The time now is 06:34 PM.