PGI #include_next problem

I tried to compile a C++ program using C++11 standard.
I used the workaround mentioned in this post:
https://forums.developer.nvidia.com/t/c-11-header-files/134398/1

Now i get a new error:

  • /include/bits/c++config.h", line 22: catastrophic error #1696:
    cannot open source file “bits/c++config.h”
    #include_next <bits/c++config.h>

I am using PGI 15.1, but this also happens with PGI 14.10.

Thanks
Marco

Hi Marco,

“bits/c++config.h” should be included with the GNU include files: " <gnu_install_dir>/include/c++/4.8.3/x86_64-redhat-linux/bits/c++config.h"

When I created my “.mypgcpprc” file, makelocalrc added the path to this include directory in the rcfile “GPPDIR64” and “GPPDIR32” variables. Can you check if these contain the correct values?

How did you generate your “.mypgcpprc”? Are you compiling to target 32 or 64-bits? Which GNU and OS version are you using?

  • Mat

Hi Mat,

thank you for your reply.

The file ist there and the path to <gnu_install_dir>/include is set in “GPPDIR64” “GPPDIR32”.
Even setting the path explicit while compiling results in this error.

I used the ‘makelocalrc’ with -o option and copied the output to ‘.mypgcpprc’.

On our cluster are several GNU versions avaiable, for generating I used GNU 4.9.2. I think the OS is Scientific Linux 6.0, but i’m not sure.

Marco

Hi Marco,

I’ve tried recreating the problem here but the only way I could get it fail was to remove the “bit/c++config.h” file or change my “.mypgcpprc” file so it doesn’t include the correct paths.

Can you please double check that “.mypgcpprc” is getting used by the compiler? The file should be located in your home directory. You can verify that it’s being used by running “pgc++ -dryrun” and looking for the line "
Reading local rcfile ~/.mypgcpprc".

Other than that, the next step is have you send to PGI Customer Service (trs@pgroup.com) your “.mypgcpprc” file so we can see if there are any errors.

  • Mat

Hi Mat,

I solved this problem. The MPI compiler wrapper uses the pgcpp instead of the pgc++.

Now I’m in trouble to get pgc++ running with MPI.

Thank you for your help.

Marco