Joined: 14 Nov 2012
|Posted: Tue Nov 20, 2012 2:03 pm Post subject: can't compile on Arch Linux installation
|Trying to compile acc_c3.c from /opt/pgi/linux86-64/12.10/etc/samples/openacc/ gives
|pgcc -o acc_c3.uni acc_c3.c -acc -ta=nvidia,host -Minfo=acc,uni -fast
PGC-S-0040-Illegal use of symbol, __syscall_slong_t (/usr/include/time.h: 123)
PGC-W-0156-Type not specified, 'int' assumed (/usr/include/time.h: 123)
PGC/x86-64 Linux 12.10-0: compilation completed with severe errors
make: *** [acc_c3.uni] Error 2
Is this doomed to fail, or am I making a newbie error?
Installed gcc is 4.7.2, glibc says version 2.16.
I also have gcc 4.4.6 installed, which CUDA needs.
EDIT: I can see where the problem is cropping up. <sys/time.h> eventually includes <bits/types.h>, but instead of this coming from /usr/include, it picks up the PGI version from /opt/pgi/linux86-64/12.10/include. Later, when it includes <time.h> (does come from /usr/include), that time.h is not compatible with the PGI bits/types.h.
EDIT: I tried "makelocalrc" with "-gcc gcc-4.4 -g++ g++-4.4", but this did not seem to help. BTW, there is an error on line 261 of makelocalrc:
| -g++ ) shift; g++="$1" ;; |
should change "g++=" to "gpp=", or it will fail anytime someone uses the -g++ option.