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?
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
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.
I am writing an R package that has Fortran source code. In short, my problem is when I try to install the package I get the error "gfortran -m32: not found" however, I am able compile my code using gfortran -m32 when I'm not installing the package.
Detailed Version:
I have installed the newest version of R(3.1.1) along with the newest version of Rtools(31) and renamed my path variables accordingly (C:\Rtools\bin;C:\Rtools\gcc-4.6.3\bin;C:\Program Files\R\R-3.1.1\bin\x64;C:\msys;C:\Program Files (x86)\SSH Secure Shell;C:\Program Files\MiKTeX 2.9\miktex\bin).
For testing purposes, I downloaded the PropClust package from CRAN which has Fortran source code.
When I type "R CMD INSTALL PropClust_1.4.tar.gz" after building it, I get the following error:
* installing *source* package 'PropClust' ...
** libs
*** arch - i386
C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf:202: warning: overriding recipe for target `.m.o'
C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf:195: warning: ignoring old recipe for target `.m.o'
gfortran -m32 -O3 -mtune=core2 -c PropClustParallelTrials.f90 -o PropClustParallelTrials.o
gcc -m32 -I"C:/PROGRA~1/R/R-31~1.1/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c minWhichMin.c -o minWhichMin.o
gfortran -m32 -shared -s -static-libgcc -o PropClust.dll tmp.def PropClustParallelTrials.o minWhichMin.o -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-31~1.1/bin/i386 -lR
gfortran -m32: not found
C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf:202: warning: overriding recipe for target `.m.o'
C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf:195: warning: ignoring old recipe for target `.m.o'
cygwin warning:
MS-DOS style path detected: C:/PROGRA~1/R/R-31~1.1/bin/i386/Rterm.exe
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-31~1.1/bin/i386/Rterm.exe
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
no DLL was created
ERROR: compilation failed for package 'PropClust'
* removing 'C:/Users/kamicz/Documents/IsotopeR/PropClust.Rcheck/PropClust'
Although it says "gfortran -m32: not found" I have compiled my code in the same window with the same options(gfortran -m32 -O3 -mtne=core2 -c a.f90 -o a.out) with no problems. Has anyone had this problem before? I am running Windows 7 64-bit if that matters.
I had a similar problem : R was invoking gfortran-4.8 - an unrecognized command on my system - instead of gfortran. This problem was fixed upon creating the file ~/.R/Makevars within my home directory. Here are the contents of Makevars which points to the appropriate gfortran installation:
F77 = gfortran
FC = gfortran
FLIBS = -L/usr/local/gfortran/lib