stan-dev / rstan

RStan, the R interface to Stan
https://mc-stan.org
1.04k stars 269 forks source link

Updated R to 3.6 and all hell broke loose #653

Open schwa021 opened 5 years ago

schwa021 commented 5 years ago

Summary:

Updated R and Rstudio, and all hell broke loose

Description:

I've been running the rethinking package, which uses rstan, for about 6 months - no problem. I updated R today, and all of a sudden things have gone haywire.

I uninstalled and re-installed rstan (and all other packages, for that matter), including updating Rtools. No luck. When I try to run the schools example directly from the Rstan "getting started" page, I get the error listed below

The C++ toolchain passes the test I have also tried disabling the C++ toolchain configuration (which is noted to sometimes cause problems). No luck. Exact same issue.

I have de-installed and re-installed from scratch (R, then Rstan, then other toolboxes), but still no luck.

Any advice would be GREATLY appreciated. BTW - I'm just an ordinary scientist, not a developer or c-scientist ...so I would appreciate advice being "dummed down" as much as possible. TIA

Reproducible Steps:

Followed the steps on the Get Started page EXACTLY

Current Output:

Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! In file included from C:/Users/schwa/Documents/R/win-library/3.6/BH/include/boost/random/detail/integer_log2.hpp:19:0, from C:/Users/schwa/Documents/R/win-library/3.6/BH/include/boost/random/detail/int_float_pair.hpp:26, from C:/Users/schwa/Documents/R/win-library/3.6/BH/include/boost/random/exponential_distribution.hpp:27, from C:/Users/schwa/Documents/R/win-library/3.6/BH/include/boost/random/gamma_distribution.hpp:25, from C:/Users/schwa/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_rng.hpp:5, from C:/Users/schwa/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/mat.hpp:276, from C:/Users/schwa/Documents/R/win-library/3.6/StanHeaders/include/stan/math/rev/mat.hpp:12, from C:/Users/schwa/Documents/R/win-library/3.6/StanHeaders/include/stan/math.hpp:4,

Error in sink(type = "output") : invalid connection

Expected Output:

RStan Version:

The version of RStan you are running (e.g., from packageVersion("rstan"))

R Version:

2.18.12

Operating System:

Windows 10

ghost commented 5 years ago

This looks like a duplicate of several existing issues but your error output is slightly different. Would you try this: https://github.com/stan-dev/rstan/issues/633#issuecomment-491558135?

And ANY ADVICE responses might be to downgrade R. Or install a VM and use Ubuntu. (Admittedly not great answers!)

bgoodri commented 5 years ago

Just do

install.packages(" https://win-builder.r-project.org/OP272u474CMQ/rstan_2.19.1.zip", repos = NULL)

On Fri, Jun 7, 2019 at 6:06 PM schwa021 notifications@github.com wrote:

Summary:

Updated R and Rstudio, and all hell broke loose Description:

I've been running the rethinking package, which uses rstan, for about 6 months - no problem. I updated R today, and all of a sudden things have gone haywire.

I uninstalled and re-installed rstan (and all other packages, for that matter), including updating Rtools. No luck. When I try to run the schools example directly from the Rstan "getting started" page, I get the error listed below

The C++ toolchain passes the test I have also tried disabling the C++ toolchain configuration (which is noted to sometimes cause problems). No luck. Exact same issue.

I have de-installed and re-installed from scratch (R, then Rstan, then other toolboxes), but still no luck.

Any advice would be GREATLY appreciated. BTW - I'm just an ordinary scientist, not a developer or c-scientist ...so I would appreciate advice being "dummed down" as much as possible. TIA Reproducible Steps:

Followed the steps on the Get Started page EXACTLY Current Output:

Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! In file included from C:/Users/schwa/Documents/R/win-library/3.6/BH/include/boost/random/detail/integer_log2.hpp:19:0, from C:/Users/schwa/Documents/R/win-library/3.6/BH/include/boost/random/detail/int_float_pair.hpp:26, from C:/Users/schwa/Documents/R/win-library/3.6/BH/include/boost/random/exponential_distribution.hpp:27, from C:/Users/schwa/Documents/R/win-library/3.6/BH/include/boost/random/gamma_distribution.hpp:25, from C:/Users/schwa/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_rng.hpp:5, from C:/Users/schwa/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/mat.hpp:276, from C:/Users/schwa/Documents/R/win-library/3.6/StanHeaders/include/stan/math/rev/mat.hpp:12, from C:/Users/schwa/Documents/R/win-library/3.6/StanHeaders/include/stan/math.hpp:4,

Error in sink(type = "output") : invalid connection Expected Output: RStan Version:

The version of RStan you are running (e.g., from packageVersion("rstan")) R Version:

2.18.12 Operating System:

Windows 10

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/653?email_source=notifications&email_token=AAZ2XKTX4RTUITHKUHFWSP3PZLLVVA5CNFSM4HV4GWZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GYLCP3Q, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ2XKRIAPJG654SGXDNS2DPZLLVVANCNFSM4HV4GWZA .

schwa021 commented 5 years ago

This looks like a duplicate of several existing issues but your error output is slightly different. Would you try this: #633 (comment)?

And ANY ADVICE responses might be to downgrade R. Or install a VM and use Ubuntu. (Admittedly not great answers!)

This did solve the problem. Thanks. https://github.com/stan-dev/rstan/issues/633#issuecomment-491558135

bgoodri commented 5 years ago

Just do

install.packages(" https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip", repos = NULL)

On Thu, Jun 20, 2019 at 10:13 AM schwa021 notifications@github.com wrote:

This looks like a duplicate of several existing issues but your error output is slightly different. Would you try this: #633 (comment) https://github.com/stan-dev/rstan/issues/633#issuecomment-491558135?

And ANY ADVICE responses might be to downgrade R. Or install a VM and use Ubuntu. (Admittedly not great answers!)

This did solve the problem. Thanks.

633 (comment)

https://github.com/stan-dev/rstan/issues/633#issuecomment-491558135

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/653?email_source=notifications&email_token=AAZ2XKQSCGCOIQSIGBSJLIDP3OF77A5CNFSM4HV4GWZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYFRESY#issuecomment-504042059, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ2XKSUU74NF7FBRJLBO5LP3OF77ANCNFSM4HV4GWZA .

schwa021 commented 5 years ago

Just do install.packages(" https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip", repos = NULL) On Thu, Jun 20, 2019 at 10:13 AM schwa021 @.***> wrote: This looks like a duplicate of several existing issues but your error output is slightly different. Would you try this: #633 (comment) <#633 (comment)>? And ANY ADVICE responses might be to downgrade R. Or install a VM and use Ubuntu. (Admittedly not great answers!) This did solve the problem. Thanks. #633 (comment) <#633 (comment)> — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#653?email_source=notifications&email_token=AAZ2XKQSCGCOIQSIGBSJLIDP3OF77A5CNFSM4HV4GWZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYFRESY#issuecomment-504042059>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ2XKSUU74NF7FBRJLBO5LP3OF77ANCNFSM4HV4GWZA .

Could you please explain what this is/does? I'm a research scientist - not a comp sci person - so dumbing it down a bit would help. Thanks.

bgoodri commented 5 years ago

install.packages(" https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip", repos = NULL)

installs what will become the next version of rstan (version 2.19.1) where problem you described does not arise.

philophthalmus commented 5 years ago

Dear bgoodri

install.packages(" https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip", repos = NULL) installs what will become the next version of rstan (version 2.19.1) where problem you described does not arise.

I'm using stan 2.18.2 on a linux server and I have the same problem since the server installed R3.6. Your suggestion to install zip file ends with the following error message.

Installing package into ‘/server1/user/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
Warning: invalid package ‘ https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip’
Error: ERROR: no packages specified
Warning message:
In install.packages(" https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip",  :
  installation of package ‘ https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip’ had non-zero exit status

Thank you for your help on this.

bgoodri commented 5 years ago

Try

install.packages(" https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip", repos = NULL)

On Tue, Jul 2, 2019 at 3:58 PM philophthalmus notifications@github.com wrote:

Dear bgoodri

install.packages(" https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip", repos = NULL) installs what will become the next version of rstan (version 2.19.1) where problem you described does not arise.

I'm using stan 2.18.2 on a linux server and I have the same problem since the server installed R3.6. Your suggestion to install zip file ends with the following error message.

Installing package into ‘/server1/user/R/x86_64-redhat-linux-gnu-library/3.6’

(as ‘lib’ is unspecified)

Warning: invalid package ‘ https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip

Error: ERROR: no packages specified

Warning message:

In install.packages(" https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip", :

installation of package ‘ https://win-builder.r-project.org/1vUk5Gxm9QqM/rstan_2.19.1.zip’ had non-zero exit status

Thank you for your help on this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/653?email_source=notifications&email_token=AAZ2XKWWUSWRYEXSXZX46ILP5OXPBA5CNFSM4HV4GWZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZCMG5I#issuecomment-507822965, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ2XKVV5GYYO46INYK3ANTP5OXPBANCNFSM4HV4GWZA .

philophthalmus commented 5 years ago

Thank you for a quick response.

Unfortunately, I get the same invalid package error:

 install.packages("
+ https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip", repos =
+ NULL)
Installing package into ‘/server1/user/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
Warning: invalid package ‘ https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip’
Error: ERROR: no packages specified
Warning message:
In install.packages("\nhttps://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip",  :
  installation of package ‘
https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip’ had non-zero exit status
bgoodri commented 5 years ago

I think it added a hidden space or newline character before the https.

On Tue, Jul 2, 2019 at 4:03 PM philophthalmus notifications@github.com wrote:

Thank you for a quick response.

Unfortunately, I get the same invalid package error: `> install.packages("

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/653?email_source=notifications&email_token=AAZ2XKWWGNM75CCVQIMG2QDP5OYAXA5CNFSM4HV4GWZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZCMSQI#issuecomment-507824449, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ2XKXOZLEGDU6N4HB7BK3P5OYAXANCNFSM4HV4GWZA .

philophthalmus commented 5 years ago

Thank you for taking me through this.

I was able to download the file, however, I'm faced with this following error:


> install.packages("https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip", repos = NULL)
Installing package into ‘/server1/user/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip'
Content type 'application/x-zip-compressed' length 4673798 bytes (4.5 MB)
==================================================
downloaded 4.5 MB

Error in rawToChar(block[seq_len(ns)]) : 
  embedded nul in string: 'PK\003\004\n\0\0\0\0\0ݥ\xe2N\0\0\0\0\0\0\0\0\0\0\0\0\006\0\0\0rstan/PK\003\004\024\0\002\0\b\0ͥ\xe2N\n\x91\x8a# \001\0\0\x90\002\0\0\016\0\0\0rstan/CITATION\x95R\xcdN\x840\020\xbe\xf3\024\x93\xc6CI\0204\xf1D\xb2\xb7'
Warning message:
In install.packages("https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip",  :
  installation of package ‘/tmp/Rtmpqu1LSO/downloaded_packages/rstan_2.19.1.zip’ had non-zero exit status
bgoodri commented 5 years ago

I have never seen anything like that. You might try going to

https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip

in a web browser to download the file to the disk and then install that via the Tools menu.

On Tue, Jul 2, 2019 at 4:23 PM philophthalmus notifications@github.com wrote:

Thank you for taking me through this.

I was able to download the file, however, I'm face this following error:

install.packages("https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip", repos = NULL)

Installing package into ‘/server1/user/R/x86_64-redhat-linux-gnu-library/3.6’

(as ‘lib’ is unspecified)

trying URL 'https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip'

Content type 'application/x-zip-compressed' length 4673798 bytes (4.5 MB)

==================================================

downloaded 4.5 MB

Error in rawToChar(block[seq_len(ns)]) :

embedded nul in string: 'PK\003\004\n\0\0\0\0\0ݥ\xe2N\0\0\0\0\0\0\0\0\0\0\0\0\006\0\0\0rstan/PK\003\004\024\0\002\0\b\0ͥ\xe2N\n\x91\x8a# \001\0\0\x90\002\0\0\016\0\0\0rstan/CITATION\x95R\xcdN\x840\020\xbe\xf3\024\x93\xc6CI\0204\xf1D\xb2\xb7'

Warning message:

In install.packages("https://win-builder.r-project.org/0j4KTX9x8jvH/rstan_2.19.1.zip", :

installation of package ‘/tmp/Rtmpqu1LSO/downloaded_packages/rstan_2.19.1.zip’ had non-zero exit status

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/653?email_source=notifications&email_token=AAZ2XKUCCZLNAWWV2Z6KSC3P5O2KZA5CNFSM4HV4GWZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZCOCMI#issuecomment-507830577, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ2XKVEBMQPZF7D3VL7HBLP5O2KZANCNFSM4HV4GWZA .

philophthalmus commented 5 years ago

Thank you for the advice.