cc compiler problem


 
Thread Tools Search this Thread
Operating Systems Solaris cc compiler problem
# 8  
Old 11-30-2009
Quote:
Originally Posted by TonyFullerMalv
I usually set the CC variable to point to the compiler I want to use, e.g.:
Code:
$ CC=/usr/local/bin/gcc; export CC

Also ensure that /usr/local/lib is on your LD_LIBRARY_PATH.
Code:
> echo $CC
/usr/local/bin/gcc

> make
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
/bin/sh: cc: not found
make: *** [Base64.o] Error 1


Quote:
You might start by replacing -KPIC by -fpic and removing -x03 -xspace and -xildoff options.
How would I do this?
# 9  
Old 11-30-2009
By using your favorite text editor and modifying the Makefile(s) containing the unwanted options.
# 10  
Old 11-30-2009
Quote:
Originally Posted by TonyFullerMalv
I usually set the CC variable to point to the compiler I want to use, e.g.:
Code:
$ CC=/usr/local/bin/gcc; export CC

Also ensure that /usr/local/lib is on your LD_LIBRARY_PATH.
after changes made:


Code:
> make
/usr/local/bin/gcc -c   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO    -DVERSION=\"3.01\" -DXS_VERSION=\"3.01\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE"   Base64.c
gcc: language arch=v8 not recognized
gcc: Base64.c: linker input file unused because linking not done
Running Mkbootstrap for MIME::Base64 ()
chmod 644 Base64.bs
rm -f blib/arch/auto/MIME/Base64/Base64.so
LD_RUN_PATH="" cc  -G Base64.o  -o blib/arch/auto/MIME/Base64/Base64.so      
/sbin/sh: cc: not found
make: *** [blib/arch/auto/MIME/Base64/Base64.so] Error 1

# 11  
Old 11-30-2009
Then remove "-xarch=v8".

What Solaris release are you using ?
# 12  
Old 11-30-2009
Quote:
Originally Posted by jlliagre
Then remove "-xarch=v8".

What Solaris release are you using ?
Code:
> uname -a
SunOS bender 5.10 Generic_120011-14 sun4u sparc SUNW,Ultra-60 Solaris

I think I might have figured it out, I removed the xarch=v8 as well as in the makefile there were multiple references to "cc" which did not seem to be resolving to either my path, nor the path in the makefile, so it had to be changed in multiple areas. I think it worked.
# 13  
Old 11-30-2009
Glad you make it. As you are using Solaris 10 which includes gcc in /usr/sfw/bin/gcc, any specific reason why you use instead /usr/local/bin/gcc ?
# 14  
Old 11-30-2009
Quote:
Originally Posted by jlliagre
Glad you make it. As you are using Solaris 10 which includes gcc in /usr/sfw/bin/gcc, any specific reason why you use instead /usr/local/bin/gcc ?
Didn't really think it mattered, when I used the included I was receiving the same errors:

Code:
/usr/sfw/bin/gcc -c   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3 -xspace -xildoff   -DVERSION=\"1.2\" -DXS_VERSION=\"1.2\" -KPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE"   Iconv.c
gcc: unrecognized option `-KPIC'
gcc: language ildoff not recognized

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cc compiler and gcc compiler

hi, can we install gcc compiler in unix based OS(sun solar,IBM AIX,HP,etc) and also can we install sun cc compiler in AIX environment and vice versa. and more ..is linux support cc compiler regards Ajay (3 Replies)
Discussion started by: ajaysahoo
3 Replies

2. Solaris

C Compiler

Greetings, :rolleyes: :o :confused: I am working on Solaris 8. I have a few questions: 1. How do I determine if I have the CC compiler? I know it isn't in my $PATH, so how do I find it? 2. How do you install wget? I have read the INSTALL file, but I am not familar with the switches,... (25 Replies)
Discussion started by: Roam
25 Replies

3. Programming

How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries?

To make a programming language you need a compiler, so what was the first programming language and how was is created if you need the compiler first? The compiler itself is considered as a high language comparing to the machine! since the compiler is not created in 1's and 0's... Eventhough i... (12 Replies)
Discussion started by: f.ben.isaac
12 Replies

4. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

5. Solaris

C compiler

Hello Everyone!!! Can i use the C shell to compile a C program ? how ? please teach me how to compile ? Thanks!!!! Giancarlo D. Jabon (1 Reply)
Discussion started by: giancarlodjabon
1 Replies

6. Programming

C compiler

I'm new to C but eager to get started. I purchasewd beginning C by Ivor Horton and realise that I need a C compiler. I looking for the most appropriate and economical way to obtain this, any suggestions would be greatly appreciated. (5 Replies)
Discussion started by: ferret
5 Replies

7. Programming

c compiler

What can I do if my unix didn't come with cc or gcc. there must be a place to get those programs. Just not where i can find them:confused: (3 Replies)
Discussion started by: hector
3 Replies

8. Programming

Compiler....

:confused: How to do Compiler a .so with oracle9 libs? I have my file -> oracobo.pc my .so is called by Cobol App. -> Runcobol (I don't have source). Which is the statement of cc compiler? It's Right : proc oracobo.pc cc -O -q32 -DDYNAMIC_LIBRARIES_SUPPORTED... (0 Replies)
Discussion started by: luckycs
0 Replies

9. UNIX for Dummies Questions & Answers

C compiler problem

Hi all I just installed FORTE 6 c and c++ compiler after getting the 30 days trial license but after installtion the /opt/SUNWspro/bin/include dir was found empty and there is no header file..when i compile one code it is giving error include header file not found........ please give me any... (1 Reply)
Discussion started by: Prafulla
1 Replies
Login or Register to Ask a Question