stan-dev / stan-dev/rstan

Warning - 'config' variable 'CPP' is deprecated

Open
#862 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Summary:

After encountering #774 and installing this version of rstan I get a 'config' variable 'CPP' is deprecated warning message / error. I think this is happening here. It looks like this was depreciated in R 3.6.2: https://cran.r-project.org/bin/windows/base/old/3.6.2/NEWS.R-3.6.2.html

Everything Stan related still works as it should, but it makes some of my package's tests fail.

Reproducible Steps:
library(rstan)

res <- stan_model(
  model_code = "data {} parameters {real x;} model {x ~ std_normal();}"
)

gives :

 'config' variable 'CPP' is deprecated
clang -mmacosx-version-min=10.13 -E
Warning message:
In system(paste(CPP, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
  error in running command
RStan Version:

‘2.21.3’, 27a744a

R Version:

"R version 4.0.3 (2020-10-10)"

Operating System:

OS X 10.15.7

clang info
$ clang --version
Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the warning with the stan_model example on R 4.0.3 and macOS, then inspect the config handling at rstan/rstan/R/stanc.R lines 123-124. Verify that the model still compiles and the deprecated CPP warning and command error no longer appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.