Solaris / OpenSolarisThis forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 8,581
Rep:
Assume, you gave gcc installed ... Or ?
command : which gcc
.. reply : /usr/bin/gcc
To fix the missing ' cc ' :
I don't know, from where you got the /usr/ucb/cc ?
OpenSolaris : ls /usr/ucb/
reply = lpc lpq lpr lprm lptest
.. may be unset, what you did ?
..and
cd /usr/bin/
ln -s gcc cc
.. ' cc ' means c compiler. ( e.g. = gcc ).
May be reinstall the compiler, whatever brand it is,
to have it working ?
.....
I have gcc installed, but it doesn't seem to find that one when this program installs.
/usr/ucb/cc is the cc compiler that came with the OS build, and I get the language error.
I also tried doing
ln -s /usr/local/bin/gcc cc
/usr/local/bin/cc -> /usr/local/bin/gcc*
and then when I try to build I get a completely different error when trying to build.
cc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3 -xspace -xildoff -DVERSION=\"3.01\" -DXS_VERSION=\"3.01\" -KPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" Base64.c
cc: unrecognized option `-KPIC'
cc: language ildoff not recognized
cc: Base64.c: linker input file unused because linking not done
rm -f blib/arch/auto/MIME/Base64/Base64.so
LD_RUN_PATH="" cc -G Base64.o -o blib/arch/auto/MIME/Base64/Base64.so
cc: Base64.o: No such file or directory
cc: no input files
make: *** [blib/arch/auto/MIME/Base64/Base64.so] Error 1
A C compiler is installed with Solaris 10. It just happen not to be in the PATH so you need to add /usr/sfw/bin to have it visible (or call it with its full pathname).
/usr/ucb/cc is an obsolete wrapper and shouldn't be used for any useful purpose. You might equally remove /usr/ucb from your PATH.
Another C compiler is available as an add-on, named Sun Studio. You can download and install it for free if you don't need support. The options your Makefile is using are targetting that compiler and not gcc, thus the errors you see.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,183
Rep:
Is it your own program you are compiling? Or is it some open source program that has a configure script? If you put /usr/sfw/bin in your path as suggested by jlliagre, and set an environment variable CC=gcc, then `./configure` will find gcc and configure the Makefile appropriately.
Since you are on SPARC, you could also get gccfss (gcc for Sun systems), listed among "cooltools". It is a gcc front end with a Sun Studio backend. That gives you the compatibility with all those things that have been developed using gcc, but with the optimization available from the Sun compilers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.