Can't find include file stddef.h

I am attempting to use PGI Workstation 5.2 on a dual operton system running Fedora Core 3 x86_64. I am using an evaluation license created by the install program.

I installed the program in “/tmp/usr/pgi”. I get this message when I attmpt to compile a hello world program----

[root@ionic pgroup]# export PGI=/tmp/usr/pgi/
[root@ionic pgroup]# export LM_LICENSE_FILE=/tmp/usr/pgi/license.dat
[root@ionic bin]# ./pgcc test.c
PGC-F-0206-Can’t find include file stddef.h (/usr//include/stdio.h: 34)
PGC/x86-64 Linux/x86-64 5.2-4: compilation aborted

test.c contents —
#include <stdio.h>
{for(;;){printf (“Hello World!\n”);}}

I read the release notes and noticed that there were issues with FC3, so I downloaded fedora3_patch.tar.gz and reinstalled, following the instructions inside. I still get the same error (can’t find include file stddef.h)

I tried to manually tell pgcc the include directories that hold stddef.h as well as the types and bits mentioned in the FC3 patch notes----------

[root@ionic bin]# ./pgcc test.c -I/tmp/usr/pgi/linux86-64/5.2/include/ -I/tmp/usr/pgi/linux86-64/5.2/include/CC -I/tmp/usr/pgi/linux86-64/5.2/include/bits/ -I/tmp/usr/pgi/linux86-64/5.2/include/sys/
PGC-F-0206-Can’t find include file stddef.h (/tmp/usr/pgi/linux86-64/5.2/include/CC/stddef.h: 28)
PGC/x86-64 Linux/x86-64 5.2-4: compilation aborted

----------but I get a very similar error

My system was installed using the “install” script in linux86-64.tar.gz. I have similar systems running FC2 and PGI 5.2 that do not have this problem so it seems like there is still some problem with FC3 that I may have missed.

-Patrick Neely

Hi Patrick,

When you reinstalled, the makelocalrc script either didn’t get run or errored. Try going to the bin directory and running the command by hand.

makelocalrc -x /tmp/usr/pgi/linux86-64/5.2

The resulting localrc file should look something like this:

cat bin/localrc
set LFC=-lg2c;
set LDSO=/lib64/;
set GCCDIR=/usr/lib/gcc/x86_64-redhat-linux/3.4.2;
set GCCINC=/usr/lib/gcc/x86_64-redhat-linux/3.4.2/include;
set G77DIR=/usr/lib/gcc/x86_64-redhat-linux/3.4.2;

The stddef.h header file is located in /usr/lib/gcc/x86_64-redhat-linux/3.4.2/include so if the “GCCINC” directory is not set correctly, it wont be able to find the file.

  • Mat

Thanks for the help.

I ended up just starting from scratch, following the instructions specific for FC3 and installing again. I had better luck this time, so I probably made some mistake involving the makelocalrc file.

Thanks again