Hi!
First of all, thanks for your reply.
And now: yes, it isn't :
/root # which gcc
which: no gcc in (/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:
/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/openv/uss0001/sbin:
/usr/openv/netbackup/bin/support:/usr/openv/uss0001/sbin:/usr/openv/netbackup/bin/support:/root/bin:
/opt/VRTS/bin:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd:
/usr/openv/netbackup/bin/goodies:/usr/openv/volmgr/bin)
/root # echo $PATH
/sbin:/usr/sbin:/usr/local/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:
/bin:/usr/games:/opt/gnome/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/openv/uss0001/sbin:
/usr/openv/netbackup/bin/support:/usr/openv/uss0001/sbin:/usr/openv/netbackup/bin/support:/root/bin:
/opt/VRTS/bin:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd:
/usr/openv/netbackup/bin/goodies:/usr/openv/volmgr/bin
Looking in yast -> Software -> Software Management -> Shearch -> gcc I see this:
| |Name |Avail. Vers. |Inst. Vers. |Summary |Size
| i |cpp |4.1.2_20070115|4.1.2_20070115|The GCC Preprocessor |5.6 M
| + |gcc |4.1.2_20070115| |The GNU C Compiler and Support Files |1.8 M
| + |gcc-c++ |4.1.2_20070115| |The GNU C++ Compiler |6.3 M
| |gcc-fortran |4.1.2_20070115| |The GNU Fortran Compiler and Support Files |8.0 M
| |gcc-info |4.1.2_20070115| |GNU Info-Pages for GCC |1.4 M
| |gcc-java |4.1.2_20070115| |The GNU Java Compiler |5.9 M
| + |gcc-locale |4.1.2_20070115| |Locale Data for the GNU Compiler Collection|4.9 M
| + |gcc-obj-c++ |4.1.2_20070115| |GNU Objective C++ Compiler |6.1 M
| + |gcc-objc |4.1.2_20070115| |GNU Objective C Compiler |6.0 M
| i |libgcc |4.1.2_20070115|4.1.2_20070115|C compiler runtime library |98.6 K
| |libgcj |4.1.2_20070115| |Java Runtime Library for gcc |38.9 M
| |libgcj-32bit|4.1.2_20070115| |Java Runtime Library for gcc |21.4 M
The '+' where there because I tried to install it.
I look over the FS '/' and it found this 2 directories:
/root # cd /
/ # find ./ -name gcc -print
./usr/lib/gcc
./usr/lib64/gcc
/ # ls -lrt ./usr/lib/gcc;ls -lrt ./usr/lib64/gcc
total 4
drwxr-xr-x 3 root root 4096 2009-07-02 12:08 i586-suse-linux
total 4
drwxr-xr-x 3 root root 4096 2008-04-22 02:37 x86_64-suse-linux
Looking inside them, this can be seen:
/ # ls -lrt ./usr/lib/gcc/i586-suse-linux/;ls -lrt ./usr/lib64/gcc/x86_64-suse-linux/
total 4
drwxr-xr-x 2 root root 4096 2009-07-02 12:08 2.95.3
total 4
drwxr-xr-x 2 root root 4096 2010-02-18 13:19 4.1.2
/ # ls -lrt ./usr/lib/gcc/i586-suse-linux/2.95.3/;ls -lrt ./usr/lib64/gcc/x86_64-suse-linux/4.1.2/
total 144
-rw-r--r-- 1 root root 123628 2006-06-16 15:13 libgcc.a
-rw-r--r-- 1 root root 1400 2006-06-16 15:13 crtendS.o
-rw-r--r-- 1 root root 1316 2006-06-16 15:13 crtend.o
-rw-r--r-- 1 root root 2152 2006-06-16 15:13 crtbeginS.o
-rw-r--r-- 1 root root 1916 2006-06-16 15:13 crtbegin.o
total 5644
-rwxr-xr-x 1 root root 5765088 2008-04-22 02:37 cc1
So, finally there are a 'cc1' file that can be a compiler. But, it's really? If yes, what should I make?
Thanks in advance...
Best regards
---------- Post updated at 10:33 AM ---------- Previous update was at 09:21 AM ----------
If this helps:
I add the directory where the cc1 file exists to the PATH:
PATH=$PATH:/usr/lib64/gcc/x86_64-suse-linux/4.1.2/
I create this file:
/bin/magius/shc-3.8.6 # echo "#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
char testvar[255];
strcpy(testvar, "Hello, Magius");
printf("%s\n", testvar);
return 1;
}" > magius.c
I create two soft links to cc1:
/bin/magius/shc-3.8.6 # ln -s /usr/lib64/gcc/x86_64-suse-linux/4.1.2/cc1 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/cc
/bin/magius/shc-3.8.6 # ls -lrt /usr/lib64/gcc/x86_64-suse-linux/4.1.2/cc
lrwxrwxrwx 1 root root 42 2010-11-18 10:27 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/cc -> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/cc1
/bin/magius/shc-3.8.6 # ln -s /usr/lib64/gcc/x86_64-suse-linux/4.1.2/cc1 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/gcc
/bin/magius/shc-3.8.6 # ls -lrt /usr/lib64/gcc/x86_64-suse-linux/4.1.2/gcc
lrwxrwxrwx 1 root root 42 2010-11-18 10:36 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/gcc -> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/cc1
And I try to compile with all: gcc, cc and cc1:
/bin/magius/shc-3.8.6 # gcc -o magius magius.c
magius.c:1:19: error: stdio.h: No such file or directory
magius.c:2:20: error: string.h: No such file or directory
main
magius.c: In function �main�:
magius.c:6: warning: incompatible implicit declaration of built-in function �strcpy�
magius.c:6: error: �Hello� undeclared (first use in this function)
magius.c:6: error: (Each undeclared identifier is reported only once
magius.c:6: error: for each function it appears in.)
magius.c:6: error: �Magius� undeclared (first use in this function)
magius.c:6: error: too many arguments to function �strcpy�
magius.c:7: warning: incompatible implicit declaration of built-in function �printf�
magius.c:7: error: expected expression before �%� token
Execution times (seconds)
TOTAL : 0.00 0.00 0.01 1824 kB
/bin/magius/shc-3.8.6 # cc -o magius magius.c
magius.c:1:19: error: stdio.h: No such file or directory
magius.c:2:20: error: string.h: No such file or directory
main
magius.c: In function �main�:
magius.c:6: warning: incompatible implicit declaration of built-in function �strcpy�
magius.c:6: error: �Hello� undeclared (first use in this function)
magius.c:6: error: (Each undeclared identifier is reported only once
magius.c:6: error: for each function it appears in.)
magius.c:6: error: �Magius� undeclared (first use in this function)
magius.c:6: error: too many arguments to function �strcpy�
magius.c:7: warning: incompatible implicit declaration of built-in function �printf�
magius.c:7: error: expected expression before �%� token
Execution times (seconds)
TOTAL : 0.00 0.01 0.01 1824 kB
/bin/magius/shc-3.8.6 # cc1 -o magius magius.c
magius.c:1:19: error: stdio.h: No such file or directory
magius.c:2:20: error: string.h: No such file or directory
main
magius.c: In function �main�:
magius.c:6: warning: incompatible implicit declaration of built-in function �strcpy�
magius.c:6: error: �Hello� undeclared (first use in this function)
magius.c:6: error: (Each undeclared identifier is reported only once
magius.c:6: error: for each function it appears in.)
magius.c:6: error: �Magius� undeclared (first use in this function)
magius.c:6: error: too many arguments to function �strcpy�
magius.c:7: warning: incompatible implicit declaration of built-in function �printf�
magius.c:7: error: expected expression before �%� token
Execution times (seconds)
parser : 0.01 (100%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall 70 kB ( 4%) ggc
TOTAL : 0.01 0.00 0.01 1824 kB
As I expect any of them works. Its the same file at the end...
I don't know what more I can do ...
Thanks in advance...