C Compiler


 
Thread Tools Search this Thread
Operating Systems Solaris C Compiler
# 22  
Old 02-01-2007
A similar issue

I installed gcc on a Solaris 10 system.

Code:
$ uname -a
SunOS dncs 5.10 Generic_118822-20 sun4u sparc SUNW,Sun-Fire-880

Code:
$ gcc test.c -o test
ld: fatal: file values-Xa.o: open failed: No such file or directory
ld: fatal: File processing errors. No output written to test
collect2: ld returned 1 exit status

Looks like a linker error. Smilie

"values-Xa.o"? Is this part of another package?

GNUs I have installed on this system:

Code:
$ for i in `pkginfo -l | grep SMC|awk '{print $2}'`                  
> do
> pkginfo -l ${i}|grep NAME
> done
      NAME:  bvi
      NAME:  coreutils
      NAME:  diffutils
      NAME:  disktool
      NAME:  expat
      NAME:  findutils
      NAME:  fontconfig
      NAME:  freetype
      NAME:  gcc
      NAME:  glib
      NAME:  grep
      NAME:  gtk+
      NAME:  libiconv
      NAME:  make
      NAME:  ncurses
      NAME:  pcre
      NAME:  sudo
      NAME:  vim
      NAME:  xft
      NAME:  xrender
      NAME:  xterm
      NAME:  zlib

I didn't see any other dependencies for gcc, or any GNU linker packages available.

Smilie Smilie Smilie Smilie Smilie
# 23  
Old 02-01-2007
OK, that last one looks easy enough. Evidently I need to install the SUNWarc package.
# 24  
Old 02-01-2007
Actually it's much like the Linux kernel version vs the package distribution name and version.

I picked up Solaris at the 2.5 distro. From there it went to Solaris 2.5.1, 2.6 and then Solaris 7, 8, 9 and now 10. Sun just dropped the '2.' from the version, maybe for more cred Smilie

The kernel vesion is SunOS 5.x. So you're using SunOS kernel 5.8 on Solaris package distribution 8 or Solaris 8. Some people still stick the "2." in front of the name.

It's like the linux distros. The kernel is 2.4.21-47.0.1 but the Linux distribution is Red Hat 3.2.3-56.

Carl
# 25  
Old 02-01-2007
So then I did install the correct GNU C compiler. Now why are my header files giving me problems?
# 26  
Old 05-15-2009
Quote:
Originally Posted by lyonsd
Here is what I have installed with pkgadd...

$ pkginfo | grep SMC
application SMCgcc gcc
application SMCliconv libiconv
application SMClintl libintl


The packages were:

libiconv-1.9.2-sol8-sparc-local
libintl-3.4.0-sol8-sparc-local
gcc-3.4.6-sol8-sparc-local


Do I need anything else?

Anyway, here is my test program:

Code:
#include <stdio.h>

main()
{
        printf("hello\n");
}

Here is what happens when I try to compile it:

Code:
$ gcc test.c -o test
In file included from test.c:1:
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:36:27: iso/stdio_iso.h: No such file or directory
In file included from test.c:1:
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:194: error: syntax error before '*' token
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:229: error: syntax error before '*' token
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:230: error: syntax error before '*' token
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:236: error: syntax error before "size_t"
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:241: error: syntax error before "size_t"
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:250: error: syntax error before '*' token
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:252: error: syntax error before '*' token
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:276: error: syntax error before '*' token
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:285: error: syntax error before '*' token
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:286: error: syntax error before "FILE"
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/stdio.h:287: error: syntax error before '*' token

Smilie

Anybody know what's wrong here?

Thanks.
I've just had this - the SUNWhea package was missing which contains the stdio_iso.h files and others that are needed for gcc
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I need the compiler !!! help me

I have the code .section .data format_string: .asciz "Tong la '%d'\n" n: .int 6 .section .text .globl _start _start: movl $0,%esi movl n,%eax movl $0,%ecx loop1: cmp %eax,%ecx je print add %eax,%esi dec %eax jmp loop1 print: movl $format_string, %edi movl $0, %eax (1 Reply)
Discussion started by: toantk_55
1 Replies

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

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

C compiler

my C compiler cc is not working. probably it has corrupted. can anyone tell me location from where i can download it. Regards (4 Replies)
Discussion started by: rochitsharma
4 Replies

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

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

8. Programming

c compiler

i'm using linux to compile my c program right now. are there any free c compiler with all the standard header file, such as <stdio.h>, <unistd.h>..., i can download and use? can Microsoft Visual C++ compile C code? thanks. (1 Reply)
Discussion started by: bb00y
1 Replies

9. Programming

C compiler

I have just installed C compiler, the installation was successful but when I try to excute a gcc file I received the error message "types.c: In function `main': > types.c:4: warning: return type of `main' is not `int' > ld: fatal: file values-Xa.o: open failed: No such file or directory >... (5 Replies)
Discussion started by: hassan2
5 Replies
Login or Register to Ask a Question