[Rd] compile R with Portland Group compiler
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Aug 25 08:48:26 CEST 2005
Let us be clear: some things in config.log are designed to fail, so only
unexpected errors are a cause to look there. The regex.c warnings are
it seems from an over-zealous compiler.
The problems here seem to be the unknown use of .lo (which it seems to
have coped with) and a problem in the PG's own libc, which it seems cannot
be used in a shared object. That issue discussed in the R-admin manual,
and seems something you do need to take up with PG. The crucial part is
> /usr/bin/ld: /usr/pgi/linux86-64/6.0/lib/libpgc.a(fastmath.o): relocation
> R_X86_64_PC32 against `__fvdlog' can not be used when making a shared object;
> recompile with -fPIC
which is asking you to recompile their static library. If you can't use a
dynamic library then this is fatal.
On Wed, 24 Aug 2005, Jennifer Lai wrote:
> I downloaded R-devel and compiled it with pgcc. This time, instead of
> breaking in src/main, compilation breaks in src/modules with the following
> error messages.
>
> Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
> Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
> /usr/pgi/linux86-64/6.0/bin/pgcc -shared -L/usr/pgi/linux86-64/6.0/lib
> -L/usr/lib64 -o R_X11.so dataentry.lo devX11.lo rotated.lo rbitmap.lo -lSM
> -lICE -L/usr/X11R6/lib64 -lX11 -ljpeg -lpng -lz
> File with unknown suffix passed to linker: dataentry.lo
> File with unknown suffix passed to linker: devX11.lo
> File with unknown suffix passed to linker: rotated.lo
> File with unknown suffix passed to linker: rbitmap.lo
> /usr/bin/ld: /usr/pgi/linux86-64/6.0/lib/libpgc.a(fastmath.o): relocation
> R_X86_64_PC32 against `__fvdlog' can not be used when making a shared object;
> recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> make[4]: *** [R_X11.so] Error 2
> make[4]: Leaving directory `/home/cuser/R-devel/src/modules/X11'
> make[3]: *** [R] Error 2
> make[3]: Leaving directory `/home/cuser/R-devel/src/modules/X11'
> make[2]: *** [R] Error 1
> make[2]: Leaving directory `/home/cuser/R-devel/src/modules'
> make[1]: *** [R] Error 1
> make[1]: Leaving directory `/home/cuser/R-devel/src'
> make: *** [R] Error 1
>
> Though src/main directory compiled successfully, I do still get warning
> messages from src/main/regex.c compilation.
> PGC-W-0155-64-bit integral value truncated (/usr/include/wctype.h: 109)
> PGC-W-0155-64-bit integral value truncated (/usr/include/wctype.h: 110)
> PGC-W-0155-64-bit integral value truncated (/usr/include/wctype.h: 111)
> PGC-W-0155-64-bit integral value truncated (/usr/include/wctype.h: 112)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #5
> (regex.c: 3288)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 4464)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 4591)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 4635)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 4737)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 4792)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #4
> (regex.c: 4793)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 4861)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 4904)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument
#3
> (regex.c: 4954)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #4
> (regex.c: 4961)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 5057)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 5581)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 5596)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 5628)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 5641)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 5669)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 5858)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 6230)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #6
> (regex.c: 7035)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 7803)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #2
> (regex.c: 7814)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #3
> (regex.c: 7826)
> PGC-W-0155-Long value is passed to a nonprototyped function - argument #7
> (regex.c: 10722)
> PGC/x86-64 Linux/x86-64 6.0-5: compilation completed with warnings
>
>
> One last thing that I notice is the errors messages in config.log. Should I
> consult these error messages with Portland Group, or R-devel can help me out
> on this?
>
> Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
> Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
> PGC-S-0040-Illegal use of symbol, choke (conftest.c: 21)
> PGC/x86-64 Linux/x86-64 6.0-5: compilation completed with severe errors
> configure:4222: $? = 2
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "R"
> | #define PACKAGE_TARNAME "R"
> | #define PACKAGE_VERSION "2.2.0"
> | #define PACKAGE_STRING "R 2.2.0"
> | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
> | #define PACKAGE "R"
> | #define VERSION "2.2.0"
> | #define R_PLATFORM "x86_64-unknown-linux-gnu"
> | #define R_CPU "x86_64"
> | #define R_VENDOR "unknown"
> | #define R_OS "linux-gnu"
> | #define Unix 1
> | /* end confdefs.h. */
> |
> | int
> | main ()
> | {
> | #ifndef __GNUC__
> | choke me
> | #endif
> |
> | ;
> | return 0;
> | }
>
> PGC-S-0035-Syntax error: Recovery attempted by replacing identifier me by ';'
> (conftest.c: 2)
> PGC-W-0057-Old-style declaration used; int assumed (conftest.c: 2)
> PGC/x86-64 Linux/x86-64 6.0-5: compilation completed with severe errors
> configure:4453: $? = 2
> configure: failed program was:
> | #ifndef __cplusplus
> | choke me
> | #endif
>
> PGFTN-S-0034-Syntax error at or near end of line (conftest.F: 3)
> 0 inform, 0 warnings, 1 severes, 0 fatal for main
> PGFTN/x86-64 Linux/x86-64 6.0-5: compilation completed with severe errors
> configure:5400: $? = 2
> configure: failed program was:
> | program main
> | #ifndef __GNUC__
> | choke me
> | #endif
> |
> | end
>
> configure:5665: /usr/pgi/linux86-64/6.0/bin/pgCC -c
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc >&5
> "conftest.cc", line 21: error: identifier "choke" is undefined
> choke me
> ^
>
> "conftest.cc", line 21: warning: variable "me" was declared but never
> referenced
> choke me
> ^
>
> 1 error detected in the compilation of "conftest.cc".
> configure:5671: $? = 2
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "R"
> | #define PACKAGE_TARNAME "R"
> | #define PACKAGE_VERSION "2.2.0"
> | #define PACKAGE_STRING "R 2.2.0"
> | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
> | #define PACKAGE "R"
> | #define VERSION "2.2.0"
> | #define R_PLATFORM "x86_64-unknown-linux-gnu"
> | #define R_CPU "x86_64"
> | #define R_VENDOR "unknown"
> | #define R_OS "linux-gnu"
> | #define Unix 1
> | /* end confdefs.h. */
> |
> | int
> | main ()
> | {
> | #ifndef __GNUC__
> | choke me
> | #endif
> |
> | ;
> | return 0;
> | }
>
> configure:5841: /usr/pgi/linux86-64/6.0/bin/pgCC -c -g
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc >&5
> "conftest.cc", line 20: error: identifier "exit" is undefined
> exit (42);
> ^
>
> 1 error detected in the compilation of "conftest.cc".
> configure:5847: $? = 2
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "R"
> | #define PACKAGE_TARNAME "R"
> | #define PACKAGE_VERSION "2.2.0"
> | #define PACKAGE_STRING "R 2.2.0"
> | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
> | #define PACKAGE "R"
> | #define VERSION "2.2.0"
> | #define R_PLATFORM "x86_64-unknown-linux-gnu"
> | #define R_CPU "x86_64"
> | #define R_VENDOR "unknown"
> | #define R_OS "linux-gnu"
> | #define Unix 1
> | /* end confdefs.h. */
> |
> | int
> | main ()
> | {
> | exit (42);
> | ;
> | return 0;
> | }
> configure:5796: /usr/pgi/linux86-64/6.0/bin/pgCC -c -g
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc >&5
> "conftest.cc", line 16: error: namespace "std" has no member "exit"
> extern "C" void std::exit (int) throw (); using std::exit;
> ^
>
> "conftest.cc", line 16: error: namespace "std" has no member "exit"
> extern "C" void std::exit (int) throw (); using std::exit;
> ^
>
> 2 errors detected in the compilation of "conftest.cc".
> configure:5802: $? = 2
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "R"
> | #define PACKAGE_TARNAME "R"
> | #define PACKAGE_VERSION "2.2.0"
> | #define PACKAGE_STRING "R 2.2.0"
> | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
> | #define PACKAGE "R"
> | #define VERSION "2.2.0"
> | #define R_PLATFORM "x86_64-unknown-linux-gnu"
> | #define R_CPU "x86_64"
> | #define R_VENDOR "unknown"
> | #define R_OS "linux-gnu"
> | #define Unix 1
> | /* end confdefs.h. */
> | extern "C" void std::exit (int) throw (); using std::exit;
> | #include <stdlib.h>
> | int
> | main ()
> | {
> | exit (42);
> | ;
> | return 0;
> | }
> configure:5796: /usr/pgi/linux86-64/6.0/bin/pgCC -c -g
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc >&5
> "conftest.cc", line 16: error: namespace "std" has no member "exit"
> extern "C" void std::exit (int); using std::exit;
> ^
>
> "conftest.cc", line 16: error: namespace "std" has no member "exit"
> extern "C" void std::exit (int); using std::exit;
> ^
>
> 2 errors detected in the compilation of "conftest.cc".
> configure:5802: $? = 2
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "R"
> | #define PACKAGE_TARNAME "R"
> | #define PACKAGE_VERSION "2.2.0"
> | #define PACKAGE_STRING "R 2.2.0"
> | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
> | #define PACKAGE "R"
> | #define VERSION "2.2.0"
> | #define R_PLATFORM "x86_64-unknown-linux-gnu"
> | #define R_CPU "x86_64"
> | #define R_VENDOR "unknown"
> | #define R_OS "linux-gnu"
> | #define Unix 1
> | /* end confdefs.h. */
> | extern "C" void std::exit (int); using std::exit;
> | #include <stdlib.h>
> | int
> | main ()
> | {
> | exit (42);
> | ;
> | return 0;
> | }
> configure:5796: /usr/pgi/linux86-64/6.0/bin/pgCC -c -g
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc >&5
> "/usr/include/stdlib.h", line 640: error: omission of exception specification
> is incompatible with previous function "exit" (declared at line 16
> of "conftest.cc")
> extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
> ^
>
> 1 error detected in the compilation of "conftest.cc".
> configure:5802: $? = 2
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "R"
> | #define PACKAGE_TARNAME "R"
> | #define PACKAGE_VERSION "2.2.0"
> | #define PACKAGE_STRING "R 2.2.0"
> | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
> | #define PACKAGE "R"
> | #define VERSION "2.2.0"
> | #define R_PLATFORM "x86_64-unknown-linux-gnu"
> | #define R_CPU "x86_64"
> | #define R_VENDOR "unknown"
> | #define R_OS "linux-gnu"
> | #define Unix 1
> | /* end confdefs.h. */
> | extern "C" void exit (int) throw ();
> | #include <stdlib.h>
> | int
> | main ()
> | {
> | exit (42);
> | ;
> | return 0;
> | }
> configure:5796: /usr/pgi/linux86-64/6.0/bin/pgCC -c -g
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc >&5
> NOTE: your evaluation license will expire in 14 days, 5.7 hours.
> 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: lai
> User: lai
> Email: lai at lindaspaces.com
> Hostid: PGI=00001AE0193111621CB217
> configure:5802: $? = 0
> configure:5806: test -z
> || test ! -s conftest.err
> configure:5809: $? = 0
> configure:5812: test -s conftest.o
> configure:5815: $? = 0
> configure:5841: /usr/pgi/linux86-64/6.0/bin/pgCC -c -g
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc >&5
> NOTE: your evaluation license will expire in 14 days, 5.7 hours.
> 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: lai
> User: lai
> Email: lai at lindaspaces.com
> Hostid: PGI=00001AE0193111621CB217
> configure:5847: $? = 0
> configure:5851: test -z
> || test ! -s conftest.err
> configure:5854: $? = 0
> configure:5857: test -s conftest.o
> configure:5860: $? = 0
> configure:5888: checking how to run the C++ preprocessor
> configure:5919: /usr/pgi/linux86-64/6.0/bin/pgCC -E
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc
> configure:5925: $? = 0
> configure:5957: /usr/pgi/linux86-64/6.0/bin/pgCC -E
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc
> "conftest.cc", line 19: catastrophic error: could not open source file
> "ac_nonexistent.h"
> #include <ac_nonexistent.h>
> ^
>
> 1 catastrophic error detected in the compilation of "conftest.cc".
> Compilation terminated.
> configure:5963: $? = 2
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "R"
> | #define PACKAGE_TARNAME "R"
> | #define PACKAGE_VERSION "2.2.0"
> | #define PACKAGE_STRING "R 2.2.0"
> | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
> | #define PACKAGE "R"
> | #define VERSION "2.2.0"
> | #define R_PLATFORM "x86_64-unknown-linux-gnu"
> | #define R_CPU "x86_64"
> | #define R_VENDOR "unknown"
> | #define R_OS "linux-gnu"
> | #define Unix 1
> | #ifdef __cplusplus
> | extern "C" void exit (int);
> | #endif
> | /* end confdefs.h. */
> | #include <ac_nonexistent.h>
> configure:6002: result: /usr/pgi/linux86-64/6.0/bin/pgCC -E
> configure:6026: /usr/pgi/linux86-64/6.0/bin/pgCC -E
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc
> configure:6032: $? = 0
> configure:6064: /usr/pgi/linux86-64/6.0/bin/pgCC -E
> -I/usr/pgi/linux86-64/6.0/include -I/usr/pgi/linux86-64/6.0/include/CC
> conftest.cc
> "conftest.cc", line 19: catastrophic error: could not open source file
> "ac_nonexistent.h"
> #include <ac_nonexistent.h>
> ^
>
> 1 catastrophic error detected in the compilation of "conftest.cc".
> Compilation terminated.
> configure:6070: $? = 2
> configure: failed program was:
> | /* confdefs.h. */
> |
> | #define PACKAGE_NAME "R"
> | #define PACKAGE_TARNAME "R"
> | #define PACKAGE_VERSION "2.2.0"
> | #define PACKAGE_STRING "R 2.2.0"
> | #define PACKAGE_BUGREPORT "r-bugs at R-project.org"
> | #define PACKAGE "R"
> | #define VERSION "2.2.0"
> | #define R_PLATFORM "x86_64-unknown-linux-gnu"
> | #define R_CPU "x86_64"
> | #define R_VENDOR "unknown"
> | #define R_OS "linux-gnu"
> | #define Unix 1
> | #ifdef __cplusplus
> | extern "C" void exit (int);
> | #endif
> | /* end confdefs.h. */
> | #include <ac_nonexistent.h>
>
>
> Thank you in advance for your help!
>
> Sincerely,
> Jennifer
>
> Prof Brian Ripley wrote:
>
>> regex.c is not our code, but from glibc. Could you please try R-devel
>> instead, which has a later version of glibc. Since 2.1.1 is not longer
>> part of the developement, we cannot help with that, but we can help wih
>> R-devel.
>>
>> I see the later regex.c does use prototypes. But bitset is an integer
>> type, so that may be a compiler error.
>>
>> (It is on my list to try Intel and PG compilers on AMD64 as we have
>> licences, but not very high priority.)
>>
>>
>>
>
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list