Re: gcc binaries for Solaris 2.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux