Correct fftw installation enabling Rcartogram - r

I would like to instal FFTW to enable the Rcartogram package.
Attempts
homebrew
After installing fftw libraries via homebrew:
brew install fftw --with-fortran --with-mpi --with-openmp --enable-float
The attempt to install the Rcartogram fails with the following error:
>> devtools::install_github("omegahat/Rcartogram")
Downloading GitHub repo omegahat/Rcartogram#master
from URL https://api.github.com/repos/omegahat/Rcartogram/zipball/master
Installing Rcartogram
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ \
--no-save --no-restore --quiet CMD INSTALL \
'/private/var/folders/7x/kwc1y_l96t55_rwlv35mg8xh0000gn/T/Rtmp7nMfM9/devtoolsa9f2458e68c3/omegahat-Rcartogram-715cb93' \
--library='/Users/whereIkeepMyStuff' --install-tests
* installing *source* package ‘Rcartogram’ ...
(...)
Can compile with fftw3.h
checking for fftw_malloc in -lfftw3... no
configure: error: "cannot link to libfftw3"
ERROR: configuration failed for package ‘Rcartogram’
* removing (...)
Error: Command failed (1)
make install
As a second approach I tried the guidelines available here and install FFTW using the following syntax:
wget http://www.fftw.org/fftw-3.3.6-pl1.tar.gz
tar -xvzf fftw-3.3.6-pl1.tar.gz
cd fftw-3.3.6-pl1
./configure --prefix=/usr/local/fftw-3.6.6 --enable-threads \
--enable-float --enable-shared \
CC="gcc -arch i386 -arch x86_64" CXX="g++ -arch i386 -arch x86_64" \
CPP="gcc -E" CXXCPP="g++ -E" F77=gfortran
make
sudo make install
sudo ln -s /usr/local/fftw-3.6.6 /usr/local/fftw
This fails as follows:
>> devtools::install_github("omegahat/Rcartogram")
(...)
* installing *source* package ‘Rcartogram’ ...
checking for pkg-config... /usr/local/bin/pkg-config
Package fftw3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `fftw3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fftw3' found
Package fftw3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `fftw3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fftw3' found
Looking for fftw3 files in /usr/local
Cannot find fftw.h
ERROR: configuration failed for package ‘Rcartogram’
Configuration
OS
sw_vers -productVersion
10.12.2
R
R --version
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
How can install FFTW so I could use the Rcartogram package?
Cleaning
After failed attempts I would clean:
homebrew
brew uninstall fftw
shell
sudo make uninstall
sudo rm -rv /usr/local/fftw*

Related

How can I install devtools with Renv without getting an Error

Renv, can't install devtools
Goal: install devtools with renv
Expected Results: Installation of devtools.
Actual Results: see error below
I try to install packages in RStudio through renv (On Ubuntu), to use for my own package. I performed Renv init(), packages will install except for devtools. When I try to install devtools through renv::install()I get the following error:
> renv::install("devtools")
Retrieving 'https://cran.rstudio.com/src/contrib/devtools_2.4.4.tar.gz' ...
OK [file is up to date]
Retrieving 'https://cran.rstudio.com/src/contrib/pkgdown_2.0.6.tar.gz' ...
OK [file is up to date]
Retrieving 'https://cran.rstudio.com/src/contrib/ragg_1.2.2.tar.gz' ...
OK [file is up to date]
Installing ragg [1.2.2] ...
FAILED
Error installing package 'ragg':
================================
* installing *source* package ‘ragg’ ...
** package ‘ragg’ successfully unpacked and MD5 sums checked
** using staged installation
Package libtiff-4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libtiff-4.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libtiff-4' found
Package libtiff-4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libtiff-4.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libtiff-4' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfreetype -lpng16 -ltiff -lz -ljpeg -lbz2
-----------------------------[ ANTICONF ]-------------------------------
Configuration failed to find one of freetype2 libpng libtiff-4. Try installing:
* deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
* rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
* csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)
If freetype2 libpng libtiff-4 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a freetype2 libpng libtiff-4.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:22: fatal error: ft2build.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘ragg’
* removing ‘/home/SmitsG/Documents/Projects/{"package_location"}/renv/staging/1/ragg’
Error: install of package 'ragg' failed [error code 1]
So this resulted in the following errors:
No package 'libtiff-4' found
:1:22: fatal error: ft2build.h: No such file or directory
Error: install of package 'ragg' failed [error code 1]
I tried the following:
Installation in other package environment. This didn't work out
https://techoverflow.net/2019/06/11/how-to-fix-ft2build-h-no-such-file-or-directory/
Seems that I am missing the ft2build.h header file from
libfreetype. So I tried to install libfreetype from tar.gz and from
CRAN, for renv (this didn't install automatically). This didn't work out.
Package libtiff-4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libtiff-4.pc'
to the PKG_CONFIG_PATH environment variable
I found this link: https://github.com/numworks/epsilon/issues/592 where the set the PKG_CONFIG_PATH. But I think this can only be done when libfreetype is installed through renv.
{:~/path_to_package}$ pkg-config --cflags freetype2-I/usr/include/freetype2
-I/usr/include/libpng16
{:~/path_to_package}$ pkg-config --libs --cflags libtiff-4Package libtiff-4 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libtiff-4.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libtiff-4' found
I am a newbie to linux and I have found that installing R packages can be very frustrating because (1) there are numerous linux dependencies that need to be installed first and (2) it takes forever. Below is a script that installs the dependencies that I have found in installing R on my system (Linux Mint 21 Vanessa).
sudo apt update
sudo apt install -q \
cargo \
cmake \
default-jdk \
fonts-roboto \
htop \
libcairo2-dev \
libclang-dev \
libcurl4-openssl-dev \
libfontconfig1-dev \
libfreetype6-dev \
libfribidi-dev \
libgdal-dev \
libgeos-dev \
libharfbuzz-dev \
libjpeg-dev \
libproj-dev \
libpng-dev \
libpq-dev \
libsodium-dev \
libssl-dev \
libtiff5-dev \
libudunits2-dev \
libx11-dev \
libxml2-dev \
openjdk-8-jdk \
openjdk-8-jre \
pandoc \
ttf-mscorefonts-installer \
xorg-dev

Problems installing R package "nloptr" on M1 mac

I'm trying to install the "lme4" library in R and RStudio, which worked before I was on an M1 Mac, but now it's not installing. The dependency that's having trouble is: "nloptr". Here's my current error:
clang++ -arch arm64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o nloptr.so init_nloptr.o nloptr.o test-C-API.o test-runner.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.2.0/11.0.0 -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lm -Lnlopt/lib -lnlopt -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-Lnlopt/lib'
ld: library not found for -lnlopt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nloptr.so] Error 1
ERROR: compilation failed for package ‘nloptr’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/nloptr’
Warning in install.packages :
installation of package ‘nloptr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/ht/y6qd6yfn67x086jtwxvh42tw0000gn/T/RtmpULtpZq/downloaded_packages’ ```
I'm on an M1 Mac with Monterey (12.1). I've installed the arm64 version of R. Here's my current version R 4.1.2:
> version
_
platform aarch64-apple-darwin20
arch aarch64
os darwin20
system aarch64, darwin20
status
major 4
minor 1.2
year 2021
month 11
day 01
svn rev 81115
language R
version.string R version 4.1.2 (2021-11-01)
nickname Bird Hippie
I've already tried the following in Terminal: brew install nlopt and brew install gcc.
Before this, I also had an error as follows:
ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.2.0/11.0.0'
To fix that, based on Googling, I did this
export PATH=$PATH:/opt/R/arm64/gfortran/bin
and this
ln -sfn `xcrun --show-sdk-path` /opt/R/arm64/gfortran/SDK
On my machine (an M1 Mac running Big Sur), I've just tried install.packages("nloptr") without first doing brew install nlopt.
I get the same warning about -Lnlopt/lib:
ld: warning: directory not found for option '-Lnlopt/lib'
ld: library not found for -lnlopt
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nloptr.so] Error 1
ERROR: compilation failed for package ‘nloptr’
but prior to the warning I see:
checking if pkg-config knows NLopt... no
using NLopt via local cmake build on arm64
------------------ CMAKE NOT FOUND --------------------
CMake was not found on the PATH. Please install CMake:
- yum install cmake (Fedora/CentOS; inside a terminal)
- apt install cmake (Debian/Ubuntu; inside a terminal).
- pacman -S cmake (Arch Linux; inside a terminal).
- brew install cmake (MacOS; inside a terminal with Homebrew)
- port install cmake (MacOS; inside a terminal with MacPorts)
Alternatively install CMake from: <https://cmake.org/>
-------------------------------------------------------
install.packages("nloptr") succeeds after I install CMake with brew install cmake.
As for your initial issue with gfortran, I might suggest trying my instructions here. R recommends installing a specific build of gfortran and configuring compilers to find that installation via ~/.R/Makevars. You really should not need to mess with your PATH...
Unfortunately brew install cmake didn't help me, nor did installing nloptr from source, nor did configuring RStudio to use the correct PATH.
According to the documentation, in the section labeled Installing CMake (macOS and Linux only), the nloptr package installer expects to find the cmake executable either at:
The path specified by the CMAKE_BIN environment variable (spoiler alert: setting it didn't work), or
/Applications/CMake.app/Contents/bin/cmake.
Here's how I finally resolved the problem in a zsh shell:
brew install cmake
sudo mkdir -p /Applications/cmake.app/Contents/bin
cd /Applications/cmake.app/Contents/bin
sudo ln -s /opt/homebrew/bin/cmake
The downside to this approach is that it puts a non-application in the /Applications directory, but that I can live with.

ERROR: configuration failed for package ‘ragg’

> install.packages("ragg")
trying URL 'https://cloud.r-project.org/src/contrib/ragg_1.1.3.tar.gz'
Content type 'application/x-gzip' length 420401 bytes (410 KB)
==================================================
downloaded 410 KB
Welcome at Tue Aug 17 23:24:09 2021
Library path: /home/roy/miniconda3/envs/r-4.1/lib/R/library
Repositories set.
R_MAX_NUM_DLLS set to 1000.
* installing *source* package ‘ragg’ ...
** package ‘ragg’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu
Using PKG_LIBS=-lfreetype -lpng16 -lm -lz -lm -lz -ltiff -lwebp -lzstd -llzma -ljbig -ljpeg -lz -lm
-----------------------------[ ANTICONF ]-------------------------------
Configuration failed to find one of freetype2 libpng libtiff-4. Try installing:
* deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
* rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
* csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)
If freetype2 libpng libtiff-4 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a freetype2 libpng libtiff-4.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/features.h:361,
from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/limits.h:27,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:194,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:34,
from /usr/include/libpng16/pngconf.h:31,
from /usr/include/libpng16/png.h:339,
from <stdin>:2:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:492:49: error: missing binary operator before token "("
492 | #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
| ^
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/stdio.h:932,
from /usr/include/libpng16/pngconf.h:46,
from /usr/include/libpng16/png.h:339,
from <stdin>:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:228:17: error: missing binary operator before token "("
228 | #if __GLIBC_USE (DEPRECATED_GETS)
| ^
--------------------------------------------------------------------
ERROR: configuration failed for package ‘ragg’
* removing ‘/home/roy/miniconda3/envs/r-4.1/lib/R/library/ragg’
The downloaded source packages are in
‘/tmp/RtmpL1ZZnL/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("ragg") :
installation of package ‘ragg’ had non-zero exit status
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.0 (2021-05-18)
#> os Ubuntu 20.04.2 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_GB:en
#> collate en_GB.UTF-8
#> ctype en_GB.UTF-8
#> tz Europe/Stockholm
#> date 2021-08-17
This issue happens in a conda environment. The suggested linux libraries are installed (see below, run in the same conda env).
sudo apt-get install -y libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libjpeg-dev is already the newest version (8c-2ubuntu8).
libpng-dev is already the newest version (1.6.37-2).
libfreetype6-dev is already the newest version (2.10.1-2ubuntu0.1).
libtiff5-dev is already the newest version (4.1.0+git191117-2ubuntu0.20.04.1).
0 to upgrade, 0 to newly install, 0 to remove and 26 not to upgrade.
ragg installation outside the conda env works fine. My guess is that when installing from the conda env, it doesn't find the path to something. Any tips?
It looks like something connected to this question answer. I encountered the same issue when was trying to install "ragg" package inside my conda env, and the suggested fix in the log (mentioned by #BlackBear answer) is not the real cause of the issue, the issue's cause is showed below in the log:
-------------------------- [ERROR MESSAGE] ---------------------------
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/features.h:361,
from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/limits.h:27,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:194,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:34,
from /usr/include/libpng16/pngconf.h:31,
from /usr/include/libpng16/png.h:339,
from <stdin>:2:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:492:49: error: missing binary operator before token "("
492 | #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
| ^
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/stdio.h:932,
from /usr/include/libpng16/pngconf.h:46,
from /usr/include/libpng16/png.h:339,
from <stdin>:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:228:17: error: missing binary operator before token "("
228 | #if __GLIBC_USE (DEPRECATED_GETS)
| ^
--------------------------------------------------------------------
And it is maybe somehow connected to macros definition confusing. I'm not a big specialist in glibc and other things, for me the suggestion from the #MrFlick in comments to the question to install package directly via conda worked (mamba install -c conda-forge r-ragg)
The solution is in the log:
Configuration failed to find one of freetype2 libpng libtiff-4. Try installing:
* deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
* rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
* csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)
Install those packages and try again.
I saw the same error. The fix is to install pkg-config to the conda environment:
conda install -c conda-forge pkg-config
Somehow it seems that R c compiler under conda environment can not call system pkg-config correctly.

Issue installing R package 'devtools' in Docker - getting error installing git2r

I am using a continuumio/miniconda3:latest base container and activating a Conda environment.
This all works fine.
When I run:
RUN R -e "install.packages('devtools',repos = 'http://cran.us.r-project.org')"
I get an error:
configure: Package dependency requirement 'libgit2 >= 0.26.0' could not be satisfied.
-----------------------------------------------------------------------
Unable to find the libgit2 library on this system. Building 'git2r'
using the bundled source of the libgit2 library.
To build git2r with a system installation of libgit2, please install:
libgit2-dev (package on e.g. Debian and Ubuntu)
libgit2-devel (package on e.g. Fedora, CentOS and RHEL)
libgit2 (Homebrew package on OS X)
and try again.
If the libgit2 library is installed on your system but the git2r
configuration is unable to find it, you can specify the include and
lib path to libgit2 with:
given you downloaded a tar-gz archive:
R CMD INSTALL git2r-.tar.gz --configure-vars='INCLUDE_DIR=/path/to/include LIB_DIR=/path/to/lib'
or cloned the GitHub git2r repository into a directory:
R CMD INSTALL git2r/ --configure-vars='INCLUDE_DIR=/path/to/include LIB_DIR=/path/to/lib'
or download and install git2r in R using
install.packages('git2r', type='source', configure.vars='LIB_DIR=-L/path/to/libs INCLUDE_DIR=-I/path/to/headers')
On macOS, another possibility is to let the configuration
automatically download the libgit2 library from the Homebrew
package manager with:
R CMD INSTALL git2r-.tar.gz --configure-vars='autobrew=yes'
or
R CMD INSTALL git2r/ --configure-vars='autobrew=yes'
or
install.packages('git2r', type='source', configure.vars='autobrew=yes')
-----------------------------------------------------------------------
configure: Attempting configuration of bundled libgit2
checking size of void*... 8
checking for library containing inflate... no
configure: error: in `/tmp/Rtmpbkmfhr/R.INSTALL8c407eb001/git2r':
configure: error:
---------------------------------------------
The zlib library that is required to build
git2r was not found.
Please install:
zlib1g-dev (package on e.g. Debian and Ubuntu)
zlib-devel (package on e.g. Fedora, CentOS and RHEL)
and try again.
If the zlib library is installed on your
system but the git2r configuration is
unable to find it, you can specify the
include and lib path to zlib with:
R CMD INSTALL git2r --configure-vars='LIBS=-L/path/to/libs CPPFLAGS=-I/path/to/headers'
---------------------------------------------
See `config.log' for more details
ERROR: configuration failed for package ‘git2r’
* removing ‘/opt/conda/envs/r-app/lib/R/library/git2r’
I have libgit2-dev installed at the start of my Dockerfile using apt-get install libgit2-dev and it installs libgit2 version 0.27.7.
Now the odd part about this is if I start the container and access it, I can run the "install.packages('devtools',repos = 'http://cran.us.r-project.org')" just fine and it works.
Dockerfile:
FROM continuumio/miniconda3:latest
RUN apt-get update -y; apt-get upgrade -y; \
apt-get install -y vim ssh libgit2-dev zlib1g-dev \
build-essential gcc gfortran g++
RUN conda update -n base -c defaults conda
COPY environment.yml environment.yml
RUN conda env create -f environment.yml
RUN echo "source activate r-env" >> ~/.bashrc
ENV PATH /opt/conda/envs/r-env/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN R -e "install.packages('devtools',repos = 'http://cran.us.r-project.org')"
environment.yml:
name: r-env
channels:
- conda-forge
- defaults
dependencies:
- python=3.7
- r-essentials
- r-base
Replace the last line of your Dockerfile with:
RUN Rscript -e "install.packages('devtools',repos = 'http://cran.us.r-project.org')"

failed installation of openssl in R SUSE

I am a newcomer and currently trying to install openssl package in R (I have a SUSE Linux Enterprise server SP3 distribution), but it fails. The error message is this:
During startup - Warning message:
Setting LC_CTYPE failed, using "C"
* installing *source* package 'openssl' ...
** package 'openssl' successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
Using PKG_LIBS=-lssl -lcrypto
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
* deb: libssl-dev (Debian, Ubuntu, etc)
* rpm: openssl-devel (Fedora, CentOS, RHEL)
* csw: libssl_dev (Solaris)
* brew: openssl (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pig-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package 'openssl'
I made sure to have installed openssl in SUSE:
OpenSSL 0.9.8j-fips 07 Jan 2009
built on: Mon May 2 15:55:35 UTC 2016
platform: linux-x86_64
options: bn(64,64) md2(int) rc4(16x,int) des(idx,cisc,4,long) blowfish(ptr2)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -
DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -fmessage-length=0 -O2
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-
unwind-tables -g -fomit-frame-pointer -fno-strict-aliasing -DTERMIO -DPURIFY -
Wall -fstack-protector -Wa,--noexecstack -fprofile-use -DOPENSSL_BN_ASM_MONT
- DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM
OPENSSLDIR: "/etc/ssl"
And the openssl.pc file is located here:
/home/oscar/anaconda_ete/pkgs/openssl-1.0.2g-0/lib/pkgconfig/openssl.pc
/home/oscar/anaconda_ete/lib/pkgconfig/openssl.pc
/etc/ssl/openssl.pc
/usr/lib64/pkgconfig/openssl.pc
I would be very grateful with any help you could provide. I have been stuck for days trying to solve this problem without any success. Thanks a lot.
P.S.: I am installing this packages (openssl) because it is required by another R package (BioGeoBEARS).
You can't install a newer version than 0.9.8 on SLES 11 because the next openssl version is incompatible with itself.
https://www.suse.com/communities/blog/tls-1-2/
https://www.openssl.org/news/changelog.html#x37
But there is a possibility to build and install openssl 1.0.2 on SLES11 in an additional folder and point the r-openssl package to it.
Download and extract openssl src tarball
cd ~
curl https://www.openssl.org/source/openssl-1.1.0f.tar.gz | tar zxv
Create a new directory for the additional openssl version
e.g.
sudo mkdir -p /opt/R/extra/openssl
build and install openssl 1.1.0 with prefix
cd openssl-1.1.0f
./configure --prefix=/opt/R/extra/openssl
make
sudo make install
install r-package openssl (0.9.7)
cd ~
R CMD INSTALL --configure-vars='INCLUDE_DIR=/opt/R/extra/openssl/include LIB_DIR=/opt/R/extra/openssl/lib' openssl_0.9.7.tar.gz

Resources