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.
Related
When trying to install RTidyHTML remotely from Github on RStudio (2022.02.2 Build 485) with R version 4.2.0, I'm told /bin/sh: gcc-11.3.0_1: command not found. This is after installing gcc through homebrew and creating an ~/.R/Makevars with the following details:
VER=-11.3.0_1
CC=gcc$(VER)
CXX=g++$(VER)
CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
Running brew list --versions gcc, return gcc 11.3.0_1,
Running gcc --version returns:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
My PATH is
/opt/homebrew/opt/openssl#3/bin:/Library/Frameworks/GDAL.framework/Programs:/Library/Frameworks/Python.framework/Versions/3.9/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
which gcc returns gcc is /usr/bin/gcc.
I don't know how to make RStudio recognize the correct path and thus how I'm able to compile packages. I'd appreciate troubleshooting advice.
Running macOS Monterey (V12.2) on an M1 Mac.
Xposted on https://community.rstudio.com/t/how-to-troubleshoot-c-compiler-problems-on-mac/137675 but no response.
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?
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'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