How to find our working compiler

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to find our working compiler
# 1  
Old 03-31-2002
How to find our working compiler

Hi, I am using Turbo Linux and needs to install Samba on it. But it said that could not find gcc. My question is how to find out which compiler is working on my system. I tried echo $CC but it gave me nothing. How can I set environmental compiler to c.
Thanks in advance.
# 2  
Old 04-01-2002

Try usinging the command cc-v this will give your the details of the compiler.
# 3  
Old 04-02-2002
Is gcc installed? You can find out by typing "whereis gcc".
Then, when you run ./configure (or whichever it is that needs it), you should be able to run it like this:
export CC=/path/to/gcc

Does this help?
# 4  
Old 04-02-2002
Sarah, i tried cc -v but it said command not found.

For the path, whereis gcc givces me the following outuput
So I tried find command and it finds the gcc in /gcc-3.01./gcc which is the folder where I unzipped the gcc.
After exporting the PATH to this folder, ./configure still gives me the same messages.

Any ohter idea ?
# 5  
Old 04-03-2002
Hmm, do you have permission to run it? Can you type :
/gcc-3.01./gcc -v
And have it work?

If so, you should be able to:
 export CC="/gcc-3.01./gcc"; ./configure

Also, try viewing the configure script. Can you set it to the binary manually?
# 6  
Old 04-03-2002
Compiler Version

Try this command

/gcc-3.01./gcc -v

this should give your the below message

Using builtin specs.
gcc version 2.95.2 19991024 (release)
# 7  
Old 04-03-2002
Thanks for your help. I got the following messages when export and run configure command.
creating cache ./config.cache
checking LIBRARY_PATH variable... ok
checking GCC_EXEC_PREFIX variable... ok
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
checking build system type... i686-pc-linux-gnuoldld
checking for gcc... /home/gcc-3.0.1/gcc
checking whether the C compiler (/home/gcc-3.0.1/gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot crea.

One hint on internet is to used rpm before gcc. I don't know what is rpm. Any help.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find not working right

if ] then leftarray=($(find . -type l -printf "%p\n" 2>/dev/null)) rightarray=($(find . -type l -printf "%l\n" 2>/dev/null)) for var in "${rightarray}" do maximumarray=`echo "$var" | tr -dc "/" | wc -c | tr -d " "` index=$(($index+1)) done ############# for numbers in... (3 Replies)
Discussion started by: xpukm
3 Replies

2. UNIX for Advanced & Expert Users

Find and delete not working

Hi, I have a .ksh script which finds all the directories older than 84 days and tries to housekeep. Below is the command used find * -depth -type d -ctime +84 -exec rm -rf {} \; The above command lists all the directories ie child and parent directory in descending order which are more... (0 Replies)
Discussion started by: annamalai77
0 Replies

3. Programming

how to find if C compiler in Solaris

Hi experts, How do I find if a C compiler is installed on Solaris ? > cc -o ksh: cc: not found > CC ksh: CC: not found > gcc ksh: gcc: not found I am using Solaris 5.8 Thanks, Sameer. (1 Reply)
Discussion started by: ensameer
1 Replies

4. AIX

how to find out the compiler version and OS from binary file

Command to get the Compiler version(xlc/gcc) from the binary on AIX platform. I m searching for the Command, to get the Compiler(xlc/gcc) used to build the binary on AIX. I got two commands used on Linux Platform: - readelf -a <lib> | grep comment - hexdump -C -s 0x49e7b -n 1812 <lib> ... (1 Reply)
Discussion started by: Prajakta
1 Replies

5. 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

6. Shell Programming and Scripting

find | gawk --- NOT WORKING

Hi every1:) I have a problem with find and Pipe to gawk. Find -name '*.txt' -> works fine.. Gives all the txt file under home directory and sub directories But when I use it like this (see below). Find -name '*.txt' | gawk -F '\t' "script" :confused: It doesn't work.... (22 Replies)
Discussion started by: Needhelp2
22 Replies

7. Programming

compiler can't find pstatus_t even procfs.h inlcuded

Hi, I am trying to get a the process cpu usage from the /proc file recently, on the Solaris 5.10. But met some rookie issue which i need some help. for below program, compiler complains that pstatus_t is undefined, although both type are defined in the procfs.h. #include <sys/procfs.h>... (4 Replies)
Discussion started by: sleepy_11
4 Replies

8. Solaris

how to find which c/c++ compiler is used in solaris10

Dear Frnz Could you tell how to determine the c/c++ compiler version installed in the solaris 10/solaris 8. IT could be very helpful if you can tell me the pkg name also. Thanks (2 Replies)
Discussion started by: sriram.s
2 Replies

9. UNIX for Advanced & Expert Users

find command not working

Hi, Having issues with the . parameter in the find command. Issuing "find . -name \*.pl" gives me find: cannot open .: No such device I got it working by substituting . with *, so "find * -name \*.pl" gives the correct listing. bin/ "which find" lists /bin/find. Anybody... (7 Replies)
Discussion started by: jabrady
7 Replies
Login or Register to Ask a Question