[R] cannot compile R on Cray XE6 HLRS HERMIT

Martin Ivanov tramni at abv.bg
Mon Apr 29 15:31:36 CEST 2013


 Dear All,

I am trying to compile R-3.0 on Cray xe6 (HLRS) HERMIT, no success so far.
Here is my experience:

I use this to configure and make R:

CC="cc" \
CXX="CC" \
F77="ftn" \
FC="ftn" \
CPPFLAGS="-I$PREFIX/include" \
LDFLAGS="-L$PREFIX/lib${LIBDIRSUFFIX}" \
./configure --prefix=$PREFIX \
--exec-prefix=$PREFIX \
--bindir=$PREFIX/bin \
--sbindir=$PREFIX/sbin \
--sysconfdir=$PKG/etc \
--localstatedir=$PKG/var \
--libdir=$PREFIX/lib${LIBDIRSUFFIX} \
--datarootdir=$PREFIX/share \
--datadir=$PREFIX/share \
--infodir=$PREFIX/info \
--mandir=$PREFIX/man \
--docdir=$PREFIX/doc/$PRGNAM-$VERSION \
rdocdir=$PREFIX/doc/$PRGNAM-$VERSION \
rincludedir=$PREFIX/include \
rsharedir=$PREFIX/share \
--disable-BLAS-shlib \
--with-blas \
--with-lapack \
--without-x \
|| exit 1

make || exit 1

My environment is as follows:

  1) modules/3.2.6.7                         13) udreg/2.3.2-1.0401.5929.3.3.gem         25) configuration/1.0-1.0401.35391.1.2.gem
  2) xtpe-network-gemini                     14) ugni/4.0-1.0401.5928.9.5.gem            26) hosts/1.0-1.0401.35364.1.115.gem
  3) xtpe-interlagos                         15) pmi/4.0.1-1.0000.9421.73.3.gem          27) lbcd/2.1-1.0401.35360.1.2.gem
  4) cray-mpich2/5.6.4                       16) dmapp/3.2.1-1.0401.5983.4.5.gem         28) nodehealth/5.0-1.0401.38460.12.18.gem
  5) eswrap/1.0.9                            17) gni-headers/2.1-1.0401.5675.4.4.gem     29) pdsh/2.26-1.0401.37449.1.1.gem
  6) torque/2.5.9                            18) xpmem/0.1-2.0401.36790.4.3.gem          30) shared-root/1.0-1.0401.37253.3.50.gem
  7) moab/6.1.5.s1992                        19) job/1.5.5-0.1_2.0401.35380.1.10.gem     31) switch/1.0-1.0401.36779.2.72.gem
  8) system/ws_tools                         20) csa/3.0.0-1_2.0401.37452.4.50.gem       32) xe-sysroot/4.1.40
  9) system/hlrs-defaults                    21) dvs/1.8.6_0.9.0-1.0401.1401.1.120       33) atp/1.6.2
 10) xt-asyncpe/5.19                         22) rca/1.0.0-2.0401.38656.2.2.gem         
 11) gcc/4.7.2                               23) audit/1.0.0-1.0401.37969.2.32.gem     
 12) xt-libsci/12.0.01                       24) ccm/2.2.0-1.0401.37254.2.142

1. PrgEnv-gnu/4.1.40
checking for C libraries of cc -std=gnu99...  -L/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/lib64 -L/opt/cray/udreg/2.3.2-1.0401.5929.3.3.gem/lib64 -L/opt/cray/ugni/4.0-1.0401.5928.9.5.gem/lib64 -L/opt/cray/pmi/4.0.1-1.0000.9421.73.3.gem/lib64 -L/opt/cray/dmapp/3.2.1-1.0401.5983.4.5.gem/lib64 -L/opt/cray/xpmem/0.1-2.0401.36790.4.3.gem/lib64 -L/opt/cray/rca/1.0.0-2.0401.38656.2.2.gem/lib64 -L/opt/cray/mpt/5.6.4/gni/mpich2-gnu/47/lib -L/opt/cray/libsci/12.0.01/gnu/47/interlagos/lib -L/opt/cray/xe-sysroot/4.1.40/usr/lib64 -L/opt/cray/xe-sysroot/4.1.40/lib64 -L/opt/cray/xe-sysroot/4.1.40/usr/lib/alps -L/usr/lib/alps -L/opt/gcc/4.7.2/snos/lib/gcc/x86_64-suse-linux/4.7.2 -L/opt/gcc/4.7.2/snos/lib/gcc/x86_64-suse-linux/4.7.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/gcc/4.7.2/snos/lib/gcc/x86_64-suse-linux/4.7.2/../../.. -lrca -L/opt/cray/atp/1.6.2/lib/ -lAtpSigHCommData -lAtpSigHandler -lgfortran -lscicpp_gnu -lsci_gnu_mp -lstdc++ -lmpich_gnu_47 -lmpl -lrt 
 -lxpmem -ldmapp -lugni -lpmi -lalpslli -lalpsutil -ludreg -lpthread -lm -lgomp -lgcc_eh
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking whether ftn appends underscores to external names... yes
checking whether ftn appends extra underscores to external names... no
checking whether mixed C/Fortran code can be run... yes
checking whether ftn and cc -std=gnu99 agree on int and double... configure: WARNING: ftn and cc -std=gnu99 disagree on int and double
configure: error: Maybe change CFLAGS or FFLAGS?

2. PrgEnv-gnu/4.1.40 + craype-target-native

R is now configured for x86_64-unknown-linux-gnu

  Source directory:          .
  Installation directory:    /univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr

  C compiler:                cc -std=gnu99  -g -O2
  Fortran 77 compiler:       gfortran  -g -O2

  C++ compiler:              CC  -g -O2
  Fortran 90/95 compiler:    ftn -g -O2
  Obj-C compiler:

  Interfaces supported:
  External libraries:        readline
  Additional capabilities:   JPEG
  Options enabled:           shared R library, shared BLAS, R profiling, memory profiling, strict barrier, static HTML

  Recommended packages:      yes

nmath/*.o` ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a ../extra/tre/libtre.a  ../extra/xz/liblzma.a  -L../../lib -lRblas -lgfortran -lm -lquadmath   -lreadline -lncurses  -lrt -ldl -lm
make[4]: Entering directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'
mkdir -p -- /univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/bin/exec
make[4]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'
make[3]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'
make[3]: Entering directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'
cc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I../../src/extra  -I../../src/extra/xz/api -I. -I../../src/include -I../../src/include -I/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/include -DHAVE_CONFIG_H   -fopenmp -fpic  -g -O2 -flto -c Rmain.c -o Rmain.o
cc -std=gnu99 -g -O2 -flto -Wl,--export-dynamic -fopenmp  -L/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/lib64 -o R.bin Rmain.o  -L../../lib -lR -lRblas
/usr/bin/ld: cannot find -lR
/usr/bin/ld: cannot find -lRblas
collect2: error: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[3]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src'
make: *** [R] Error 1





If I disable the build of shared libraries, I get this:



cc -std=gnu99 -O2 -fPIC -flto -Wl,--export-dynamic   -L/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/lib64 -o R.bin Rmain.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o   `ls ../unix/*.o .
 ./appl/*.o ../nmath/*.o` ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a ../extra/tre/libtre.a  ../extra/xz/liblzma.a   -lgfortran -lm -lquadmath   -lreadline -lncurses  -lrt -ldl -lm
../unix/dynload.o: In function `loadLibrary':
dynload.c:(.text+0x68): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
platform.o: In function `do_fileinfo':
platform.c:(.text+0x41cb): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/../lib64/libreadline.a(complete.o): In function `rl_username_completion_function':
/usr/src/packages/BUILD/readline-5.2/complete.c:1856: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/../lib64/libreadline.a(tilde.o): In function `tilde_expand_word':
/usr/src/packages/BUILD/readline-5.2/./tilde.c:390: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
platform.o: In function `do_fileinfo':
platform.c:(.text+0x419e): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/../lib64/libreadline.a(complete.o): In function `rl_username_completion_function':
/usr/src/packages/BUILD/readline-5.2/complete.c:1852: warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/src/packages/BUILD/readline-5.2/complete.c:1867: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
platform.o: In function `do_nsl':
platform.c:(.text+0x5fd8): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/../lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie
collect2: error: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[3]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src'
make: *** [R] Error 1


3. PrgEnv-cray/4.1.40

L/opt/cray/ugni/4.0-1.0401.5928.9.5.gem/lib64 -L/opt/cray/pmi/4.0.1-1.0000.9421.73.3.gem/lib64 -L/opt/cray/dmapp/3.2.1-1.0401.5983.4.5.gem/lib64 -L/opt/cray/xpmem/0.1-2.0401.36790.4.3.gem/lib64 -L/opt/cray/rca/1.0.0-2.0401.38656.2.2.gem/lib64 -lrca -L/opt/cray/atp/1.6.2/lib/ -lAtpSigHCommData -lAtpSigHandler -L/opt/cray/cce/8.1.7/craylibs/x86-64 -L/opt/gcc/4.4.4/snos/lib64 -L/opt/cray/mpt/5.6.4/gni/mpich2-cray/74/lib -L/opt/cray/libsci/12.0.01/cray/74/interlagos/lib -lscicpp_cray -lsci_cray_mp -lmpichf90_cray -lmpich_cray -lmpl -lxpmem -ldmapp -lpmi -lugni -lalpslli -lalpsutil -ludreg -L/opt/cray/xe-sysroot/4.1.40/usr/lib64 -L/opt/cray/xe-sysroot/4.1.40/lib64 -L/opt/cray/xe-sysroot/4.1.40/usr/lib/alps -L/usr/lib/alps -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4 -L/opt/cray/cce/8.1.7/cray-binutils/x86_64-unknown-linux-gnu/lib -L//usr/lib64 -lpgas-dmapp -lu -ldl -lfi -lstdc++ /opt/cray/cce/8.1.7/craylibs/x86-64/libmodules.a /opt/cray/cce/8.1.7/craylibs/x86-64/libomp.a 
 /opt/cray/cce/8.1.7/craylibs/x86-64/libopenacc.a -lf -lmodules -lcraymath -lgfortran -lquadmath -lcraymp -lcsup -lrt -ltcmalloc_minimal -lpthread -lm
checking how to get verbose linking output from cc... -v
checking for C libraries of cc...  -lhugetlbfs -L/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/lib64 -L/opt/cray/udreg/2.3.2-1.0401.5929.3.3.gem/lib64 -L/opt/cray/ugni/4.0-1.0401.5928.9.5.gem/lib64 -L/opt/cray/pmi/4.0.1-1.0000.9421.73.3.gem/lib64 -L/opt/cray/dmapp/3.2.1-1.0401.5983.4.5.gem/lib64 -L/opt/cray/xpmem/0.1-2.0401.36790.4.3.gem/lib64 -L/opt/cray/rca/1.0.0-2.0401.38656.2.2.gem/lib64 -lrca -L/opt/cray/atp/1.6.2/lib/ -lAtpSigHCommData -lAtpSigHandler -L/opt/cray/cce/8.1.7/CC/x86-64/lib/x86-64 -L/opt/cray/cce/8.1.7/craylibs/x86-64 -L/opt/gcc/4.4.4/snos/lib64 -L/opt/cray/mpt/5.6.4/gni/mpich2-cray/74/lib -L/opt/cray/libsci/12.0.01/cray/74/interlagos/lib -lscicpp_cray -lsci_cray_mp -lmpich_cray -lmpl -lxpmem -ldmapp -lpmi -lugni -lalpslli -lalpsutil -ludreg -L/opt/cray/xe-sysroot/4.1.40/usr/lib64 -L/opt/cray/xe-sysroot/4.1.40/lib64 -L/opt/cray/xe-sysroot/4.1.40/usr/lib/alps -L/usr/lib/alps -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4 -L/opt/cray/cce/8.1.7/cray
 -binutils/x86_64-unknown-linux-gnu/lib -L//usr/lib64 -lpgas-dmapp -lu -ldl -lfi -lstdc++ -lgcc_eh -lf -lmodules -lcraymath -lgfortran -lquadmath -lcraymp -lcsup -lrt -ltcmalloc_minimal -lpthread -lm
checking for dummy main to link with Fortran 77 libraries... unknown
configure: error: in `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details
Done compiling and installing packages.


4.PrgEnv-cray/4.1.40 + craype-target-native
checking for Fortran 77 libraries of ftn...  -lhugetlbfs -L/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/lib64 -L/opt/cray/udreg/2.3.2-1.0401.5929.3.3.gem/lib64 -L/opt/cray/ugni/4.0-1.0401.5928.9.5.gem/lib64 -L/opt/cray/pmi/4.0.1-1.0000.9421.73.3.gem/lib64 -L/opt/cray/dmapp/3.2.1-1.0401.5983.4.5.gem/lib64 -L/opt/cray/xpmem/0.1-2.0401.36790.4.3.gem/lib64 -L/opt/cray/rca/1.0.0-2.0401.38656.2.2.gem/lib64 -lrca -L/opt/cray/atp/1.6.2/lib/ -lAtpSigHCommData -lAtpSigHandler -L/opt/cray/cce/8.1.7/craylibs/x86-64 -L/opt/gcc/4.4.4/snos/lib64 -L/opt/cray/mpt/5.6.4/gni/mpich2-cray/74/lib -L/usr/lib/alps -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4 -L/opt/cray/cce/8.1.7/cray-binutils/x86_64-unknown-linux-gnu/lib -L//usr/lib64 -lpgas-dmapp -lxpmem -lu -ldmapp -lugni -lpmi -ludreg -lalpslli -lalpsutil -ldl -lfi -lstdc++ /opt/cray/cce/8.1.7/craylibs/x86-64/libmodules.a /opt/cray/cce/8.1.7/craylibs/x86-64/libomp.a /opt/cray/cce/8.1.7/craylibs/x86-64/libopenacc.a -lf -lmodules -lc
 raymath -lgfortran -lquadmath -lcraymp -lcsup -lrt -ltcmalloc_minimal -lpthread -lm
checking how to get verbose linking output from cc... -v
checking for C libraries of cc...  -lhugetlbfs -L/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/system/usr/lib64 -L/opt/cray/udreg/2.3.2-1.0401.5929.3.3.gem/lib64 -L/opt/cray/ugni/4.0-1.0401.5928.9.5.gem/lib64 -L/opt/cray/pmi/4.0.1-1.0000.9421.73.3.gem/lib64 -L/opt/cray/dmapp/3.2.1-1.0401.5983.4.5.gem/lib64 -L/opt/cray/xpmem/0.1-2.0401.36790.4.3.gem/lib64 -L/opt/cray/rca/1.0.0-2.0401.38656.2.2.gem/lib64 -lrca -L/opt/cray/atp/1.6.2/lib/ -lAtpSigHCommData -lAtpSigHandler -L/opt/cray/cce/8.1.7/CC/x86-64/lib/x86-64 -L/opt/cray/cce/8.1.7/craylibs/x86-64 -L/opt/gcc/4.4.4/snos/lib64 -L/opt/cray/mpt/5.6.4/gni/mpich2-cray/74/lib -L/usr/lib/alps -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4 -L/opt/cray/cce/8.1.7/cray-binutils/x86_64-unknown-linux-gnu/lib -L//usr/lib64 -lpgas-dmapp -lxpmem -lu -ldmapp -lugni -lpmi -ludreg -lalpslli -lalpsutil -ldl -lfi -lstdc++ -lgcc_eh -lf -lmodules -lcraymath -lgfortran -lquadmath -lcraymp -lcsup -lrt -ltcmalloc_minimal -lpthread -lm
checking for dummy main to link with Fortran 77 libraries... unknown
configure: error: in `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details

I also tried building R-2.15.2 following this thread: http://www.hector.ac.uk/support/documentation/software/R/rcompilation_phase3.php, but again with no success:

platform.c:(.text+0x5fd8): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/../lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie
collect2: error: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[3]: Leaving directory `/univ_2/ws3/ws/ipmiva-WRF_331_CORDEX-0/build/tmp/R-3.0.0/src/main'

Any suggestions will be appreciated. I am completely out of ideas now.

Best regards,

Martin



More information about the R-help mailing list