stan-dev / stan-dev/rstan

Rstan should reset environment variables it sets

Open
#1,136 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

See https://github.com/nlmixr2/nlmixr2/issues/253.

Rstan sets some environement variables: PKG_CPPFLAGS, PKG_LIBS and USE_CXX17. These variables interfere with other R packages using R CMD SHLIB, such as nlmixr2, and make them unable to run.

The fix is obvious: rstan should reset these changes after building a model.

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 tracing the RStan model-building path that sets PKG_CPPFLAGS, PKG_LIBS, and USE_CXX17, using the linked nlmixr2 issue for context. Confirm how these variables are changed during a build and verify that they are restored afterward so subsequent R CMD SHLIB builds are unaffected.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.