PGI compiler on FreeBSD

I’ve been trying to get the pgi c-compiler to run on FreeBSD, so far not quite succeful.

While I could edit the installation and makelocalrc scripts enough to complete, when I try to compile anything I get the below error messages.

PGC-S-0029-Syntax error: Recovery attempted by deleting from typedef id __aligned on line 104 to just before ';' on line 104 (/usr/include/sys/_types.h: 104)
PGC-S-0030-Syntax error: Malformed function or data declaration at ')' (/usr/include/sys/_types.h: 104)
PGC-S-0029-Syntax error: Recovery attempted by deleting from ')' on line 104 through '(' on line 105 (/usr/include/sys/_types.h)
PGC-S-0032-Syntax error: Unexpected input at ')' (/usr/include/sys/_types.h: 105)
PGC-S-0029-Syntax error: Recovery attempted by deleting from ')' on line 105 through '}' on line 106 (/usr/include/sys/_types.h)
PGC/x86-64 Linux 17.10-0: compilation completed with severe errors

I do realize this is not a supported platform, so not expecting official support, but was wondering if there were any other users around that had tried to get this running.

So far I’ve tried using the standard BSD-libc - maybe I should somehow use the linux-compat layer glibc.

Anyone with some experience here?
cheers
Erik

If the header file with the problem has lines like

If GNUC then do something correct
else fail

need to b modified to be

If GNUC || PGI then do something correct
else fail

and put the modified file _types.h into
$PGI/linux86-64/17.10/include/sys
so it will be read ahead of the other one.

Or you if you can just fix the PGI problem
and then INCLUDE_NEXT the real _types.h.

dave

dave

Thanks for the suggestion - just thought I’d post a status.

What I did was (exactly as you said) to put an edited version of _types.h in $PGI/linux86-64/17.10/include/sys, where I had changed the “__aligned” qualifier to “aligned”.

This got me a bit further - I now get the error:

/bin/ld: warning: libc.so.7, needed by /usr/lib/libgcc_s.so, may conflict with libc.so.6
/bin/ld: errno@@GLIBC_PRIVATE: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS definition in /lib/libc.so.7 section .bss
/lib/libc.so.7: could not read symbols: Bad value

Still working on the issue - will post again if I make any progress

cheers
Erik