1

Installation of the R package bsts on CentOS 6.3 fails with (truncated) error below. I already tried updating GCC to version 4.8.2 as suggested here. Any other suggestions?

  • installing source package ‘Boom’ ... ** package ‘Boom’ successfully unpacked and MD5 sums checked ** libs g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I. -I../inst/include -IBmath -Imath/cephes -Icblas -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DRLANGUAGE -I/usr/local/include -I"/usr/lib64/R/library/BH/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Models/Bart/Bart.cpp -o Models/Bart/Bart.o Models/Bart/Bart.cpp: In member function ‘void BOOM::Bart::VariableSummary::finalize(int, BOOM::Bart::ContinuousCutpointStrategy)’: Models/Bart/Bart.cpp:110:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (number_of_unique_values < observed_values_.size()) { ^ Models/Bart/Bart.cpp:117:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (number_of_unique_values < observed_values_.size()) { ^ Models/Bart/Bart.cpp:129:61: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (number_of_unique_values < observed_values_.size()) { ^

Lots of this:

 Models/Bart/Bart.cpp:1393:50: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (number_of_trees_to_remove >= trees_.size()) {
                                                   ^
 {standard input}: Assembler messages:
 {standard input}:71: Error: expecting string instruction after `rep'
 {standard input}:617: Error: expecting string instruction after `rep'
 {standard input}:664: Error: expecting string instruction after `rep'
 {standard input}:727: Error: expecting string instruction after `rep'
 {standard input}:790: Error: expecting string instruction after `rep'
 {standard input}:1171: Error: expecting string instruction after `rep'
 {standard input}:1180: Error: expecting string instruction after `rep'
 {standard input}:1231: Error: expecting string instruction after `rep'
 {standard input}:2704: Error: expecting string instruction after `rep'
 {standard input}:2796: Error: expecting string instruction after `rep'
 {standard input}:7412: Error: expecting string instruction after `rep'
 {standard input}:7504: Error: expecting string instruction after `rep'
 {standard input}:19481: Error: expecting string instruction after `rep'
 {standard input}:23959: Error: expecting string instruction after `rep'
 make: *** [Models/Bart/Bart.o] Error 1
 ERROR: compilation failed for package ‘Boom’
 * removing ‘/usr/lib64/R/library/Boom’
 ERROR: dependency ‘Boom’ is not available for package ‘BoomSpikeSlab’
 * removing ‘/usr/lib64/R/library/BoomSpikeSlab’
 ERROR: dependencies ‘BoomSpikeSlab’, ‘Boom’ are not available for package ‘bsts’
 * removing ‘/usr/lib64/R/library/bsts’

 The downloaded source packages are in
    ‘/tmp/Rtmpf9YQJJ/downloaded_packages’
 Updating HTML index of packages in '.Library'
 Making 'packages.html' ... done
 '/usr/lib64/R/bin/R' --vanilla CMD INSTALL  \
   '/tmp/Rtmpf9YQJJ/devtoolsa12a5ce5a465/google-CausalImpact-9c9286f'  \
   --library='/usr/lib64/R/library' --install-tests 

 ERROR: dependency ‘bsts’ is not available for package ‘CausalImpact’
 * removing ‘/usr/lib64/R/library/CausalImpact’
 Error: Command failed (1)
 In addition: Warning messages:
 1: In utils::install.packages(deps, dependencies = NA, Ncpus = threads) :
   installation of package ‘Boom’ had non-zero exit status
 2: In utils::install.packages(deps, dependencies = NA, Ncpus = threads) :
   installation of package ‘BoomSpikeSlab’ had non-zero exit status
 3: In utils::install.packages(deps, dependencies = NA, Ncpus = threads) :
   installation of package ‘bsts’ had non-zero exit status
Jaap
  • 81,064
  • 34
  • 182
  • 193
JohnSG
  • 1,567
  • 14
  • 26
  • Your problem seems to be with the Boom package. Did you check that you are downloading the most recent version? – SCallan Sep 28 '15 at 16:40
  • Yes - similar errors occur trying to load dependencies Boom and Boom SpikeSlab. I'm getting the most recent version from CRAN. Should I be looking elsewhere? – JohnSG Sep 30 '15 at 14:25
  • Hi, have you solved the issue with installing `Boom` ? If yes, may I ask how? – Googme Nov 22 '15 at 17:41
  • @Googme Sadly I haven't. I had no problems installing on Mac and Windows, so have just used those alternatives. – JohnSG Nov 24 '15 at 02:22
  • I ran into similar problems with 'Boom'. Any ideas how to solve it? This http://stackoverflow.com/questions/33858596/installing-package-on-r-need-c11-support-for-osx did not help. – Michał Mar 16 '16 at 11:14
  • thanks @Michal. it looks like you found a [solution](http://stackoverflow.com/questions/36034316/r-package-boom-fails-to-install-on-ubuntu-linux)? if you put that in here, i could accept it as an answer here. – JohnSG Mar 17 '16 at 14:24
  • Indeed I did. Answer incoming. – Michał Mar 17 '16 at 14:35

1 Answers1

0

In my case installing new versions (4.9) of C++ and Fortran compilers helped (see R package 'Boom' fails to install on Ubuntu linux, hat tip to Dirk Eddelbuettel). I had versions 4.8 earlier and they did not work.

I am not sure how to do that on CentOS, but I am sure it is possible to upgrade the compilers one way or another. The steps for Ubuntu (14.04) are:

  1. Add ubuntu-toolchain-r PPA with add-apt-repository. I additionally used pinning (https://help.ubuntu.com/community/PinningHowto) so that other packages are not automatically updated from that PPA.
  2. Install packages g++-4.9 and gfortran-4.9.
  3. Set the environment variables CXX=g++-4.9 and CXX1X=g++-4.9 in either ~/.R/Makevars or your /etc/R/Makeconf.
  4. Install 'Boom'.
Community
  • 1
  • 1
Michał
  • 2,755
  • 1
  • 17
  • 20
  • Missed that this was on Ubuntu -- doesn't help on CentOS. I did try a similar approach without success, even though I confirmed using gcc v4.8 and gfortran v4.8. I'm thinking there's something odd about my system. Will accept anyway as it may help others – JohnSG Mar 17 '16 at 18:43
  • I have updated the answer. I had 4.8 versions earlier and they did not work, so try 4.9. I am not sure how to that on CentOS unfortunately. – Michał Mar 21 '16 at 10:27
  • See here for some "partial" help how to upgrade the compilers on CentOS http://superuser.com/questions/834862/how-to-install-g-4-9-2-in-cent-os-6-5 – Michał Mar 21 '16 at 10:34