Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: gcc parse error on HPUX11.11

 
Trusted Contributor

gcc parse error on HPUX11.11

I have a very simple file to compile. It has just one line:
#include

I use the precompiled gcc from HPUX Porting Archive
gcc version 3.0.4
hppa2.0n-hp-hpux11.00

Im runing this gcc on a system with HPUX11.11(64bit).

Compiling this one line gives:
/usr/include/sys/socket.h:484: parse error before "sendfile"
/usr/include/sys/socket.h:484: parse error before "bsize_t"
/usr/include/sys/socket.h:486: parse error before "sendpath"
/usr/include/sys/socket.h:486: parse error before "bsize_t"

If i add a -I/usr/include option things compile without any error.
It seems that the sys/types.h which was fixed for the gcc 11.0 version (in /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.0.4/include) is broken for 11.11.

Seems to be a FAQ but found no solution so far. Most helpful (but also no solution) was
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xbbc9996c5988d5118ff10090279cd0f9,00.html

Any suggestions. Would i need a special fixed sys/types.h for HPUX11.11 or could it be save to just delete the fixed file and use the normal one (which is /usr/include/sys/types.h)?

Hartmut
4 REPLIES 4
Trusted Contributor

Re: gcc parse error on HPUX11.11

What i found out is, that i really need a hpux11.11 version (hppa1.1-hp-hpux11.11) of gcc 3.0.4 to compile code on hpux11.11. The hpux11.0 version of the gcc can fail with parse errors, because some headers files seems to be incompatible between hpux11.0 and 11.11.

Now the problem is how to build the hppa1.1-hp-hpux11.11 version. I only have the precompiled hppa2.0n-hp-hpux11.00 version from the HPUX Porting archive.
Using it the build of gcc will fail with parse error around size_t in file libiberty/floatformat.c

So i compiled this file adding a -I/usr/include option by hand. Now the rest of the build works without any problems.

The newly build gcc is a "gcc version 3.0.4 Configured with: ./configure --host=hppa1.1-hp-hpux11.11".
Using this gcc my socket.h parse error problem is solved.

Another way propably would have been to download the precompiled hpux11.11 version of gcc 3.0.2 from HP developer portal:
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html
(But i prefer the /opt/gcc installations from the HPUX Porting and Archive Centre:
http://hpux.cs.utah.edu/)

Any further comments on this are very welcome!
Hartmut

Re: gcc parse error on HPUX11.11

Hi Hartmut,

have you tried the "official" gcc from HP? It's located in the Linux Porting Kit. Originally designed for porting programs from linux to HP-UX. You will find here any userfull linux tool like bash, tcpwrapper ...

Look at http://devresource.hp.com/LPK/
Trusted Contributor

Re: gcc parse error on HPUX11.11

Frank,

thanks, i will look into it!
Hartmut
New Member

Re: gcc parse error on HPUX11.11

I was trying to compile Tobi Oetikers Rrdtool (http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/) and had a similar Problem using the 11.00 Version on 11i from the Porting Archive:

/usr/include/sys/socket.h:484: syntax error before "sendfile"
/usr/include/sys/socket.h:485: syntax error before "bsize_t"
/usr/include/sys/socket.h:486: syntax error before "sendpath"
/usr/include/sys/socket.h:487: syntax error before "bsize_t"
...

The 11i Version from the Linux Porting Kit taken from the above link worked perfectly for me.

Thanks a lot.

Regards Michael