Sponsored Content
Operating Systems Solaris gcc not working on Solaris 10 Post 302292901 by miltony123 on Monday 2nd of March 2009 12:34:37 AM
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..
 

10 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

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

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

10. 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
getusershell(3C)					   Standard C Library Functions 					  getusershell(3C)

NAME
getusershell, setusershell, endusershell - get legal user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the following locations of the standard system shells are used in its place: /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/pfsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh /usr/xpg4/bin/sh The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells. The setusershell() function rewinds the file or the list. The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells. RETURN VALUES
The getusershell() function returns a null pointer on EOF. BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved. SunOS 5.10 30 Aug 2004 getusershell(3C)
All times are GMT -4. The time now is 12:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy