Dear all I have a problem when compiling with pgc++.
I have installed pgc++ 17.4-0 64-bit on Ubuntu 17.10. I have also GNU 4.8, 5.0 and 7.0 installed but I have selected GNU 5.0 (update alternatives) . When I am trying to compile a .cpp file I get the following errors:
pgc++ -c -o obj/vector_sum_cpu_openacc.o src/vector_sum_cpu.cpp -g -std=c++11
"/usr/include/x86_64-linux-gnu/bits/floatn.h", line 62: error: invalid argument
to attribute "__mode__"
typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
^
"/usr/include/x86_64-linux-gnu/bits/iscanonical.h", line 51: error: function
"iscanonical(long double)" has already been defined
inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
^
"/usr/include/math.h", line 505: error: function "issignaling(long double)" has
already been defined
inline int issignaling (_Float128 __val) { return __issignalingf128 (__val); }
^
3 errors detected in the compilation of "src/vector_sum_cpu.cpp".
This file was compiled with no error on another computer with Ubuntu 16.04.
Either post the source(s) and headers for the file that failed to
compile with Ubuntu 17.10, or send them to trs@pgroup.com
and we will determine if they still fail on current releases and the
upcoming PGI 17.10 professional and community releases.
It’s always a risk to install the newest Linux and GNU versions,
and then expect a 6-month old PGI release to work with them.
Linux and GNU love to change things.
I get the following error
“/usr/include/x86_64-linux-gnu/bits/floatn.h”, line 62: error: invalid argument
to attribute “mode”
typedef _Complex float __cfloat128 attribute ((mode (TC)));
Hello Dave,
I’m experiencing the same issue.
I have also installed Ubuntu 17.10 and installed the pgi community edition 17.10. and getting the same errors. The code worked in Ubuntu 17.04.
In another post (pgc++ 17.10 has trouble with glibc 2.26) you tell that it is the gcc version that mostly creates incompatibilities. So, is there any hope of making pgi work changing the gcc version using “update-alternatives”? If so, what should I do?
Edit: I have installed gcc-5 and changed using “update-alternatives” but I’m still getting the error.
The script makelocalrc creates the localrc file which handles
the local differences, like where gcc is, where the libs are, which headers PGI should use, etc.
It does not work well with gcc versions that are not default.
If you retrofit an older gcc version, look at what
gcc -v -o hello_gcc hello.c
puts out for your new compiler, and what
pgcc -v -o hello_pgi hello.c
puts out, along with
pgcc -dryrun -o hello_pgi hello.c
and determine what is different between them, and edit
the localrc file.so the same headers, assembler, linker used
by the new gcc is also used by pgcc when using integrated gcc headers and libs.