public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc binaries for Solaris 2.5
@ 2007-06-30 10:37 Ken Hickey
  2007-07-01 17:28 ` Kai Ruottu
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Hickey @ 2007-06-30 10:37 UTC (permalink / raw)
  To: gcc-help

Hi,

 I downloaded the precompiled version of gcc ,
gcc-2.95.3-sol25-sparc-local.gz , installed it with 'pkgadd' and eveything
seemed OK. However, when I
tried to compile the gcc source with this from the file gcc-2.95.3.tar.gz  ,
the output from the configure command started out OK but there was a
compilation
error that ended with the following three lines:

	ld: fatal: file values -Xa.o: cannot open file; errno = 2
	*** The command 'gcc -o conftest -g -02  conftest.c' failed
	*** You must set the environment variable CC  to a working compiler

Has anyone seen this before?

Ken



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gcc binaries for Solaris 2.5
  2007-06-30 10:37 gcc binaries for Solaris 2.5 Ken Hickey
@ 2007-07-01 17:28 ` Kai Ruottu
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Ruottu @ 2007-07-01 17:28 UTC (permalink / raw)
  To: khickey; +Cc: gcc-help

Ken Hickey wrote:
>  I downloaded the precompiled version of gcc ,
> gcc-2.95.3-sol25-sparc-local.gz , installed it with 'pkgadd' and eveything
> seemed OK. However, when I
> tried to compile the gcc source with this from the file gcc-2.95.3.tar.gz  ,
> the output from the configure command started out OK but there was a
> compilation
> error that ended with the following three lines:
>
> 	ld: fatal: file values -Xa.o: cannot open file; errno = 2
> 	*** The command 'gcc -o conftest -g -02  conftest.c' failed
> 	*** You must set the environment variable CC  to a working compiler
>
> Has anyone seen this before?
>   
 Something like this maybe 15 or so years ago when downloading 'gcc' and 
expecting it being something
similar as "Borland Turbo C" for DOS...  It wasn't it couldn't even 
"compile" a 'hello.c' into an executable!
I only didn't understand what "compiling" means and my paradigm related 
to compilers was promptly
corrected....

 Definitely the 'gcc' you downloaded is a "working compiler", it can 
"compile" a C file into a assembler
text file (if the standard headers are available)!  The "compilers" in 
GCC are doing just this "compiling"
but nothing more :-(   For doing "more" one needs an 'assembler', 'as', 
which compiles the assembler
text into an object file, '.o', and then this object file will be 
"linked" with the precompiled "startups" and
functions (as object files collected in "libraries") in order to produce 
an "executable", using a 'linker', 'ld'....

 Usually when one downloads something, one first tries something 
'simple' with it....  A "Hello World",
'hello.c', is a quite well-known test program for a  "C compiler"....   
The logic in doing a simple "compile
and link" test before going to try to compile and link a very big source 
collection like the GCC sources
is just the same as trying to drive 100 feet with a car before 
considering to drive 100 miles with it....

 Ok, if you would try to compile and link a 'hello.c' with the 
downloaded 'gcc':

     gcc -o hello hello.c

you would see it failing miserably because you have no C library with 
its startups installed in your system.
The optionally installed SUNW-packages are providing the C library for 
Solaris2.x so just install them,
then try that 'hello.c', see what happens and most probably be happy!   
After this you can try the GCC
configure again....

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-01 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-30 10:37 gcc binaries for Solaris 2.5 Ken Hickey
2007-07-01 17:28 ` Kai Ruottu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).