LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Failed to Installed GCC (https://www.linuxquestions.org/questions/solaris-opensolaris-20/failed-to-installed-gcc-522205/)

just_a_kid 01-23-2007 08:49 PM

Failed to Installed GCC
 
Hi

i was wondering how to install gcc as i am having so many problems

1 . i download the packaged from gnu.org
2. i unzip
3. i untar ( gives me directory checksum error )
4. i go to gcc.3.4.3/ folder that just extracted
5. i set CC=/export/home/me/gcc-3.4.3/gcc
6. i type ./configure ( *** You must set the environment variable CC to a working compiler.
)


as u can see no 3 and 6 always give me problem.

gcc is a C Compiler.. why u need another C Compiler to compile this C Compiler?

any idea?

the correct step for installing gcc is
1. untar
2. ./configure
3. make
4. make install

Am i missing something?
Thanks

nikm 01-23-2007 10:30 PM

You need a compiler to compile any program. I think you should look for installing binary version of GCC for your distribution. Search on the distribution site.

jlliagre 01-24-2007 03:26 AM

And gcc is likely to be already installed if you have a recent version of Solaris.

Dox Systems - Brian 01-24-2007 07:34 AM

IIRC, there's also a gcc package available on sunfreeware...

wpn146 02-09-2007 10:22 AM

"configure" needs a WORKING compiler. It tests this by attempting to compile and run a small program. Can you code up a short "hello" program AND successfully run it?

A WORKING compiler needs an assembler, since gcc produces assembly code and then executes the assembler to produce the object file. You did not mention which version of Solaris you were using. With Solaris 8 (and may be true with other versions), the assembler was placed into /usr/ccs/bin, but only if you selected to install the development packages. The file you are looking for is /usr/ccs/bin/as.

Also, I think it would be much simpler to get gcc from "www.sunfreeware.com" and install the precompiled gcc package instead of trying to install gcc from source. If you are missing the assembler, that must be resolved first since even a precompiled gcc is useless without it.


All times are GMT -5. The time now is 10:28 AM.