Compiling 254.gap (SPECCPU 2000) with 6.2-3

[ Moved this over from the Debugging forum where it was posted by accident.]

I’m having trouble compiling the speccpu 2000 test case “254.gap” I’ve searched around the net for some suggestiong for portability flags, but none seem to work. From my config file… I’m using:

OPTIMIZE = -fastsse -Mipa=fast,inline

and

254.gap=default=default=default:
CPORTABILITY = -DSYS_IS_USG -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO -DSYS_HAS_SIGNAL_PROTO -DSYS_HAS_ANSI -DSYS_HAS_CALLOC_PROTO

I get this:

.
.
.
.
/opt/pgi/linux86/6.2/bin/pgcc -c -o string.o -DSYS_IS_USG -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO -DSYS_HAS_SIGNAL_PROTO -DSYS_HAS_ANSI -DSYS_HAS_CALLOC_PROTO -fastsse -Mipa=fast,inline string.c
15:03:56 (pgroupd) OUT: “pgcc-linux86” root@focal
15:03:56 (pgroupd) IN: “pgcc-linux86” root@focal
/opt/pgi/linux86/6.2/bin/pgcc -c -o system.o -DSYS_IS_USG -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO -DSYS_HAS_SIGNAL_PROTO -DSYS_HAS_ANSI -DSYS_HAS_CALLOC_PROTO -fastsse -Mipa=fast,inline system.c
15:03:56 (pgroupd) OUT: “pgcc-linux86” root@focal
15:03:56 (pgroupd) IN: “pgcc-linux86” root@focal
PGC-S-0137-Incompatible prototype declaration for function read (/usr/include/unistd.h: 312)
PGC-S-0137-Incompatible prototype declaration for function write (/usr/include/unistd.h: 318)
PGC-W-0136-Function getpid has non-prototype declaration in scope (/usr/include/unistd.h: 549)
PGC/x86 Linux/x86 6.2-3: compilation completed with severe errors
specmake: *** [system.o] Error 2
specmake options 2> options.err | tee options.out
COMP: /opt/pgi/linux86/6.2/bin/pgcc -c -o options.o -DSYS_IS_USG -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO -DSYS_HAS_SIGNAL_PROTO -DSYS_HAS_ANSI -DSYS_HAS_CALLOC_PROTO -fastsse -Mipa=fast,inline
LINK: /opt/pgi/linux86/6.2/bin/pgcc -fastsse -Mipa=fast,inline -lm -o options
Some files did not appear to be built: gap
*** Error building 254.gap

I’m on a dual Xeon running RHEL4 U3.

I see that it has issues with the PROTOs, but I’ve tried using some, none and a combination of the compatibility flags to no avail. Any suggestions?

-Rob

Hi Rob,

Try adding “-DSYS_HAS_READ_PROTO” to your define flags.

Thanks,
Mat