rstan icon indicating copy to clipboard operation
rstan copied to clipboard

Just updated to R 4.03 from 4.02 and I cant compile anymore

Open johnsonrd58 opened this issue 4 years ago • 9 comments

Error in cleanup_makevar(old) : argument "RMU" is missing, with no default In addition: Warning message: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) : '-E' not found

Expected Output:

If applicable, the output you expected from RStan.

RStan Version:

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

R Version:

The version of R you are running (e.g., from R.version.string)

Operating System:

Your operating system (e.g., OS X 10.11.3)

johnsonrd58 avatar Dec 01 '20 18:12 johnsonrd58

Sorry you're getting an error.

Error in cleanup_makevar(old) : argument "RMU" is missing, with no default

Hmm, I don't know much about Windows (I'm assuming you're on Windows since I think this error only happens on Windows) but this looks like the same issue reported on the Stan forum here: https://discourse.mc-stan.org/t/new-error-cleanup-makevar-old-argument-rmu-is-missing-with-no-default/18137. I think there are some workarounds in that thread, but if they don't work for you I recommend posting a follow up on the forum where you'll get more eyes on your question.

In addition: Warning message: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) : '-E' not found

This warning can safely be ignored and will be removed in the next release.

jgabry avatar Dec 01 '20 18:12 jgabry

I found a solution and this worked.

file.rename("~/.R/Makevars.win", "~/.R/Makevars.win.bak")

just forward this solution to any who get the error as it seems to work. It should make life easier when you get another person with the same error

Robert D. Johnson, Ph.D [cid:[email protected]] Procter & Gamble Mason Business Center 8700 Mason Montgomery Road [email protected]mailto:[email protected] (513) 634-9827

COVID19: I wish it need not have happened in my time and So do all who live to see such times. All we have to decide is what to do with the time that is given us

From: Jonah Gabry [email protected] Sent: Tuesday, December 1, 2020 1:40 PM To: stan-dev/rstan [email protected] Cc: Johnson, Robert [email protected]; Author [email protected] Subject: Re: [stan-dev/rstan] Just updated to R 4.03 from 4.02 and I cant compile anymore (#878)

Sorry you're getting an error.

Error in cleanup_makevar(old) : argument "RMU" is missing, with no default

Hmm, I don't know much about Windows (I'm assuming you're on Windows since I think this error only happens on Windows) but this looks like the same issue reported on the Stan forum here: https://discourse.mc-stan.org/t/new-error-cleanup-makevar-old-argument-rmu-is-missing-with-no-default/18137. I think there are some workarounds in that thread, but if they don't work for you I recommend posting a follow up on the forum where you'll get more eyes on your question.

In addition: Warning message: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) : '-E' not found

This warning can safely be ignored and will be removed in the next release.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/rstan/issues/878#issuecomment-736742524, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD6MJ6HI6JTK3WXY6A3BUADSSUZ73ANCNFSM4UJL6HHQ.

johnsonrd58 avatar Dec 01 '20 19:12 johnsonrd58

@pkpddude I realized that the solution of renaming the Makevars file has a downside: you lose some speedups that you get from some optimizations like -O3 enabled in the Makevars file (if you had them enabled). So your RStan will run slower than if you still had your Makevars file. If you want to avoid that here's another option: keep your original Makevars file (reverse the renaming you did) and then install the latest development version of RStan from github where the error you were getting should be fixed:

# this will install from source (and compile a bunch of stuff) and not from binary like on CRAN so it will take longer
remotes::install_github("stan-dev/rstan", ref = "develop", 
                        subdir = "rstan/rstan", build_opts = "")

jgabry avatar Dec 01 '20 23:12 jgabry

Thanks I will try that today

Robert D. Johnson, Ph.D [cid:[email protected]] Procter & Gamble Mason Business Center 8700 Mason Montgomery Road [email protected]mailto:[email protected] (513) 634-9827

COVID19: I wish it need not have happened in my time and So do all who live to see such times. All we have to decide is what to do with the time that is given us

From: Jonah Gabry [email protected] Sent: Tuesday, December 1, 2020 6:37 PM To: stan-dev/rstan [email protected] Cc: Johnson, Robert [email protected]; Mention [email protected] Subject: Re: [stan-dev/rstan] Just updated to R 4.03 from 4.02 and I cant compile anymore (#878)

@pkpddudehttps://github.com/pkpddude I realized that the solution of renaming the Makevars file has a downside: you lose some speedups that you get from some optimizations like -O3 enabled in the Makevars file (if you had them enabled). So your RStan will run slower than if you still had your Makevars file. If you want to avoid that here's another option: keep your original Makevars file (reverse the renaming you did) and then install the latest development version of RStan from github where the error you were getting should be fixed:

this will install from source (and compile a bunch of stuff) and not from binary like on CRAN so it will take longer

remotes::install_github("stan-dev/rstan", ref = "develop",

                    subdir = "rstan/rstan", build_opts = "")

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/rstan/issues/878#issuecomment-736889519, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD6MJ6D44FDB5UEV4NGW2XTSSV4YDANCNFSM4UJL6HHQ.

johnsonrd58 avatar Dec 02 '20 11:12 johnsonrd58

@jgabry I tried installing the latest development version of RStan from github, but unfortunately, I keep on getting the same error message too:

Error in cleanup_makevar(old) : argument "RMU" is missing, with no default In addition: Warning messages: 1: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) : '-E' not found 2: In readLines(file.path(makevar_files)) : incomplete final line found on 'C:/Users/petros/Documents/.R/Makevars.win' 3: In readLines(old_path) : incomplete final line found on 'C:/Users/petros/Documents/.R/Makevars.win'

pcsksa5 avatar Feb 11 '21 12:02 pcsksa5

To fix this, follow the instructions in the Getting Started guide here

andrjohns avatar Feb 11 '21 13:02 andrjohns

Thank you, @andrjohns. The fix worked just fine.

pcsksa5 avatar Feb 11 '21 14:02 pcsksa5

Great to hear!

andrjohns avatar Feb 11 '21 14:02 andrjohns

I agree that the fix works, but it is difficult to maintain. Any progress who to blame?

dmenne avatar Feb 19 '21 08:02 dmenne