gcc not working on Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris gcc not working on Solaris 10
# 1  
Old 03-02-2009
gcc not working on Solaris 10

I have a very simple c++ program like:

> cat easy_gcc.cc

#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>

int debugging = 1;

int main()
{
printf ("This is a very simple program\n");
return(0);
}


When I compile it on Solaris 9 it works fine:

> uname -a
SunOS admin-srv112 5.9 Generic_122300-07 sun4u sparc SUNW,Sun-Fire-480R

> /mu/bin/gcc -fPIC -c easy_gcc.cc
> /mu/bin/gcc -fPIC easy_gcc.o -o easy_gcc

> ./easy_gcc
This is a very simple program



When I try compiling it on Solaris 10, it blows up.

> uname -a
SunOS admin-srv44 5.10 Generic_118833-36 sun4v sparc SUNW,Sun-Fire-T200

> /mu/bin/gcc -fPIC -c easy_gcc.cc
In file included from /usr/include/sys/wait.h:24,
from /usr/include/stdlib.h:22,
from easy_gcc.cc:6:
/usr/include/sys/siginfo.h:259: error: 'ctid_t' is used as a type, but is not
defined as a type.
/usr/include/sys/siginfo.h:260: error: 'zoneid_t' is used as a type, but is not
defined as a type.
/usr/include/sys/siginfo.h:390: error: 'ctid_t' is used as a type, but is not
defined as a type.
/usr/include/sys/siginfo.h:391: error: 'zoneid_t' is used as a type, but is not
defined as a type.


Can some one please help me out..
# 2  
Old 03-02-2009
118833-36 has TOOO much bugs in it.. Would you mind patching the system's kernel ?Smilie
# 3  
Old 03-04-2009
patching..

Hi incredible,
could you please provide some details of your idea of patching.

Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

gcc problem on Solaris

I just installed gcc from the latest package at sunfreeware.com using pkgadd. I write a simple 'Hello World!' program to test it. I try to compile it and I get this error: rockstar# gcc hello.c -o hello ld.so.1: gcc: fatal: libiconv.so.2: open failed: No such file or directory Killed I... (0 Replies)
Discussion started by: Bradj47
0 Replies

2. Solaris

Help with installing gcc on Solaris 10

I want to install gcc for Solaris 10 to an alternate location besides /usr/local/bin, so I can't use the pre-compiled package from sunfreeware.com. So I assume I need to compile gcc for myself and specify --prefix. How can I accomplish this? Am I pretty much out of luck trying to compile... (3 Replies)
Discussion started by: srhadden
3 Replies

3. Linux

gcc compiled executable not working across x86_64 linux platforms

Hi I compiled a hello world program on two different 64-bit Linux machines, named quimby and node0331. When I compile on quimby and run on node0331 I get a "Floating exception (core dumped)" error. But if I do it in reverse, things work fine. Here's my compilation on quimby: $ uname -a... (3 Replies)
Discussion started by: same1290
3 Replies

4. Solaris

Installing gcc 2.8.1 on Solaris 10

Folks - This may sound like a newbee question - and it is. But a project that I'm managing is under a time crunch and I need a quick answer. IS it possible to install gcc 2.8.1 on a Solaris 10 Sun box? We have some old libraries that need that version of the compiler in order to work... (2 Replies)
Discussion started by: peridot
2 Replies

5. Solaris

Need help in building gcc on solaris.

We are moving from old solaris to new version of solaris. I have copied the gcc compiler installed on old server to new solaris server. But just copying didn't work. So I am trying to build it on the new server. The server version is sailfish@st-kvar02 -> uname -a SunOS st-kvar02 5.10... (7 Replies)
Discussion started by: nalina.hv
7 Replies

6. UNIX for Dummies Questions & Answers

gcc-3.4.4 build on solaris 10 failing please help

I am building gcc-3.4.4 on sol-10 and getting the following error. my configure is going well but failing in the build stage *** checking for windres... windres checking whether to enable maintainer-specific portions of Makefiles... no updating cache ./config.cache creating... (0 Replies)
Discussion started by: mobydick
0 Replies

7. Solaris

Install GCC on Solaris 8

Hi, I tried to install apache web server on solaris 8 and was prompted that i do not have any valid compiler. I tried to install GCC on solaris 8 using the command #pkgadd -d gcc-2.95.2-sol17-sparc-local (hit enter). May I know how I should set the environment variables to make it work... (1 Reply)
Discussion started by: sagolo
1 Replies

8. UNIX for Advanced & Expert Users

gcc installation in solaris 8

Hi, I am having trouble installing gcc 3.4.2-sol8-sparc-local in my sparc machine running solaris 8. It looks like I do not have enough memory in /var , but I have about 3GB free memory in /export/home. I have read some suggestion from previous threads that said it is possible to link /var and... (8 Replies)
Discussion started by: prosper
8 Replies

9. Programming

GCC (solaris)

I packed gcc to /usr/local/ with pkgadd and when I wan't to compile a c code file it says gcc: no file how do I configure gcc on Solaris 8 plz help (1 Reply)
Discussion started by: CreamHarry
1 Replies

10. Programming

gcc for solaris 2.6

Hi Friends, Is there any website that I can download gcc for solaris 2.6? thanks jen (9 Replies)
Discussion started by: jennifer
9 Replies
Login or Register to Ask a Question