General
cancel
Showing results for 
Search instead for 
Did you mean: 

Compilation using gcc 3.3 on HP-UX Itanium fails

amarsimha
Occasional Visitor

Compilation using gcc 3.3 on HP-UX Itanium fails

We have a simple c code which includes “time.h” and “pthread.h”.

bash-3.2$ /usr/local/bin/gcc-3.3 -c a.c
In file included from /usr/include/time.h:12,
from a.c:3:
/usr/include/sys/_time.h:56: error: syntax error before "extern"
In file included from /usr/include/time.h:12,
from a.c:3:
/usr/include/sys/_time.h:173: error: parse error before "int"
In file included from a.c:3:
/usr/include/time.h:20: error: parse error before "_BEGIN_EXT_CDECL"
In file included from a.c:3:
/usr/include/time.h:59: error: syntax error before "extern"
In file included from a.c:4:
/usr/local/lib/gcc-lib/ia64-hp-hpux11.22/3.3/include/stdarg.h:105: error: syntax error before "typedef"
In file included from /usr/include/pthread.h:16,
from a.c:5:
/usr/include/sys/pthread.h:591: error: parse error before '*' token
/usr/include/sys/pthread.h:591: error: parse error before ')' token
/usr/include/sys/pthread.h:795: error: parse error before '*' token
2 REPLIES
Steven Schweda
Honored Contributor

Re: Compilation using gcc 3.3 on HP-UX Itanium fails

> [...] gcc 3.3 [...]

Not a very complete description of the
compiler, where you got it, how you installed
it, whether it ever worked, ...

> [...] HP-UX Itanium [...]

Not a very complete description of the
system.

> We have a simple c code [...]

Simple, but invisible.

Around here:

dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license

dyi # gcc -v
Using built-in specs.
Target: ia64-hp-hpux11.31
Configured with: ../gcc-4.3.3/configure
Thread model: posix
gcc version 4.3.3 (GCC)

(I built mine from the source.)

dyi # cat a.c
#include
#include

int main( void)
{
}

dyi # gcc -c a.c
dyi #

Knowing nothing, I'd guess that either your
system header files are corrupt (which seems
unlikely) or else there's something wrong
with your GCC installation.
Dennis Handly
Acclaimed Contributor

Re: Compilation using gcc 3.3 on HP-UX Itanium fails

Your GNU headers likely don't match the system headers.
You may try Steve's mkheaders from this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1156581