command 'cc' failed even though gcc is installed


 
Thread Tools Search this Thread
Operating Systems Solaris command 'cc' failed even though gcc is installed
# 1  
Old 07-13-2009
command 'cc' failed even though gcc is installed

I'm trying to build some python modules on a Solaris 10 machine. It has gcc as /usr/sfw/bin/gcc.
Code:
[root@localhost astLib-0.17.1]# CC=gcc python setup.py build
running build
running build_py
running build_ext
cc -c actread.c -o actread.o
unable to execute cc: No such file or directory
error: command 'cc' failed with exit status 1

How would I build this software on Solaris 10 - do I have to install another compiler?
# 2  
Old 07-13-2009
Solaris has its own cc compiler. It looks like your makefile does not expect gcc.
Warning:
This means if you use gcc it may not succeed. Or work correctly if it does compile.

Try this for starters:
Code:
alias cc="/usr/sfw/bin/gcc"

# 3  
Old 07-14-2009
That didn't work unfortunately. I think because (now that I've looked into it some more) this python module I'm trying to compile is using python's distutils. However even setting the compiler location directly using distutils functions doesn't work.
# 4  
Old 07-14-2009
download the package again and install cc as well as gcc.
Simple solution.
# 5  
Old 07-14-2009
When you download gcc from Sunfreeware - Freeware Open Source Software for Sun Microsystem's Solaris the precompiled package will install into /usr/local/bin.

Make sure this is in your PATH before you execute you command.

That should work.
# 6  
Old 07-15-2009
I've just tried installing gcc from sunfreeware, but there's no cc binary:
Code:
/usr/local/bin/c++        
/usr/local/bin/cpp        
/usr/local/bin/g++        
/usr/local/bin/g77        
/usr/local/bin/gcc        
/usr/local/bin/gccbug     
/usr/local/bin/gcov       
/usr/local/bin/sparc-sun-solaris2.10-c++
/usr/local/bin/sparc-sun-solaris2.10-g++
/usr/local/bin/sparc-sun-solaris2.10-gcc
/usr/local/bin/sparc-sun-solaris2.10-gcc-3.4.6

Any other ideas?
# 7  
Old 07-16-2009
I ended up using a different python install (python 2.5 now) and creating a cc symlink:
ln -s /usr/sfw/bin/gcc /usr/local/bin/cc

The compilation now works but fails on linking:
Code:
<unknown>                           0x3c60      PyWCSTools/src/worldpos.o
<unknown>                           0x3ca8      PyWCSTools/src/worldpos.o
<unknown>                           0x3cac      PyWCSTools/src/worldpos.o
<unknown>                           0x3cd4      PyWCSTools/src/worldpos.o
<unknown>                           0x3cd8      PyWCSTools/src/worldpos.o
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash find version of an installed application but if none is found set variable to App Not Installed

Hello Forum, I'm issuing a one line bash command to look for the version of an installed application and saving the result to a variable like so: APP=application --version But if the application is not installed I want to return to my variable that the Application is not installed. So I'm... (2 Replies)
Discussion started by: greavette
2 Replies

2. Solaris

No cc/gcc installed on SunOS 5.10

Hi All: this work machine has no gcc installed, the only cc is located at: /usr/ucb/cc but this does not do a make, I get error: "/usr/ucb/cc: language optional software package not installed". Meaning cc is not fully installed, correct? I do not want to get root/sysadmin involved on... (17 Replies)
Discussion started by: steve701
17 Replies

3. Red Hat

Trouble with installed / not installed rpm unixODBC/libodbc.so.1

Hey there, i run 1: on my server (RHEL 6) and getting response that the libodbc is not installed. If i use yum for installation, it tells me, there is no package like this ( 2: ). Since in the description of Definiens is mentioned that the Run-time dependency is unixODBC (libodbc.so.1), I assume... (2 Replies)
Discussion started by: rkirsten
2 Replies

4. AIX

command to list all installed patches

hi all i need an command to list all installed patches in aix 5.3 (5 Replies)
Discussion started by: maxim42
5 Replies

5. Solaris

Help on gcc command

Hi All, I have added a gcc 3.4.6 package into Solaris 10 recently and I didnot receive any error on that. I have set the path of this gcc to /usr/local/bin I tried executing a simple Hello World 'C' program but I get the following error "bash: /usr/local/bin/gcc: invalid argument". ... (7 Replies)
Discussion started by: EmbedUX
7 Replies

6. UNIX for Advanced & Expert Users

command to find when Linux OS is installed?

hey , Anyone knows command to find when Linux OS is installed? Date and time? (2 Replies)
Discussion started by: crackthehit007
2 Replies

7. Linux

RPM used to installed to get a partcular command

Hi, I have a query in linux and please find the details of it I have a command in linux and i want to know which rpm has provided that command. ie: if we take ifconfig command ,i want to know what is the rpm package used to get that command. Regards Arun.Kakarla (3 Replies)
Discussion started by: Arun.Kakarla
3 Replies

8. UNIX for Dummies Questions & Answers

bash command to get the name of OS installed

hi I want a bash command that can give me the name of the operating system installed on the local machine. Basically I will be using that for getting the name of the operating system installed on the target machine. Please reply me soon as possible Thanks Satish (3 Replies)
Discussion started by: sateeshgauns
3 Replies

9. Programming

g++ is OK while gcc is failed

#include <iostream> using namespace std; int main(void) { cout << "hello" << endl; return 0; } I tried this: 1) g++ test.cpp -o test // It's OK 2) gcc test.cpp -o test // Failed /tmp/ccriZviL.o(.text+0x14): In function `main': : undefined reference to... (3 Replies)
Discussion started by: princelinux
3 Replies

10. UNIX for Dummies Questions & Answers

Emacs & GCC not installed by default?

I just installed SUSE Linux 10.0 on my computer but when I typed " emacs & " and " gcc -c main.c" in the terminal, those programs couldn't be found. So the Linux install package does not install those programs by default? (2 Replies)
Discussion started by: whutes
2 Replies
Login or Register to Ask a Question