How do I determine if my R installation on OS X has the "--enable-R-shlib" option enabled? - ruby

I've installed R on my OS X machine via the .pkg method. I'm trying to get a Ruby gem called RSRuby to work and though it installed correctly, it's throwing an error when I try to invoke the gem.
Fatal error: R home directory is not defined
The RSRuby documentation states that R should be installed with the option --enable-R-shlib. But the R documentation states that the Mac OS X installation does this by default. How can you verify that this option is enabled on an installation if you don't know it was explicitly called during installation?
I'm chasing down why RSRuby can't find R home directory and this seems like the most likely problem.
Per RSRuby documentation, I copied this into my home directory
[~]$ R_HOME=/Library/Frameworks/R.framework/Resource
And from the R console, this is the output:
> R.home()
[1] "/Library/Frameworks/R.framework/Resources"
And during gem install, I ran this command:
gem install rsruby -- --with-R-dir=$R_HOME=/Library/Frameworks/R.framework/Resources
Also, these are the contents of my /Library/Frameworks/R.framework/Libraries folder:
[Libraries]$ ls
i386 libRblas.dylib.dSYM libgfortran.2.dylib
libR.dylib libRblas.vecLib.dylib libreadline.5.2.dylib
libR.dylib.dSYM libRlapack.dylib libreadline.dylib
libRblas.0.dylib libRlapack.dylib.dSYM ppc
libRblas.dylib libgcc_s.1.dylib x86_64

Briefly:
You can check for --enable-R-shlib by looking at thethe binary of the resulting R built; on Linux I can do ldd /usr/lib/R/bin/exec/R which reveals that libR.so --- the shared R library --- is loaded by this binary. That is what other projects embedding R (RInside, littler, the R-in-Apache modules, ...) use and presumably what RSRuby would use.
If you get an error 'R home directory not defined' I would start by defining the environment variable R_HOME.
Edit: Regaring Question 1, on OS X, your dynamic libraries end in .dylib. So the directory listing you show clearly demonstrates that R was built with --enable-R-shlib as a compile-time option. Regarding Question 2, the very first Google hit I got for rsruby os x clearly describes how to set R_HOME on OS X (as I had told you), see https://github.com/alexgutteridge/rsruby.

Related

R-INLA installation fails on R 4.1.1

I need to install R-INLA on R 4.1.1 (Windows 10). I cannot update the R version due to compatibility issues of the newer R installations with other tools I that use. I tried the line:
remotes::install_version("INLA", version="22.05.03",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/testing"), dep=TRUE)
As recommended on the INLA website for R 4.1. I get this message in return:
* installing *binary* package 'INLA' ...
cp: unknown option -- )
Try '/usr/bin/cp --help' for more information.
ERROR: installing binary package failed
* removing 'C:/Program Files/R/R-4.1.1/library/INLA'
I have rtools40 installed and added to my path. I have installed the two suggested packages graph and Rgraphviz as recommended.
I have also tried:
devtools::install_github(repo = "https://github.com/hrue/r-inla", ref = "stable", subdir = "rinla", build = FALSE)
But no luck there either.
If I type where cp in the RStudio terminal, I get:
$ where cp
C:\Program Files\Git\usr\bin\cp.exe
C:\rtools40\usr\bin\cp.exe
But I am not sure if this has anything to do with R not finding cp.
Anyone has any advice?
I was having the same problem, and solved it for my Windows 10 machine:
Download the INLA_22.05.03.zip file at https://inla.r-inla-download.org/R/stable/bin/windows/contrib/4.1/
In RStudio, under the Tools menu, select Install Packages, and Install from: Package Archive File. Tell RStudio where the .zip file is located on your local machine. From there it installed fine for me.

Can't install cargo-binutils library: Failed to find tool. Is `gcc.exe` installed?

When I run cargo install cargo-binutils, I get the below error. I have gcc installed and in my path, to the point where where gcc correctly returns the location.
gcc version: gcc.exe (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0
I couldn't find a solution to work, including the explanation in the link listed in the error. I'm on Windows 10.
error: failed to run custom build command for \`backtrace-sys v0.1.37`
Caused by:
process didn't exit successfully: \`C:\Users\blahblah\AppData\Local\Temp\cargo-installEvEWRS\release\build\backtrace-sys-075604757ab74d2a\build-script-build` (exit code: 1)
--- stdout
cargo:rustc-cfg=rbt
TARGET = Some("x86_64-pc-windows-gnu")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "src/libbacktrace" "-I" "C:\\Users\\BRENDA~1.BUR\\AppData\\Local\\Temp\\cargo-installEvEWRS\\release\\build\\backtra
ce-sys-1e77a4d4c3ba2eda\\out" "-fvisibility=hidden" "-DBACKTRACE_SUPPORTED=1" "-DBACKTRACE_USES_MALLOC=1" "-DBACKTRACE_SUPPORTS_THREADS=0" "-DBACKTRACE_SUPPORTS_DATA=0" "-DHAVE_DL_ITERATE_PHDR=
1" "-D_GNU_SOURCE=1" "-D_LARGE_FILES=1" "-Dbacktrace_full=__rbt_backtrace_full" "-Dbacktrace_dwarf_add=__rbt_backtrace_dwarf_add" "-Dbacktrace_initialize=__rbt_backtrace_initialize" "-Dbacktrac
e_pcinfo=__rbt_backtrace_pcinfo" "-Dbacktrace_syminfo=__rbt_backtrace_syminfo" "-Dbacktrace_get_view=__rbt_backtrace_get_view" "-Dbacktrace_release_view=__rbt_backtrace_release_view" "-Dbacktra
ce_alloc=__rbt_backtrace_alloc" "-Dbacktrace_free=__rbt_backtrace_free" "-Dbacktrace_vector_finish=__rbt_backtrace_vector_finish" "-Dbacktrace_vector_grow=__rbt_backtrace_vector_grow" "-Dbacktr
ace_vector_release=__rbt_backtrace_vector_release" "-Dbacktrace_close=__rbt_backtrace_close" "-Dbacktrace_open=__rbt_backtrace_open" "-Dbacktrace_print=__rbt_backtrace_print" "-Dbacktrace_simpl
e=__rbt_backtrace_simple" "-Dbacktrace_qsort=__rbt_backtrace_qsort" "-Dbacktrace_create_state=__rbt_backtrace_create_state" "-Dbacktrace_uncompress_zdebug=__rbt_backtrace_uncompress_zdebug" "-D
macho_get_view=__rbt_macho_get_view" "-Dmacho_symbol_type_relevant=__rbt_macho_symbol_type_relevant" "-Dmacho_get_commands=__rbt_macho_get_commands" "-Dmacho_try_dsym=__rbt_macho_try_dsym" "-Dm
acho_try_dwarf=__rbt_macho_try_dwarf" "-Dmacho_get_addr_range=__rbt_macho_get_addr_range" "-Dmacho_get_uuid=__rbt_macho_get_uuid" "-Dmacho_add=__rbt_macho_add" "-Dmacho_add_symtab=__rbt_macho_a
dd_symtab" "-Dmacho_file_to_host_u64=__rbt_macho_file_to_host_u64" "-Dmacho_file_to_host_u32=__rbt_macho_file_to_host_u32" "-Dmacho_file_to_host_u16=__rbt_macho_file_to_host_u16" "-o" "C:\\User
s\\BRENDA~1.BUR\\AppData\\Local\\Temp\\cargo-installEvEWRS\\release\\build\\backtrace-sys-1e77a4d4c3ba2eda\\out\\src/libbacktrace/alloc.o" "-c" "src/libbacktrace/alloc.c"
--- stderr
error occurred: Failed to find tool. Is `gcc.exe` installed? (see https://github.com/alexcrichton/cc-rs#compile-time-requirements for help)
https://github.com/alexcrichton/cc-rs#compile-time-requirements says:
Windows platforms targeting MinGW (e.g. your target triple ends in -gnu)
require cc to be available in PATH. We recommend the
MinGW-w64 distribution, which is using the
Win-builds installation system.
You may also acquire it via
MSYS2, as explained [here][msys2-help]. Make sure
to install the appropriate architecture corresponding to your installation of
rustc. GCC from older MinGW project is compatible
only with 32-bit rust compiler.
Try creating a symlink or hardlink to GCC called cc, somewhere on your path.
This happened to me as well. In my case I got:
failed to run custom build command for zstd-sys v2.0.1+zstd.1.5.2
Caused by: process didn't exit successfully:
C:\Users\asili\Documents\Programming\zero2prod\target\debug\build\zstd-sys-f37cc8bfd3eec6ac\build-script-build
(exit code: 1)
error occurred: Failed to find tool. Is gcc.exe installed? (see
https://github.com/alexcrichton/cc-rs#compile-time-requirements for
help)
I was able to solve it by following the steps on installing the Visual C++ extension from the VS Code marketplace.
This is how I did it:
Go to MSYS2.org https://www.msys2.org/ (You will also see the installation steps on the site, in case this answer gets outdated).
Download and install msys2-x86_64-20220603.exe (or whichever version is current). The installation is pretty straightforward, just take a note on the installation path as you will need to add this to the environment PATH later on.
A new program called "MSYS2" should've been installed. Open it, and you'll see a terminal window in it. You will run ALL of the commands mentioned below in this terminal. If you close it, open it again.
Run:
pacman -Syu
This will update the packages and databases.
Run (Again - This step may not be needed, but is recommended by MSYS2 in case packages need an additional updates.)
pacman -Syu
Run:
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
You will now see a selection of all the packages. If you don't know which to choose, just press enter on your keyboard and you shall get all of them (that's what I ended up doing).
After that, gcc.exe will be installed the bin folder of mingw64. Therefore:
Add theC:\msys64\mingw64\bin file path to your path environment variable (or Wherever you decided to install it).
In case you need assistance on adding to the path, check out this link.
Remember to restart your CMD/Windows Terminal/Power Shell for the environment path to take place.

Installing Perl and PDL

I am currently trying - unsuccessfully to install perl PDL as I would like to automate some of my data analysis and graphics generation.
Unfortunately I seem unable to even install the necessary modules without issue, let alone create a small script to deal with my data files.
I have some rudementary experience with Perl but Nothing fancy and am using Windows 10 x64.
Initially I went for the x64 strawberry perl v5.24 installation, followed by ppm installations of Astro::FITS::Header, Convert::UU, OpenGL and PDL - as instructed here http://pdl.perl.org/?page=install. However, there were issues with the installation of Inline::C and after trying the example listed on page 5 of the PDL_Book_Latest http://sourceforge.net/projects/pdl/files/PDL/2.4.10/PDL-Book-20120205.pdf/download there wasn't any image appearing, nor image file in any location I could think to search. Back to Google and still no luck finding any information on the source of this issue so I decided to go back to square one and use an older version in the hopes that it would be more well documented.
So, uninstallation of strawberry perl through Windows installed programs dialog, deletion of strawberry folder and registry entries containing "strawberry". Then a new installation of perl, with the Padre IDE, v5.14 - maybe some debugging fonctionality will help pinpoint the errors. Started installing the same modules (Astro::FITS::Header, Convert::UU, OpenGL, PGPLOT). Astro and Convert worked fine, but the OpenGL started throwing errors about ExtUtils::F77 which I am apparently missing after a few more hours searching. I go to install this module and it keeps giving errors about 'gfortan' being an unknown command... It was my understanding that the idea of PDL was to avoid fortran and C, and I have found next to no information about this installation problem so far.
So i decided to try an alternative approach. I installed the ppm module from cpan and repeated the initial installation process through the ppm command. This time i get:
"Unknown element 'PROVIDE' found inside SOFTPKG. at C:/Dwimperl/perl/site/lib/PPM.pm line 1462."
So my question is as follows:
Am I missing some critical step in the installation process? Is my system just handing this really badly, and if so is there any sort of possible work around? Is the fact that I tried two different versions liable to create path issues that could be at the root of this problem?
Could anyone provide an alternative and preferably not too complex route to install PDL with a given perl installation on Windows 10?
EDIT 1:
Here is the code for the error I got trying to install Inline::C, an apparent pre-requisite for PDL
code deleted to make space for updates...
EDIT 3:
I reinstalled GnuWin32 in the directory specified by PATH, rather that changing PATH, and the tried the installation again. Inline::C gave the same 'diff' and 'rm' errors. So i ran "cpanm --notest 'package'" to install Inline::C and then PDL, both said they were successful. However, even using '--notest' cpanm could not install OpenGL and PGPLOT.
The final objectif is to be able to produce graphics using the fonctions from PGPLOT: for example
# use PDL;
# use PDL::Graphics::PGPLOT;
# imag(sin(rvals(200,200)+1));
yet this doesn't work of course if PGPLOT can't install.
EDIT 4:
Tried the fix found by #Dr.Avalange at sourceforge https://sourceforge.net/p/pogl/bugs/26/ and noticed that I seem to have multiple copies of this file.
Here
Is this normal...?
EDIT 5:
So i uninstalled perl, deleted any lingering files I could find in %APPDATA%, %USERPROFILE% and C:/DWIM, and then ran ccleaner just in case I missed anything.
I then downloaded Strawberry perl 5.24.1 x64 for Windows and installed it.
After this, I ran 'cpanm Astro::FITS::Header', cpanm 'Convert-UU' and 'cpanm OpenGL' as per http://pdl.perl.org/?page=install. This all worked fine. Then I ran 'cpanm PDL' which installed Inline, Pegex, Win32::Mutex and Module::Compile dependencies. However, if had the same error with Inline::C that you mentioned previously.
I already had GetGnuWin32 installed before so not sure why this isn't working. The Windows 'Path' environment (not PATH - this doesn't exist according to the advaced system dialogue) is noted as
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;
In this directory I have the folder GetGnuWin32 which should have installed all the packages from the link you provided, unless there is a supplementary step that I missed to install this correctly? So I redownloaded the DiffUtils setup and ran that, installing to \programfiles(x86) (default option). I then reran 'cpanm PDL'.
I still get the same 'diff' error message. So is DiffUtils, not installing properly? (I did close and re-open the commandline between tries and after the installation)
EDIT 6:
So after installing PDL and PGPLOT with --notest I tried to run the following test and it failed. See below
C:\Windows\system32>perldl
perlDL shell v1.357
PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
'COPYING' in the PDL distribution. This is free software and you
are welcome to redistribute it under certain conditions, see
the same file for details.
ReadLines, NiceSlice, MultiLines enabled
Reading PDL/default.pdl...
Found docs database C:/Strawberry/perl/site/lib/PDL/pdldoc.db
Type 'help' for online help
Type 'demo' for online demos
Loaded PDL v2.017 (supports bad values)
Note: AutoLoader not enabled ('use PDL::AutoLoader' recommended)
pdl> use PDL::Graphics//PLplot
Unknown regexp modifier "/P" at (eval 62) line 4, at end of line
Unknown regexp modifier "/L" at (eval 62) line 4, at end of line
Unknown regexp modifier "/t" at (eval 62) line 4, at end of line
BEGIN not safe after errors--compilation aborted at (eval 62) line 5, <DATA> line 207.
pdl> use PDL::Graphics::PLplot
Can't locate PDL/Graphics/PLplot.pm in #INC (you may need to install the PDL::Graphics::PLplot module) (#INC contains: C:/Strawberry/perl/site/lib/MSWin32-x64-multi-thread C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at (eval 72) line 5.
BEGIN failed--compilation aborted
pdl> use PDL
pdl> use lib 'C:/Strawberry/perl/site/lib/PDL/Graphics'
pdl> use PGPLOT
pdl> use PDL::Graphics::PGPLOT
pdl> imag(sin(rvals(200,200)+1))
Undefined subroutine &PDL::Graphics::PGPLOT::pgqinf called at C:/Strawberry/perl/site/lib/PDL/Graphics/PGPLOT.pm line 408, <DATA> line 90.
pdl> exit
C:\Windows\system32>cpanm PDL::Graphics::PGPLOT::pgqinf
! Finding PDL::Graphics::PGPLOT::pgqinf on cpanmetadb failed.
! Finding PDL::Graphics::PGPLOT::pgqinf () on mirror http://www.cpan.org failed.
! Couldn't find module or a distribution PDL::Graphics::PGPLOT::pgqinf
C:\Windows\system32>cpan PDL::Graphics::PGPLOT::pgqinf
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: CPAN::SQLite loaded ok (v0.211)
Database was generated on Thu, 13 Apr 2017 13:49:14 GMT
C:\Windows\system32>
There was already a directory problem but I managed to point it in th right direction I had thought. Also tried installing the PLplot 'cpanm' said the installation was successful but there is no .pm file, only a .pd in another directory and so the use PDL::Graphics::PLplot fails as there is no .pm file to find.
EDIT: 7
So retrying ppm install http://www.sisyphusion.tk/ppm/PGPLOT.ppd seemed to work this time as the links int he explanation you provided are no longer in use
http://www.kalinabears.com.au/w32perl/pgplot-5.2.2-mingw32.tar.bz2
http://jrfonseca.home.dyndns.org/projects/gnu-win32/software/ported/patches/pgplot-5.2.2-mingw32.diff.gz
And while this seemed to work, there are no traces of the files that were listed as necessary for the installation, unless they were just for this specific method?
pgplot/bin/cpgplot.dll
pgplot/bin/pgplot.dll
pgplot/bin/grfont.dat
pgplot/include/cpgplot.h
pgplot/lib/cpgplot.a
pgplot/lib/pgplot.a
finally, trying the example again gives the following; no errors, but no image either...
Microsoft Windows [version 10.0.14393]
(c) 2016 Microsoft Corporation. Tous droits réservés.
C:\Windows\system32>perldl
perlDL shell v1.357
PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
'COPYING' in the PDL distribution. This is free software and you
are welcome to redistribute it under certain conditions, see
the same file for details.
ReadLines, NiceSlice, MultiLines enabled
Reading PDL/default.pdl...
Found docs database C:/Strawberry/perl/site/lib/PDL/pdldoc.db
Type 'help' for online help
Type 'demo' for online demos
Loaded PDL v2.017 (supports bad values)
Note: AutoLoader not enabled ('use PDL::AutoLoader' recommended)
pdl> use PDL
pdl> use PDL::Graphics::PGPLOT
pdl> imag(rvals(200,200)+1)
%PGPLOT, Unable to read font file: grfont.dat
%PGPLOT, Use environment variable PGPLOT_FONT to specify the location of the PGPLOT grfont.dat file.
Displaying 200 x 200 image from 1 to 142.421356201172, using 240 colors (16-255)...
pdl> $ENV{PGPLOT_FONT} = "C:/Strawberry/perl/site/lib/PGPLOT/pgplot_supp"
pdl> imag(rvals(200,200)+1)
Displaying 200 x 200 image from 1 to 142.421356201172, using 240 colors (16-255)...
pdl>
After translating from French I can see that you don't have diff in your system. Either install diff (part of gnu32: http://gnuwin32.sourceforge.net/) or just skip the tests. See also:
https://github.com/ingydotnet/inline-c-pm/issues/60
With Strawberry 5.24.1 simply type the following from the command prompt:
cpanm --notest PDL
or if you want to watch everything that's going on:
cpanm -v --notest PDL
This will take some time to run.

PLR Installation on Mac Lion

I am trying to install PL/R 8.3.0.13.1 on my MacBook Pro running OS X 10.7.5, Postgres 9.2 and R 2.15.2. I have found on the web a nice step-by-step guide for Windows but I can't find anything similar for Mac.
I got stuck when I run this command [as official documentation] ( http://www.joeconway.com/plr/doc/plr-install.html ):
USE_PGXS=1 make
Output:
make: pkg-config: Command not found
make: pkg-config: Command not found
make: pkg-config: Command not found
make: pkg-config: Command not found
make: pkg-config: Command not found
*** Cannot build PL/R because R_HOME cannot be found.
*** Refer to the documentation for details.
Clearly that means I need to create somehow R_HOME, variable and/or location...
Any idea how to do it?
The error message is actually a bit confusing. If you look at the Makefile of PL/R, the logic is that it uses R_HOME to find R when set, otherwise it tries pkg-config. You have neither set, so it bails out.
I recommend going the pkg-config route if possible. The R_HOME route appears to assume an R installation scheme that might not be universally applicable. Perhaps it applies to builds straight from source.
The above applies to all platforms. Now on OS X, it depends on how you installed R. For example, if you used MacPorts, it would go something like this:
sudo port install pkgconfig
sudo port install R
and then build PL/R itself:
make USE_PGXS=1
But that will break because PL/R does not expect that MacPorts separates the R headers into two separate directories (architecture-dependent and -independent I suppose).
Homebrew might work better, but the principle is the same.
You need to figure out what you should set your PLR environment R_HOME variable. In a terminal session I get this
computername:~ username$ R RHOME #only enter stuff after"$"
/Library/Frameworks/R.framework/Resources
This is at the bottom of that page you linked to:
"Tip: R_HOME must be defined in the environment of the user under which PostgreSQL is started, before the postmaster is started. Otherwise PL/R will refuse to load. See plr_environ(), which allows examination of the environment available to the PostgreSQL postmaster process. "
This is from a webpage describing the problem and offering a fix:
To fix: Add a "R_HOME = '/usr/lib/R' " to /etc/postgresql/version/cluster/environmen
Example Fix for version 8.1:
$ sudo -s
# echo -e "\nR_HOME = '/usr/lib/R'" >> /etc/postgresql/8.1/main/environment
# exit
To Test:
$ sudo /etc/init.d/postgresql-8.1 restart
$ sudo -u postgres psql plr_test
plr_test=# select test();
test
------

Error in Installing the Cairo R Package

I am attempting to install the Cairo package in the development version of R on Mac OS X 10.7.4, but I'm running into an issue that I cannot resolve.
I have installed Cairo with homebrew (i.e., brew install cairo) and received the following message:
==> Caveats This formula is keg-only, so it was not symlinked into /usr/local.
Mac OS X already provides this program and installing another version
in parallel can cause all kinds of trouble.
The Cairo provided by Leopard is too old for newer software to link
against.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add its lib
& include paths to your build variables:
LDFLAGS -L/usr/local/Cellar/cairo/1.12.2/lib
CPPFLAGS -I/usr/local/Cellar/cairo/1.12.2/include
With the above message in mind, I attempted to install the Cairo package from R-Forge with the following R command:
install.packages("Cairo", repos="http://www.rforge.net/", configure.args = c("CAIRO_LIBS=/usr/local/Cellar/cairo/1.12.2/lib", "CAIRO_CFLAGS=/usr/local/Cellar/cairo/1.12.2/include/cairo"))
I receive the following error:
checking cairo.h usability... no
checking cairo.h presence... no
checking for cairo.h... no
configure: error: Cannot find cairo.h!
Please install cairo (http://www.cairographics.org/) and/or set
CAIRO_CFLAGS/LIBS correspondingly. ERROR: configuration failed for package ‘Cairo’
I repeated the same command without the repos argument (by default, I use the FHCRC mirror) with the same result.
At this point, the problem seems obvious: the file cairo.h is not present. But then I listed the files in the include/cairo directory. Here's the response:
ls /usr/local/Cellar/cairo/1.12.2/include/cairo
cairo-deprecated.h cairo-ft.h
cairo-ps.h
cairo-script-interpreter.h
cairo-svg.h
cairo-xcb.h
cairo-xlib.h
cairo-features.h
cairo-pdf.h
cairo-quartz.h
cairo-script.h
cairo-version.h
cairo-xlib-xrender.h
cairo.h
So, I'm pointing the installation of the Cairo package to the appropriate place, but the error persists. I have tried variations, such as CAIRO_CFLAGS=/usr/local/Cellar/cairo/1.12.2/include, with no luck.
Thoughts? Any help you can provide is greatly appreciated.
In case it's necessary, here is my sessionInfo:
R Under development (unstable) (2012-08-08 r60208) Platform: x86_64-apple-darwin11.4.0 (64-bit)
locale: [1]
en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils
datasets methods base
other attached packages: [1] BiocInstaller_1.5.12
loaded via a namespace (and not attached): [1] tools_2.16.0
I had similar issue with cairo config error, and I already installed cairo with homebrew. Try below
brew install pkg-config
This solved mine problem.
A coworker and I just fixed the problem by ignoring all of what I typed above. Rather, we installed Cairo and all of its dependencies from source manually, thereby bypassing the usage of brew or variants like port. This worked like a charm, so I am not entirely sure what was wrong above.
After trying everything listed here, I found this blog post about installing the "full R package" using brew: https://luispuerto.net/blog/2018/05/11/installing-r-with-homebrew-with-all-the-capabilities/
What finally worked for me was building R explicitly with cairo (brew's default R tap uses --without-cairo and simply editing the tap did not solve the issue for me).
Works like a charm for me with R 4.0.2, cairo 1.16.0_3 under macOS Catalina 10.15.6.

Resources