gcc 3.2.23 vs gcc 3.4.0 x86_64 interaction V5.2 pgCC

I am trying your 5.2 product on my opteron (redhat ES3.0-U1 X86_64) on my 100K lines
of C++ code. The Pathscale compiler bombed horribly :-), I thought I should try yours.
I have gcc 3.4.0 as my default Opteron compiler. I downloaded and installed the compiler into
/usr/local/pgi, but I cannot compiler anything. I get…
pgCC -o common/blist.o common/blist.cxx -c -D_REENTRANT -O2 -DOUTLINE -I/usr/X11R6/include -I./ -I./common/ -I./search/ -I./search/parser/ -I./lzma/ -I./support/ -I./clientserver/ -I./search/gui/
pgCC -o common/butilities.o common/butilities.cxx -c -D_REENTRANT -O2 -DOUTLINE -I/usr/X11R6/include -I./ -I./common/ -I./search/ -I./search/parser/ -I./lzma/ -I./support/ -I./clientserver/ -I./search/gui/
“”/usr/local/pgi/linux86-64/5.2/include/CC/config/stl_mycomp.h", line 58: catastrophic error:
could not open source file “float.h”
#include <float.h>
^

1 catastrophic error detected in the compilation of “common/butilities.cxx”.
Compilation terminated.
/usr/local/pgi/linux86-64/5.2/include/CCmake[1]: *** [common/butilities.o] Error 2
make[1]: *** Waiting for unfinished jobs…
/config/stl_mycomp.h", line 58: catastrophic error:
could not open source file “float.h”
#include <float.h>
^

1 catastrophic error detected in the compilation of “common/blist.cxx”.
Compilation terminated.
make[1]: *** [common/blist.o] Error 2
make[1]: Leaving directory `/raid0/berkley/sources’
make: *** [optim] Error 2

berkley@avalanche raid0/berkley/sources> locate float.h
/usr/share/doc/libvorbis-devel-1.0/vorbisfile/ov_read_float.html
/usr/share/gimp/1.2/help/C/filters/tex-to-float.html
/usr/share/gimp/1.2/help/C/image/select/float.html
/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/include/float.h
/usr/lib/gcc-lib/i386-redhat-linux7/2.96/include/float.h
/usr/lib/gcc/x86_64-unknown-linux-gnu/3.4.0/include/float.h
/usr/lib/gcc/x86_64-unknown-linux-gnu/3.4.0/install-tools/include/float.h
/usr/src/linux-2.4.21-9.EL/arch/arm/nwfpe/softfloat.h
/usr/src/linux-2.4.21-9.EL/arch/parisc/math-emu/cnv_float.h
/usr/src/linux-2.4.21-9.EL/arch/parisc/math-emu/dbl_float.h
/usr/src/linux-2.4.21-9.EL/arch/parisc/math-emu/float.h
/usr/src/linux-2.4.21-9.EL/arch/parisc/math-emu/sgl_float.h
/lib64/ssa/gcc-lib/x86_64-redhat-linux-gnu/3.5-tree-ssa/include/float.h
/opt/intel_cc_80/include/float.h
/ide/lib64/ssa/gcc-lib/x86_64-redhat-linux-gnu/3.5-tree-ssa/include/float.h

berkley@avalanche raid0/berkley/sources> echo $path
/usr/local/pgi/linux86-64/5.2/bin/ . /usr/local/bin /usr/local/mozilla /sbin /bin /usr/sbin /usr/X11/bin /opt/intel_cc_80/bin /opt/intel_idb_73/bin /usr/kerberos/bin /usr/local/bin /bin /usr/bin /usr/X11R6/bin

Got any ideas?

berkley

This is probably an installation issue. If you still have the unpacked tarfile
on your hard drive, find the directory linux86-64/5.2/include-gcc33 and
copy the float.h and limit.h files into $PGI/linux86-64/5.2/include , where
$PGI is your installation directory.

If that works, please let us know ASAP so we can get the installer fixed
for everyone else. Thanks.

John

I hacked the “install” script to show some progress…

Installing software into /usr/pgi (this may take some time).
#############################*** common/doc
#*** common/EXAMPLES
#*** common/LICENSE
#*** common/LICENSE.ACML
#*** common/LICENSE.STLport
#*** common/man
#*** common/TRIAL_LICENSE
#*** *** common/doc
#*** *** common/EXAMPLES
#*** *** common/LICENSE
#*** *** common/LICENSE.ACML
#*** *** common/LICENSE.STLport
#*** *** common/man
#*** *** common/TRIAL_LICENSE

dirname: too few arguments
Try dirname --help' for more information. basename: too few arguments Try basename --help’ for more information.
dirname: too few arguments
Try dirname --help' for more information. basename: too few arguments Try basename --help’ for more information.
dirname: too few arguments
Try dirname --help' for more information. dirname: too few arguments Try dirname --help’ for more information.
basename: too few arguments
Try basename --help' for more information. dirname: too few arguments Try dirname --help’ for more information.
basename: too few arguments
Try basename --help' for more information. dirname: too few arguments Try dirname --help’ for more information.

If you don’t already have permanent keys for this product/release, a
fifteen-day evaluation license can be created now.

Create an evaluation license? [y/n]

so something isn’t working right.

berkley

make[1]: Entering directory `/raid0/berkley/sources’
pgCC -o common/blist.o common/blist.cxx -c -D_REENTRANT -I /usr/pgi/linux86-64/5.2/include -O2 -DOUTLINE -I/usr/X11R6/include -I./ -I./common/ -I./search/ -I./search/parser/ -I./lzma/ -I./support/ -I./clientserver/ -I./search/gui/
pgCC -o common/butilities.o common/butilities.cxx -c -D_REENTRANT -I /usr/pgi/linux86-64/5.2/include -O2 -DOUTLINE -I/usr/X11R6/include -I./ -I./common/ -I./search/ -I./search/parser/ -I./lzma/ -I./support/ -I./clientserver/ -I./search/gui/
“/usr/pgi/linux86-64/5.2/include/float.h”, line 55: catastrophic error: could
not open source file “float.h”
#include_next<float.h>
^

1 catastrophic error detected in the compilation of “common/blist.cxx”.
Compilation terminated.
make[1]: *** [common/blist.o] Error 2
make[1]: *** Waiting for unfinished jobs…
“/usr/pgi/linux86-64/5.2/include/float.h”, line 55: catastrophic error: could
not open source file “float.h”
#include_next<float.h>
^

1 catastrophic error detected in the compilation of “common/butilities.cxx”.

something is really broken.

berkley

What’s your locarc file look like? localrc file is in $PGI/linux86-64/5.2/bin for 64-bit or $PGI/linux86/5.2/bin for 32-bit. It looks to me that the localrc contained incorrect information. If I am not wrong, in 3.4.0 the include files are in /usr/lib/… while in 3.3.3 (or other versions) include files are under /usr/lib64/… I have similar error but the problem disappears after editing the localrc to make sure it points to the correct directory.

From the information you gave:

Your localrc should at least have:
set GCCDIR=/usr/lib/gcc/x86_64-unknown-linux-gnu/3.4.0;
set GCCINC=/usr/lib/gcc/x86_64-unknown-linux-gnu/3.4.0/include;
set G77DIR=/usr/lib/gcc/x86_64-unknown-linux-gnu/3.4.0;

I had to get past the license errors (looking in ./license.dat, not $PGI/license.dat).
Now I have to figure out the compiler errors.

“common/CompilerDefs.hh”, line 291: error: the global scope has no
“pthread_yield”
::pthread_yield(); // let someone else run
^

1 error detected in the compilation of “common/butilities.cxx”.

“common/ByteSwapper.cxx”, line 54: error: “bad_alloc” is ambiguous
PGTHROWBADALLOC(1 + sizeout) size[0] = sizeout;
^
thanks for the help.

berkley

“common/DiskPipe.cxx”, line 352: error: incomplete type is not allowed
struct stat64 FileStatus;
^

“common/DiskPipe.cxx”, line 353: error: the global scope has no “fstat64”
int ret = ::fstat64(readFD_, &FileStatus);
^

“common/DiskPipe.cxx”, line 366: error: identifier “off64_t” is undefined
off64_t FileSize = FileStatus.st_size;
^

after lots of hunting for #ifdef I see that your compiler just gets
completely lost going through the /usr/include files.

“/usr/include/asm-x86_64/fcntl.h”, line 18: warning: incompatible redefinition
of macro “FASYNC” (declared at line 170 of
“/usr/include/bits/fcntl.h”)
#define FASYNC 020000 /* fcntl, for BSD compatibility */
^

“/usr/include/asm-x86_64/fcntl.h”, line 66: error: invalid redeclaration of
type name “flock” (declared at line 140 of
“/usr/include/bits/fcntl.h”)
struct flock {
^

“/usr/include/sys/wait.h”, line 112: error: identifier “__WAIT_STATUS” is
undefined
extern __pid_t wait (__WAIT_STATUS __stat_loc);

This just isn’t worth my time to get the #defines right in every file just to use
common things like ::open or O_DIRECT. Even SlowLaris 8.0 was a faster port than this.

Is there a #if defined(pgCC) or something similar your compiler gives me?

Berkley

Hi,

Please try __PGI (that’s two underscores followed by PGI)… that’s defined by pgCC.

-Mark