PGCC problem: cannot find sys/cdefs.h file?

Am evaluating pgcc and pgfortran compilers right now for some radio astronomy data processing applications that were originally compiled in gfortran. Am seeing some impressive speed-ups in the fortran code, in the neighborhood of 20-30% or more!

However, I cannot seem to compile any .c prgrams, as I constantly get the error:
PGC-F-0206-Can’t find include file sys/cdefs.h (/opt/pgi/linux86-64/12.3/include/sys/cdefs.h: 16)
PGC/x86-64 Linux 12.3-0: compilation aborted

yet the precise file cdefs.h exists in the directory it complains about?

I have tried reinstalling the compilers using the included install script: no changes.

Please help! My trial license expires in 12 days, and I want to make a purchasing decision for my university department before then!
Thank you!!

Hi tfoster,

Am seeing some impressive speed-ups in the fortran code, in the neighborhood of 20-30% or more!

Excellent.

However, I cannot seem to compile any .c prgrams, as I constantly get the error:
PGC-F-0206-Can’t find include file sys/cdefs.h (/opt/pgi/linux86-64/12.3/include/sys/cdefs.h: 16)
PGC/x86-64 Linux 12.3-0: compilation aborted

In a few circumstances, PGI will ship our own version of system header files to work around GNU specific features put in the system header files. However, we will still reference the original system header file usually via a “#include_next” pragma. The error here is that compiler is unable to find the system’s cdefs.h file referenced in the PGI version.

Can you please check if the “/usr/include/sys/cdefs.h” exists and that you have read permissions on the file? Are you able to compile the C source file using gcc? What OS are you using?

My trial license expires in 12 days, and I want to make a purchasing decision for my university department before then!

If you need more time, send a note to PGI Sales (sales@pgroup.com) and they can extend the evaluation period.

  • Mat