pgCC install, Fedora Core 3, dual Opteron

The ./install script didn’t work well on Fedora Core 3 on a dual Opteron. I manually edited localrc as follows:

]$ cat /usr/pgi/linux86-64/5.2/bin/localrc
set LFC=-lg2c;
set LDSO=/lib64/ld-linux-x86-64.so.2;
set GCCDIR=/usr/lib/gcc/x86_64-redhat-linux/3.4.2;
set GCCINC=/usr/lib/gcc/x86_64-redhat-linux/3.4.2/include;
set G77DIR=/usr/lib/gcc/x86_64-redhat-linux/3.4.2;
set THROW=__THROW=;

makelocalrc executed by root Tue Jan 25 17:48:23



And this gets pgcc, pgf77, and pgf90 compiling “hello world” but pgCC fails.

$ uname -a
Linux test-net.stanford.edu 2.6.10-1.741_FC3smp #1 SMP Thu Jan 13 16:58:29 EST 2005 x86_64 x86_64 x86_64 GNU/Linux


$ rpm -qi glibc | head -2
Name : glibc Relocations: (not relocatable)
Version : 2.3.4 Vendor: Red Hat, Inc.


$ env | grep pgi
PATH=/usr/pgi/linux86-64/5.2/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
PGI=/usr/pgi
MANPATH=/usr/pgi/linux86-64/5.2/man
LM_LICENSE_FILE=/usr/pgi/license.dat

$ cat hello.cc
#include

int main() {
std::cout << “hello world\n”;
return -1;
}

$ g++ hello.cc
$ ./a.out
hello world


$ pgCC hello.cc
“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
^
detected during instantiation of class “std::_Integer_limits<_Int,
__imin, __imax, __idigits, __ismod> [with _Int=bool,
__imin=false, __imax=true, __idigits=1, __ismod=false]” at
line 245

“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 252: error:
identifier “SCHAR_MAX” is undefined
: public _Integer_limits<char, CHAR_MIN, CHAR_MAX, -1, true>
^

“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
^
detected during instantiation of class “std::_Integer_limits<_Int,
__imin, __imax, __idigits, __ismod> [with _Int=char,
__imin=, __imax=,
__idigits=-1, __ismod=true]” at line 252

“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
^
detected during instantiation of class “std::_Integer_limits<_Int,
__imin, __imax, __idigits, __ismod> [with _Int=signed
char, __imin=, __imax=,
__idigits=-1, __ismod=true]” at line 258

“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
^
detected during instantiation of class “std::_Integer_limits<_Int,
__imin, __imax, __idigits, __ismod> [with _Int=unsigned
char, __imin=(unsigned char)’\000’,
__imax=, __idigits=-1, __ismod=true]” at
line 264

"/usr/pgi/linux86-64/5.2/include/CC/stl/limits.h", line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(Int) * (CHAR_BIT))) - ((imin == 0) ? 0 : 1))
^
pgCC-Fatal-/usr/pgi/linux86-64/5.2/bin/pgcpp1 TERMINATED by signal 11
Arguments to /usr/pgi/linux86-64/5.2/bin/pgcpp1
/usr/pgi/linux86-64/5.2/bin/pgcpp1 --llalign -Dunix -D__unix -D__unix
-Dlinux -D__linux -D__linux
-D__inline__= -D__NO_INLINE__ -D__NO_MATH_INLINES -D__x86_64__ -D__LONG_MAX__=9223372036854775807L ‘-D__SIZE_TYPE__=unsigned long int’ ‘-D__PTRDIFF_TYPE__=long int’ -D__THROW= -D__amd64__ -D__PGI -I/usr/pgi/linux86-64/5.2/include/CC -I/usr/pgi/linux86-64/5.2/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/3.4.2/include -I/usr/lib/gcc/x86_64-redhat-linux/3.4.2/include -I/usr/include -q -o /tmp/pgCCaaaaanoAau.il hello.cc

Er, nevermind. Just saw the Core 3 patch on the release notes page.

PGI releases 5.2-4 and earlier are not compatable with Fedora core 3. As you found out, we do have a patch which corrects these issues. The patch can be found at ftp://ftp.pgroup.com/x86/linux86-patches/fedora3_patch.tar.gz

Thanks,
Mat

Hmmm, I’m still getting an error, even after re-installing the compilers. Any ideas?

-Leif

\

$ cat hello.cc
#include

int main() {
std::cout << “hello world\n”;
return -1;
}


$ pgCC hello.cc
“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
^
detected during instantiation of class “std::_Integer_limits<_Int,
__imin, __imax, __idigits, __ismod> [with _Int=bool,
__imin=false, __imax=true, __idigits=1, __ismod=false]” at
line 245

“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 252: error:
identifier “SCHAR_MAX” is undefined
: public _Integer_limits<char, CHAR_MIN, CHAR_MAX, -1, true>
^

“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
^
detected during instantiation of class “std::_Integer_limits<_Int,
__imin, __imax, __idigits, __ismod> [with _Int=char,
__imin=, __imax=,
__idigits=-1, __ismod=true]” at line 252

“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
^
detected during instantiation of class “std::_Integer_limits<_Int,
__imin, __imax, __idigits, __ismod> [with _Int=signed
char, __imin=, __imax=,
__idigits=-1, __ismod=true]” at line 258

“/usr/pgi/linux86-64/5.2/include/CC/stl/_limits.h”, line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
^
detected during instantiation of class “std::_Integer_limits<_Int,
__imin, __imax, __idigits, __ismod> [with _Int=unsigned
char, __imin=(unsigned char)’\000’,
__imax=, __idigits=-1, __ismod=true]” at
line 264

"/usr/pgi/linux86-64/5.2/include/CC/stl/limits.h", line 155: error:
identifier “CHAR_BIT” is undefined
((int)((sizeof(Int) * (CHAR_BIT))) - ((imin == 0) ? 0 : 1))
^
pgCC-Fatal-/usr/pgi/linux86-64/5.2/bin/pgcpp1 TERMINATED by signal 11
Arguments to /usr/pgi/linux86-64/5.2/bin/pgcpp1
/usr/pgi/linux86-64/5.2/bin/pgcpp1 --llalign -Dunix -D__unix -D__unix
-Dlinux -D__linux -D__linux
-D__inline__= -D__NO_INLINE__ -D__NO_MATH_INLINES -D__x86_64__ -D__LONG_MAX__=9223372036854775807L ‘-D__SIZE_TYPE__=unsigned long int’ ‘-D__PTRDIFF_TYPE__=long int’ -D__THROW= -D__amd64__ -D__PGI -I/usr/pgi/linux86-64/5.2/include/CC -I/usr/pgi/linux86-64/5.2/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/3.4.2/include -I/usr/lib/gcc/x86_64-redhat-linux/3.4.2/include -I/usr/include -q -o /tmp/pgCCaaaaaikqae.il hello.cc
[lharcke@test-net ~]$

Hi Leif,

Double check that “limits.h”, “floats.h”, and “bits/types.h” were installed in “/usr/pgi/linux86-64/5.2/include”. You may need to copy them over from the install package. The “limits.h” file contains the definition of “CHAR_BIT” and “SCHAR_MAX”.

  • Mat

I don’t think the header files are the problem; see output of diff below.

-Leif


cd fedora3_patch/

ls

fedora3_patch.tar.gz limits_32.h makelocalrc_fedora3 types_bits.h
float.h limits_64.h README_FEDORA3 types_sys.h

diff limits_64.h /usr/pgi/linux86-64/5.2/include/limits.h

diff float.h /usr/pgi/linux86-64/5.2/include/float.h

diff types_bits.h /usr/pgi/linux86-64/5.2/include/bits/types.h

Hi Leif,

I just reinstalled the 5.2 compilers on our Fedora Core 3 64-bit system, along with the patch, and got your error. However, I noticed that I forgot the change the permissions so that the files were world readable. Once I made this change, everything worked. Perhaps the same thing is happening with your install? What are the permissions on the limits.h and floats.h?

  • Mat

Bingo. That did the trick. Note a new warning message attached below.

Any chance we could get an extension on the evaluation license, now that we have the trial version working? We only have 4 days left now… :-(

Leif Harcke
Radar Interferometry Group
Dept. of Electrical Engineering
Stanford Univ.


$ pgCC hello.cc
“/usr/pgi/linux86-64/5.2/include/float.h”, line 55: warning: last line of file
ends without a newline
#include_next<float.h>
^

“/usr/pgi/linux86-64/5.2/include/float.h”, line 55: warning: last line of file
ends without a newline
#include_next<float.h>
^

NOTE: your evaluation license will expire in 4 days, 2.08 hours.
Waiting for 9 seconds…
For a permanent license, please read the order acknowledgement
that you received. Connect to https://www.pgroup.com/License with
the username and password in the order acknowledgement.

Name: “Leif Harcke”
User: lharcke
Email: lharcke@
Hostid: PGI=000AE4E02A33422C7E5832

Hi Leif,

I asked our sales department to send you a 30 day temporary license. Sorry you had so much trouble. The good news is that the up coming 6.0 release does support Fedora Core 3.

Thanks,
Mat