Merge pull request #156 from gaborcsardi/fix/r-devel-compilers
This commit is contained in:
commit
012d50b99b
4 changed files with 19 additions and 7 deletions
|
|
@ -7,7 +7,8 @@ RUN set -x \
|
||||||
&& export DEBIAN_FRONTEND=noninteractive \
|
&& export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y curl libcurl4-openssl-dev libicu-dev libopenblas-base libpcre2-dev wget python-pip \
|
&& apt-get install -y curl libcurl4-openssl-dev libicu-dev libopenblas-base libpcre2-dev wget python-pip \
|
||||||
&& apt-get build-dep -y r-base
|
&& apt-get build-dep -y r-base \
|
||||||
|
&& apt-get install -y gcc-8 g++-8 gfortran-8
|
||||||
|
|
||||||
RUN pip install awscli
|
RUN pip install awscli
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,16 @@ compile_r() {
|
||||||
--with-blas \
|
--with-blas \
|
||||||
--with-lapack"
|
--with-lapack"
|
||||||
|
|
||||||
|
if _version_is_greater_than ${R_VERSION} 4.2.10; then
|
||||||
|
if [[ "${OS_IDENTIFIER}" = "ubuntu-1804" ]]; then
|
||||||
|
default_configure_options="$default_configure_options \
|
||||||
|
CC=gcc-8 CXX=g++-8 FC=gfortran-8"
|
||||||
|
gcc_package=gcc-8
|
||||||
|
gxx_package=g++-8
|
||||||
|
gfortran_package=gfortran-8
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:-$default_configure_options}
|
CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:-$default_configure_options}
|
||||||
|
|
||||||
# set some common environment variables for the configure step
|
# set some common environment variables for the configure step
|
||||||
|
|
@ -165,6 +175,7 @@ EOF
|
||||||
package_r() {
|
package_r() {
|
||||||
if [[ -f /package.sh ]]; then
|
if [[ -f /package.sh ]]; then
|
||||||
export R_VERSION=${1}
|
export R_VERSION=${1}
|
||||||
|
export gcc_package gxx_package gfortran_package
|
||||||
source /package.sh
|
source /package.sh
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ deb:
|
||||||
fields:
|
fields:
|
||||||
Bugs: https://github.com/rstudio/r-builds/issues
|
Bugs: https://github.com/rstudio/r-builds/issues
|
||||||
depends:
|
depends:
|
||||||
- g++
|
- ${gxx_package-g++}
|
||||||
- gcc
|
- ${gcc_package-gcc}
|
||||||
- gfortran
|
- ${gfortran_package-gfortran}
|
||||||
- libbz2-dev
|
- libbz2-dev
|
||||||
- libc6
|
- libc6
|
||||||
- libcairo2
|
- libcairo2
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ R_HOME=/opt/R/${R_VERSION}/lib/R
|
||||||
"${R_HOME}/bin/Rscript" -e 'sessionInfo()'
|
"${R_HOME}/bin/Rscript" -e 'sessionInfo()'
|
||||||
|
|
||||||
# List R devel dependencies
|
# List R devel dependencies
|
||||||
gcc --version
|
$("${R_HOME}/bin/R" CMD config CC) --version
|
||||||
g++ --version
|
$("${R_HOME}/bin/R" CMD config CXX) --version
|
||||||
gfortran --version
|
$("${R_HOME}/bin/R" CMD config FC) --version
|
||||||
|
|
||||||
# List shared library dependencies (e.g. BLAS/LAPACK)
|
# List shared library dependencies (e.g. BLAS/LAPACK)
|
||||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${R_HOME}/lib ldd "${R_HOME}/lib/libR.so"
|
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${R_HOME}/lib ldd "${R_HOME}/lib/libR.so"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue