There is gcc but doesn't work !!


 
Thread Tools Search this Thread
Operating Systems Solaris There is gcc but doesn't work !!
# 1  
Old 08-12-2011
There is gcc but doesn't work !!

gcc packages are installed as is seen.
Code:
# pkginfo | grep -i gcc
system      SUNWgcc                          gcc - The GNU C compiler
system      SUNWgccruntime                   GCC Runtime libraries
#

There is gcc in /usr/sfw/bin but It doesn't work.
Code:
# gcc
bash: gcc: command not found

#

Code:
# pwd
/usr/sfw/bin
# ls -l gcc
-r-xr-xr-x   3 root     bin       106432 Jan 23  2005 gcc
#

Code:
# whereis gcc
gcc:
#
#whereis ssh
ssh: /etc/ssh  /usr/bin/ssh  /usr/lib/ssh  /usr/man/man1/ssh.1
#

I can run like below but I am trying install sudo-1.8.1 but it have given an error messages.
Code:
# /usr/sfw/bin/gcc
gcc: no input files

#

How can I do for properly working gcc.
Code:
# /sudo/sudo-1.8.1/./configure
configure: Configuring Sudo version 1.8.1
checking for gcc... no  
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/sfw/bin':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

#
# 2  
Old 08-12-2011
Quote:
Originally Posted by getrue

[
Code:
# /usr/sfw/bin/gcc
gcc: no input files

#

#
gcc no input files just means you did not give the compiler any files to compile Smilie, but it proves your gcc is working, so nothing wrong with gcc.

Do this on your shell, once you login:

Code:
export PATH=$PATH:/usr/sfw/bin

once you set the path above, run configure again. It should work.
This User Gave Thanks to dude2cool For This Post:
# 3  
Old 08-12-2011
Thanks dude gcc is working now.
Why command of whereis doesn't give properly output like ssh

Code:
# whereis ssh
ssh: /etc/ssh /usr/bin/ssh /usr/lib/ssh /usr/man/man1/ssh.1
bash-3.00# whereis gcc
gcc:
#

And also I need package of ar which name is SUNWbtool.
Code:
configure: error: the "ar" utility is required to build sudo

# 4  
Old 08-12-2011
Quote:
Originally Posted by getrue
Thanks dude gcc is working now.
Why command of whereis doesn't give properly output like ssh
because whereis is for finding things which aren't in the default PATH. From man whereis:

Code:
FILES
       /{bin,sbin,etc}

       /usr/{lib,bin,old,new,local,games,include,etc,src,man,sbin,
                           X386,TeX,g++-include}

       /usr/local/{X386,TeX,X11,include,lib,man,etc,bin,games,emacs}

It checks tons of weird places, but Sun is weird enough to defeat it.
# 5  
Old 08-12-2011
Q1:
echo $PATH is restoration when I reboot the machine.
Code:
# echo $PATH
/usr/sbin:/usr/bin

How can I set as permanently.

Q2:
I have installed SUNWbtool for "ar" utility. But I have given same error messages when press to ./configure
Code:
configure: error: the "ar" utility is required to build sudo

What is ar utility?
# 6  
Old 08-12-2011
Q1
Edit /etc/profile for general PATH for all users or the <homedir>/.profile for your current user.
# 7  
Old 08-12-2011
The ar utility is used to build .a files in compilation, which contain several .o files.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Can't get 'gcc' to work

On a SCO Unix system, the gcc command returns gcc: syntax error at line 1: `)' unexpected regardless of what else in on the command line. Thus far I have added "INCLUDE=" and the path to stdio.h which only had an include statement to ast_stdio.h to my start up procedure. I am trying to update... (2 Replies)
Discussion started by: wbport
2 Replies

2. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies

3. Shell Programming and Scripting

How come this if statement doesn't work?

greetings, the following code isn't working as i expect it to. the first dbl brackets do but the second set gets ignored. ie: if i'm on t70c6n229 it echoes "Something" and i expect it not to. what am i missing? if " ]] || " ]]; then echo "Something" fi thanx! (9 Replies)
Discussion started by: crimso
9 Replies

4. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

5. Shell Programming and Scripting

echo doesn't work right

Hi,when I run my first shell script,I got something that doesn't work right. I wrote this code in the script. echo -e "Hello,World\a\n"But the screen print like this: -e Hello,World The "-e" wasn't supposed to be printed out. Can anyone help me out?:wall: Many thanks!:) (25 Replies)
Discussion started by: Demon
25 Replies

6. UNIX for Advanced & Expert Users

remsh doesn't work

Hi, I need to use remsh inside a ksh script. The script would remsh to another machine (maybe different OS) and then execute commands. A Simple Script: #!/usr/bin/ksh remsh sun7656 -l myuser "cd /user.3/MyFolder; ls -lart" But this gives me the error: permission denied I also... (4 Replies)
Discussion started by: som.nitk
4 Replies

7. UNIX for Dummies Questions & Answers

my make doesn't work

hi I wrote the following makefile, I have just one problem, when i type make clean I get the message make 'clean' is up to date and any obj file is removed from my folder, what's wrong? Thank you CC = cc all: es.o elaboration.o $(CC) -o es es.o elaboration.o elaboration.o:... (0 Replies)
Discussion started by: Puntino
0 Replies

8. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

9. Shell Programming and Scripting

sed doesn't work

Hello I' m confused a bit. I want to replace string "&amp" with "&" using this command. sed 's/&amp/&/g' and it doesn't work. Nothing happens. On the other side this works: sed 's/&amp/@/g' or sed 's/&amp/^/g' !!! Can somebody help please? Thanks (3 Replies)
Discussion started by: billy5
3 Replies

10. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies
Login or Register to Ask a Question