2

I'm trying to install library(Boom) for Bayesian Object Oriented Modeling and its dependencies BoomSpikeSlab, bsts. However, I always get the same response from R:

In file included from Models/Glm/MultinomialLogitModel.cpp:31:
In file included from     ../inst/include/Models/Glm/PosteriorSamplers/MLVS.hpp:25:
In file included from     ../inst/include/Models/Glm/PosteriorSamplers/MLVS_data_imputer.hpp:25:
../inst/include/Models/PosteriorSamplers/Imputer.hpp:30:10: fatal     error: 'future' file not found
#include <future>
     ^
 1 error generated.
 make: *** [Models/Glm/MultinomialLogitModel.o] Error 1
ERROR: compilation failed for package ‘Boom’
* removing ‘/usr/local/lib/R/3.2/site-library/Boom’
Warning in install.packages :
installation of package ‘Boom’ had non-zero exit status
 ERROR: dependency ‘Boom’ is not available for package ‘BoomSpikeSlab’
 * removing ‘/usr/local/lib/R/3.2/site-library/BoomSpikeSlab’
Warning in install.packages :
 installation of package ‘BoomSpikeSlab’ had non-zero exit status
 ERROR: dependencies ‘BoomSpikeSlab’, ‘Boom’ are not available for     package ‘bsts’
* removing ‘/usr/local/lib/R/3.2/site-library/bsts’
  Warning in install.packages :
installation of package ‘bsts’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/s2/9wz53mrj0vqcpj9v3zjwx6q80000gn/T/RtmpvMmIug/downloaded_packages’

I thought that might be related to my problem pip cffi package installation failed on osx

so I tried :

xcode-select --install

which resulted in:

xcode-select: Error: unknown command option '--install'.

xcode-select: Report or change the path to the active
          Xcode installation for this machine.

Usage: xcode-select --print-path
       Prints the path of the active Xcode folder
  or: xcode-select --switch <xcode_path>
       Sets the path for the active Xcode folder
  or: xcode-select --version
       Prints the version of xcode-select

How can I install the Boompackage?

I'm using Mac OSX 10.8.5 with Xcode version: 5.1.0 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin12.6.0

Community
  • 1
  • 1
Googme
  • 914
  • 7
  • 27
  • I just installed it with no problems. Is `install` documented as a permissible switch in `man xcode-select`? – Konrad Nov 22 '15 at 18:46
  • Hi, no its not. Maybe because `Xcode 5.1.0`? – Googme Nov 22 '15 at 18:58
  • 1
    Do you have a C++11 compiler installed? `std::future` is new. – Matthew Lundberg Nov 22 '15 at 19:08
  • I also had a similar missing library problem when I tried installing `imager` package. I installed `cimg-dev` and it worked. [`std::future`](http://en.cppreference.com/w/cpp/thread/future) library was added in C++11 and in turns out [`Boom`](https://cran.r-project.org/web/packages/Boom/index.html) package requires C++ 11. So it's surely a missing library problem. – narendra-choudhary Nov 22 '15 at 19:16
  • I don't think it's a library problem, but a language version problem. I am not familiar with OSX so I do not know how to select C++11 language version when R builds packages. See here: http://stackoverflow.com/questions/19089293/xcode-compiler-cannot-find-c-11-includes – Matthew Lundberg Nov 22 '15 at 19:18
  • Perhaps the edit will help. If it's not what you want, feel free to roll it back. – Matthew Lundberg Nov 22 '15 at 19:23
  • I `brew cimg` and use `clang++ -std=c++11`. Adding `cimg` doesnt change anything – Googme Nov 22 '15 at 21:13
  • @MatthewLundberg: Xcode has shipped with a version of `clang` which fully supports C++11 for about 5 years. This is almost certainly due to the missing `--std=c++11` flag. – marko Nov 22 '15 at 23:09
  • I'm still fighting "the Boom problem" http://stackoverflow.com/questions/36034316/r-package-boom-fails-to-install-on-ubuntu-linux – Michał Mar 16 '16 at 11:26

1 Answers1

0

Well, Boom is on CRAN so it by that very construction must work with the default toolchain.

Do you have BH installed? The corresponding clang version worked for years as we added optional C++11 support in Rcpp at least as early as March 2013 (when we added support for Rcpp::plugin(cpp11).

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • Hi Dirk, thank you for that suggestion. I have installed `BH`. However, `install.packages("Boom")`results in the same output as depicted above – Googme Nov 22 '15 at 20:54
  • Yes, `dplyr`I can install. `clang++`is used. `Boom` uses `clang++ -std=c++11`. – Googme Nov 22 '15 at 21:19
  • Which is what I told you earlier: _It is on CRAN_ so it passed a pretty stringent buildability test. If it fails on your end it is _your setup_ which I would look at first. – Dirk Eddelbuettel Nov 22 '15 at 22:01
  • Until today I thought I have a rather standard setup, but 'Boom' fails to compile... Any ideas/suggestions where to look how my apparently nonstandard setup differs from the standard so that 'Boom' does not compile? ;) I looked around SO and www in general without success. – Michał Mar 16 '16 at 11:16
  • I asked a separate question http://stackoverflow.com/questions/36034316/r-package-boom-fails-to-install-on-ubuntu-linux – Michał Mar 16 '16 at 11:26