[Rd] Compilation error for R 4.0.2
Prof Brian Ripley
r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Sat Jul 11 13:01:06 CEST 2020
On 11/07/2020 11:47, Kurt Hornik wrote:
>>>>>> Wim R Cardoen writes:
>
>> Hello,
>> I experienced a compiler error when I tried to compile the latest version
>> of R i.e. R4.0.2
>> making iosupport.d from iosupport.c
>> making lapack.d from lapack.c
>> making list.d from list.c
>> making localecharset.d from localecharset.c
>> grep.c(74): catastrophic error: cannot open source file "pcre2.h"
>> # include<pcre2.h>
>> (The pcre2.h header file is actually present!)
>
>
>> I used the following compiler flags:
>> # PCRE2:
>> # -----
>> setenv CC gcc
>> setenv CFLAGS " -O2 -fPIC "
>> ./configure --prefix=/uufs/chpc.utah.edu/sys/installdir/pcre2/10.35 \
>> --enable-pcre2-16 --enable-pcre2-32 --with-pic
>
>> module purge
>> module load intel/2019.5.281
>
>> # USe a modern version of curl & pcre2 (The current one on Centos 7 is TOO
>> old)
>> setenv CURLDIR "/uufs/chpc.utah.edu/sys/installdir/curl/7.65.3"
>> setenv PCRE2DIR "/uufs/chpc.utah.edu/sys/installdir/pcre2/10.35"
>
>> setenv PATH ${PCRE2DIR}/bin:$PATH
>
>> Setting Compiler & linker flags:
>> setenv CC icc
>> setenv CXX icpc
>> setenv F77 ifort
>> setenv FC ifort
>> setenv CFLAGS " -axCORE-AVX512,CORE-AVX2,AVX,SSE4.2 -O3 -qopenmp
>> -fp-model precise -fPIC -I${MKLROOT}/include -I${CURLDIR}/include
>> -I${PCRE2DIR}/include "
>
> What I guess you should do is
>
> /path/to/configure CPPFLAGS="-I${PCRE2DIR}/include ......"
> make
Or use a config.site file for all of these settings.
On some systems (including some Linux systems I have used and current
macOS), setting too much in the environment (usually caused by long
values) has caused software to malfunction, including to segfault so it
is ingrained in me to avoid it.
>> setenv CXXFLAGS " ${CFLAGS} "
>> setenv FFLAGS " ${CFLAGS} "
>> setenv FCFLAGS " ${CFLAGS} "
>> setenv LDFLAGS " -Wl,-rpath=${MKLROOT}/lib/intel64_lin
>> -L${MKLROOT}/lib/intel64_lin -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
>> -Wl,-rpath=/uufs/
>> chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin
>> -L/uufs/
>> chpc.utah.edu/sys/installdir/intel/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin
>> -liomp5 -lpthread -ldl -Wl,-rpath=${CURLDIR}/lib
>> -L${CURLDIR}/lib -lcurl
>> -Wl,-rpath=${PCRE2DIR}/lib -L${PCRE2DIR}/lib
>> -lpcre2-8 -lpcre2-posix "
>
>> ./configure --prefix=/uufs/chpc.utah.edu/sys/installdir/R/4.0.2i
>> --enable-R-profiling --enable-R-shlib --enable-memory-profiling
>> --enable-java --enable-shared=yes --with-blas="$LDFLAGS" --with-readline
>> --with-cairo --with-tcltk --with-libpng --with-jpeglib --with-libtiff
>> --with-ICU --with-pic --with-x --with-lapack --with-pcre2
>
>> I also appended the corresponding config.log:
It did not get through the filters.
>
>> Thank you,
>
>> Wim
--
Brian D. Ripley, ripley using stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
More information about the R-devel
mailing list