LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
LinkBack Search this Thread
Old 11-19-2009, 04:05 AM   #1
Ippy98
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
cc compiler problem


trying to compile a program, first issue was could not find cc


so i added /usr/ucb to my PATH

now I get:


/usr/ucb/cc: language optional software package not installed


anyone have any ideas?



Solaris 10/Sparc64
 
Old 11-19-2009, 04:57 AM   #2
business_kid
Senior Member
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware 13.37 & Cyanogenmod 6.0
Posts: 3,830

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
Usually not finding cc means no compiler is there.
Check the compiler installation.
 
Old 11-19-2009, 05:21 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 8,581

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
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 ?
.....

Last edited by knudfl; 11-19-2009 at 05:32 AM.
 
Old 11-19-2009, 06:05 AM   #4
Ippy98
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 11-19-2009, 08:56 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Ubuntu, OEL
Posts: 9,091

Rep: Reputation: 227Reputation: 227Reputation: 227
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.
 
Old 11-19-2009, 08:33 PM   #6
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,183

Rep: Reputation: 105Reputation: 105
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 01:35 PM
problem with C compiler!!!!!need help rahat.azim Linux - Newbie 4 01-21-2008 11:04 AM
Problem in C compiler tirtha Linux - Newbie 3 07-04-2006 11:57 AM
C++ compiler problem? New 2 The Game Linux - Software 2 09-06-2003 02:09 AM


All times are GMT -5. The time now is 05:55 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration