I'm trying to install R with shlib and PNG support. X11, pango, and cairo are already installed on Centos 6. I used the same command to install on another machine which works fine, but not on this one machine. They're all identical. What am I doing wrong?
Here's the statement for configure.
./configure --enable-R-shlib --with-x --with-readline --with-cairo --with-tcltk --with-libpng --with-jpeglib
This is what I get at the end of the configuration
R is now configured for x86_64-unknown-linux-gnu
Source directory: .
Installation directory: /packages/R/3.1.1
C compiler: gcc -std=gnu99 -g -O2
Fortran 77 compiler: gfortran -g -O2
C++ compiler: g++ -g -O2
C++ 11 compiler: g++ -std=c++0x -g -O2
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler:
Interfaces supported: X11
External libraries: readline
Additional capabilities: NLS
Options enabled: shared R library, shared BLAS, R profiling
Recommended packages: yes
Notice X11 is enabled. I configured with JPEG and PNG support, but it's not listed in additional capabilities.
And finally, this is what I see in R
> capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE FALSE FALSE
I need a fresh set of eyes to see what I'm doing wrong. I can't seem to figure out what I'm missing.
Must install pango... 32 or 64-bit
Related
I have several R packages failed to be updated/complied from the source. Followings are snippets of error messages;
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include" -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include -fPIC -g -O2 -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include/RcppArmadillo.h:31:
In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/RcppArmadillo/include/RcppArmadilloForward.h:26:
In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/RcppCommon.h:29:
In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/Rcpp/r/headers.h:59:
In file included from /Volumes/Documents/Users/akihoji/Library/R/3.x/library/Rcpp/include/Rcpp/platform/compiler.h:100:
In file included from /usr/local/Cellar/llvm/7.0.1/include/c++/v1/cmath:305:
/usr/local/Cellar/llvm/7.0.1/include/c++/v1/math.h:301:15: **fatal error: 'math.h' file not found**
Another one;
> ** libs clang -I"/usr/local/Cellar/r/3.5.2_2/lib/R/include" -DNDEBUG -I"/Volumes/Documents/Users/akihoji/Library/R/3.x/library/Matrix/include"
> -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include -fPIC -g -O2 -c irlb.c -o irlb.o irlb.c:19:10: fatal error: 'stdlib.h' file not found
> #include <stdlib.h>
Error messages point to several missing headers but they are all there in my
/usr/local/Cellar/llvm/7.0.1/include/c++/v1
I'd appreciate any help solving this issue.
sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.3
BuildVersion: 18D4
clang -v
clang version 7.0.1 (tags/RELEASE_701/final)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
gcc --version
gcc (Homebrew GCC 8.2.0) 8.2.0
setting value
version R version 3.5.2 (2018-12-20)
os macOS Mojave 10.14.3
system x86_64, darwin17.7.0
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz America/New_York
date 2019-02-06
Update;
I just remembered that I had the exact same issue when I installed OSX Mojave in my other Mac. It turns out that /usr/include is absent even when you install command tools, particularly for the latest version by Xcode-select install.
My installed Xcode is
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 10.1.0.0.1.1539992718
volume: /
location: /
install-time: 1549499389
groups: com.apple.FindSystemFiles.pkg-group
This CLT pkg will install /include in
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
/Library/Developer/CommandLineTools/usr/include
So all you have to do is either copy or link one of these include folders to /usr but in order to do this, you have to take disable System Integrity Protection by provoking crstutil in the recovery mode.
It seems like you can install packages from an R console if you cannot install them inside RStudio.
Source:
https://github.com/catboost/catboost/issues/137
I am trying to install R from source code in my Ubuntu 14.04. I ran ./configure but that shows some warning-
..........................................
.........................................
config.status: creating tests/Examples/Makefile
config.status: creating tools/Makefile
config.status: creating src/include/config.h
config.status: executing libtool commands
config.status: executing stamp-h commands
R is now configured for x86_64-pc-linux-gnu
Source directory: .
Installation directory: /usr/local
C compiler: gcc -std=gnu99 -g -O2
Fortran 77 compiler: gfortran -g -O2
Default C++ compiler: g++ -g -O2
C++98 compiler: g++ -g -O2
C++11 compiler: g++ -std=gnu++11 -g -O2
C++14 compiler:
C++17 compiler:
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler:
Interfaces supported: X11
External libraries: readline, curl
Additional capabilities: PNG, JPEG, NLS
Options enabled: shared BLAS, R profiling
Capabilities skipped: TIFF, cairo, ICU
Options not enabled: memory profiling
Recommended packages: yes
configure: WARNING: pcre < 8.32 is deprecated
configure: WARNING: you cannot build info or HTML versions of the R manuals
configure: WARNING: you cannot build PDF versions of vignettes and help pages
configure: WARNING: neither inconsolata.sty nor zi4.sty found: PDF vignettes and package manuals will not be rendered optimally
Texlive 2017 is also installed in my system. I want to full featured R. Now, what can I do for fixing the warnings?
Compiling R-3.3.2 from source. My flags include --with-libtiff. They are: ./configure --with-system-tre --with-blas --with-lapack --with-libtiff --enable-R-shlib --enable-lto --prefix=/opt/new.R
I do have libtiff4 and libtiff4-dev. However:
R is now configured for i686-pc-linux-gnu
Source directory: .
Installation directory: /opt/new.R
C compiler: gcc -g -O2
Fortran 77 compiler: f95 -g -O2
C++ compiler: g++ -g -O2
C++11 compiler: g++ -std=c++11 -g -O2
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler: gcc -g -O2 -fobjc-exceptions
Interfaces supported: X11, tcltk
External libraries: readline, BLAS(generic), LAPACK(generic), curl
Additional capabilities: PNG, JPEG, NLS, cairo, ICU
Options enabled: shared R library, R profiling, strict barrier
Capabilities skipped: TIFF
Options not enabled: shared BLAS, memory profiling
Recommended packages: yes
The TIFF capability has been skipped. Why, and how can I force it to be enabled?
I had the same problem. The R configure script tests for the presence of tiff with pkg-config, but doesn't provide any feedback when this fails.
I resolved it by setting the PKG_CONFIG environment variable to point to the directory containing the file libtiff-4.pc.
The primary goal is to use DiffBind (a R package) to analyze my ChIPseq data.
(I found another post which might be relevant to my issue, and tried to extract the solution from it, but I guess the content was too "advanced" for me... )
Following the suggestion that I might need to update my DiffBind
I tried to install a new version of it.
By the checking the dependency of DiffBind I guess that the previous installation automatically install an old version of DiffBind because my R did not meet the requirement of current version of DiffBind.
But I was using the R under the root directory, for which I could not do much about it. So I decided install a newer version of R under my own directory. and I managed to do that.
Then I tried to install the current version of DiffBind, I got the error
ERROR: compilation failed for package ‘RcppArmadillo’
It turned out the dependency lib "RcppArmadillo" require a more up-to-date compiler, again, I was using the gcc compiler under the root directory, so I install a new version of gcc under my own directory.
$ gcc --version
gcc (GCC) 6.1.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ which gcc
/$HOME/Programme/gcc-6.1.0/bin//gcc
After that I tried to install the DiffBind (RcppArmadillo) again, but met another error:
* installing *source* package ‘RcppArmadillo’ ...
** package 'RcppArmadillo' successfully unpacked and MD5 sums checked
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking whether g++ version is sufficient... (6.1.0) yes
checking LAPACK_LIBS... fallback LAPACK from R 3.3.0 or later used
configure: creating ./config.status
config.status: creating inst/include/RcppArmadilloLapack.h
** libs
g++ -I/$HOME/Programme/R-3.3.1/lib64/R/include -DNDEBUG -I//$HOME/Programme/zlib-1.2.11/include -I//$HOME/Programme/bzip2-1.0.6/include -I//$HOME/Programme/xz-5.2.3/include -I//$HOME/Programme/pcre-8.40/include -I//$HOME/Programme/curl-7.52.1/include -I"/$HOME/Programme/R-3.3.1/lib64/R/library/Rcpp/include" -I../inst/include -fpic -g -O2 -c RcppArmadillo.cpp -o RcppArmadillo.o
g++ -I/$HOME/Programme/R-3.3.1/lib64/R/include -DNDEBUG -I//$HOME/Programme/zlib-1.2.11/include -I//$HOME/Programme/bzip2-1.0.6/include -I//$HOME/Programme/xz-5.2.3/include -I//$HOME/Programme/pcre-8.40/include -I//$HOME/Programme/curl-7.52.1/include -I"/$HOME/Programme/R-3.3.1/lib64/R/library/Rcpp/include" -I../inst/include -fpic -g -O2 -c RcppExports.cpp -o RcppExports.o
g++ -I/$HOME/Programme/R-3.3.1/lib64/R/include -DNDEBUG -I//$HOME/Programme/zlib-1.2.11/include -I//$HOME/Programme/bzip2-1.0.6/include -I//$HOME/Programme/xz-5.2.3/include -I//$HOME/Programme/pcre-8.40/include -I//$HOME/Programme/curl-7.52.1/include -I"/$HOME/Programme/R-3.3.1/lib64/R/library/Rcpp/include" -I../inst/include -fpic -g -O2 -c fastLm.cpp -o fastLm.o
g++ -shared -L/$HOME/Programme/R-3.3.1/lib64/R/lib -L//$HOME/Programme/zlib-1.2.11/lib -L//$HOME/Programme/bzip2-1.0.6/lib -L//$HOME/Programme/xz-5.2.3/lib -L//$HOME/Programme/pcre-8.40/lib -L//$HOME/Programme/curl-7.52.1/lib -o RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.o -L/$HOME/Programme/R-3.3.1/lib64/R/lib -lRlapack -L/$HOME/Programme/R-3.3.1/lib64/R/lib -lRblas -lgfortran -lm -L/$HOME/Programme/R-3.3.1/lib64/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status**
it turned out that gfortran could not be found.
but when I checked existence of gfortran it exist:
$ which gfortran
/usr/bin/gfortran
$ gfortran --version
GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
Copyright (C) 2010 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
So I assumed that gcc could not find gfortran, which is under the root directory.
how could I solve the problem?
Or could it be possible that the mismatch between the gcc and gfortran is the problem? if that is the case, what could be done to circumvent it?
My R version:
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.7 (Santiago)
locale:
[1] LC_CTYPE=ja_JP.UTF-8 LC_NUMERIC=C
[3] LC_TIME=ja_JP.UTF-8 LC_COLLATE=ja_JP.UTF-8
[5] LC_MONETARY=ja_JP.UTF-8 LC_MESSAGES=ja_JP.UTF-8
[7] LC_PAPER=ja_JP.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=ja_JP.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
I think the issue mentioned here has been solved.
As VladimirF mentioned in the comments, when I installed the new version of gcc, I did not enable the Fortran, which is not a default setting, so the gfortran was not installed in my previous attempts.
I deleted my previous Gcc, and re compiled it as follows:
tar -xvf gcc-6.1.0.tar.gz
cd gcc-6.1.0
./contrib/download_prerequisites
mkdir build
cd build
../configure --prefix=$HOME/Programme/gcc-6.1.0 --enable-languages=c,c++,fortran --disable-multilib
make -j 8
make install
set path for new gcc and lib
it worked!
After building from source and installing R 3.3.2 font of plots became ragged and greek letters were changed by latin (as shown in the pictures below). What could have caused it?
This is my configure summary:
R is now configured for x86_64-pc-linux-gnu
Source directory: .
Installation directory: /usr/local
C compiler: gcc -g -O2
Fortran 77 compiler: f95 -g -O2
C++ compiler: g++ -g -O2
C++11 compiler: g++ -std=c++11 -g -O2
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler: gcc -g -O2 -fobjc-exceptions
Interfaces supported: X11
External libraries: readline, curl
Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU
Options enabled: shared R library, shared BLAS, R profiling
Capabilities skipped:
Options not enabled: memory profiling
Recommended packages: yes
Stock R version
Custom R version
As it turned out, the problem was in my locale settings. After I've set all locale settings to en_US.UTF-8, all font related problems disappeared.
Edit
Tested on two machines. It was exactly the problem.