google / CausalImpact

An R package for causal inference in time series
Apache License 2.0
1.71k stars 254 forks source link

Error during installation - fails to install bsts #57

Open brieh opened 2 years ago

brieh commented 2 years ago

Hi there,

I'm installing Causal Impact in R for the first time.

Installation fails because installation of bsts fails:

* installing *source* package 'bsts' ...
** package 'bsts' successfully unpacked and MD5 sums checked
** using staged installation
** libs

*** arch - i386
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I`C:/PROGRA~1/R/R-36~1.1/bin/Rscript -e "cat(system.file(package='Boom'))"`/include -DADD_ -DR_NO_REMAP -DRLANGUAGE -I"C:/Program Files/R/R-3.6.1/library/Boom/include"        -O2 -Wall  -mtune=generic -c aggregate_time_series.cc -o aggregate_time_series.o
g++.exe: error: Files/R/R-3.6.1/library/Boom/include: No such file or directory
make: *** [C:/PROGRA~1/R/R-36~1.1/etc/i386/Makeconf:213: aggregate_time_series.o] Error 1
ERROR: compilation failed for package 'bsts'
* removing 'C:/Program Files/R/R-3.6.1/library/bsts'

It says "No such file or directory" for C:/Program Files/R/R-3.6.1/library/Boom/include (or does it?) but this folder exists and has plenty of stuff in it.

Here is my sessionInfo():

R version 3.6.1 (2019-07-05)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252    LC_MONETARY=English_Canada.1252 LC_NUMERIC=C                    LC_TIME=English_Canada.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] hash_2.2.6.1  ROracle_1.3-1 DBI_1.1.1    

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1 

Any suggestions would be greatly appreciated.

steve-the-bayesian commented 2 years ago

Hi Brie, What happens if you just call install.packages("bsts") from inside R? Looks like you're running cygwin, so you're on a windows box. I'd think R would grab the prebuilt version from CRAN, so you wouldn't need the compiler to get involved.

On Thu, Jan 27, 2022 at 12:19 PM Brie Hoffman @.***> wrote:

Hi there,

I'm installing Causal Impact in R for the first time.

Installation fails because installation of bsts fails:

  • installing source package 'bsts' ... package 'bsts' successfully unpacked and MD5 sums checked using staged installation ** libs

arch - i386 C:/Rtools/mingw32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -IC:/PROGRA~1/R/R-36~1.1/bin/Rscript -e "cat(system.file(package='Boom'))"/include -DADD -DR_NO_REMAP -DRLANGUAGE -I"C:/Program Files/R/R-3.6.1/library/Boom/include" -O2 -Wall -mtune=generic -c aggregate_time_series.cc -o aggregate_time_series.o g++.exe: error: Files/R/R-3.6.1/library/Boom/include: No such file or directory make: [C:/PROGRA~1/R/R-36~1.1/etc/i386/Makeconf:213: aggregate_time_series.o] Error 1 ERROR: compilation failed for package 'bsts'

  • removing 'C:/Program Files/R/R-3.6.1/library/bsts'

It says "No such file or directory" for C:/Program Files/R/R-3.6.1/library/Boom/include (or does it?) but this folder exists and has plenty of stuff in it.

Here is my sessionInfo():

R version 3.6.1 (2019-07-05) Platform: i386-w64-mingw32/i386 (32-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale: [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252 LC_NUMERIC=C LC_TIME=English_Canada.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] hash_2.2.6.1 ROracle_1.3-1 DBI_1.1.1

loaded via a namespace (and not attached): [1] compiler_3.6.1 tools_3.6.1

Any suggestions would be greatly appreciated.

— Reply to this email directly, view it on GitHub https://github.com/google/CausalImpact/issues/57, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMVDVOJ65BVNUKLLTYJTKTUYGSGNANCNFSM5M66JTQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

brieh commented 2 years ago

Sorry should've included this part in the original post. This is what I get and I'm asked if I want to install from sources:

> install.packages("bsts")

  There is a binary version available but the source version is later:
     binary source needs_compilation
bsts  0.9.6  0.9.7              TRUE

installing the source package ‘bsts’

trying URL 'https://cran.rstudio.com/src/contrib/bsts_0.9.7.tar.gz'
Content type 'application/x-gzip' length 298345 bytes (291 KB)
downloaded 291 KB

'\\MYHOMEDIR\ONMY\WORKCOMPUTER$'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
* installing *source* package 'bsts' ...
** package 'bsts' successfully unpacked and MD5 sums checked
** using staged installation
** libs

*** arch - i386
C:/Rtools/mingw_32/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG -I`C:/PROGRA~1/R/R-36~1.1/bin/Rscript -e "cat(system.file(package='Boom'))"`/include -DADD_ -DR_NO_REMAP -DRLANGUAGE -I"C:/Program Files/R/R-3.6.1/library/Boom/include"        -O2 -Wall  -mtune=generic -c aggregate_time_series.cc -o aggregate_time_series.o
g++.exe: error: Files/R/R-3.6.1/library/Boom/include: No such file or directory
make: *** [C:/PROGRA~1/R/R-36~1.1/etc/i386/Makeconf:213: aggregate_time_series.o] Error 1
ERROR: compilation failed for package 'bsts'
* removing 'C:/Program Files/R/R-3.6.1/library/bsts'
Warning in install.packages :
  installation of package ‘bsts’ had non-zero exit status
brieh commented 2 years ago

Okay, answering "No" to the question of whether I want to install from sources caused it to install with no problem. Consider this closed. Thank you for your time.

steve-the-bayesian commented 2 years ago

Great. You won't need the cutting edge of bsts to do CausalImpact. Glad you're up and running.

On Thu, Jan 27, 2022 at 2:24 PM Brie Hoffman @.***> wrote:

Okay, answering "No" to the question of whether I want to install from sources caused it to install with no problem. Consider this closed. Thank you for your time.

— Reply to this email directly, view it on GitHub https://github.com/google/CausalImpact/issues/57#issuecomment-1023697636, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMVDVLXBAJMGF7U24WN6YLUYHAYNANCNFSM5M66JTQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>