Error compiling a simple model with read-only access to CmdStan

未关闭
#1,175 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp
领域
build-system, cli

调研方向

使用 make ~/bernoulli 入口复现 CmdStan 2.32.2 的只读安装情况。阅读涉及 stan/src/stan/model/model_header.hpp、src/cmdstan/main.cpp 及其 .d 依赖文件的构建规则。当 CmdStan 可读但不可写时,示例模型能够成功编译,即表示完成。

由索引模型根据 Issue 内容生成。

描述

makefile
Summary:

I cannot compile Stan models if I only have read permissions to CmdStan.

Description:

I work in a large highly-regulated company with a centrally-maintained computing environment. Users are discouraged from installing their own software because of validation requirements. Our devops team installed a copy of CmdStan 2.32.2, and I cannot compile models with it because I only have read permissions.

Reproducible Steps:

With an instance of CmdStan installed by a different user, a simple make ~/bernoulli fails with the output below, where bernoulli.stan comes from the example files in CmdStan.

Current Output:

The full output is too long to include in this thread, but all the relevant output is at the beginning:

hpc /CENSORED_DIRECTORY/apps/cmdstan/cmdstan-2.32.2 make /home/CENSORED_USER/bernoulli
g++ -std=c++1y -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes      -I stan/lib/stan_math/lib/tbb_2020.3/include    -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials    -DBOOST_DISABLE_ASSERTS          -c -MT stan/src/stan/model/model_header.hpp.gch -MT stan/src/stan/model/model_header.d -MM -E -MG -MP -MF stan/src/stan/model/model_header.d stan/src/stan/model/model_header.hpp
<built-in>:0:0: fatal error: opening dependency file stan/src/stan/model/model_header.d: Permission denied
compilation terminated.
g++ -std=c++1y -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes      -I stan/lib/stan_math/lib/tbb_2020.3/include    -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials    -DBOOST_DISABLE_ASSERTS          -c -MT src/cmdstan/main.o -MM -E -MG -MP -MF src/cmdstan/main.d src/cmdstan/main.cpp
<built-in>:0:0: fatal error: opening dependency file src/cmdstan/main.d: Permission denied
compilation terminated.\
Expected Output:

I expected the model to compile successfully.

Current Version:

v2.32.2

主要语言
C++
星标
240
派生
105
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

stan-dev/cmdstan 的其他 Issue

查看 stan-dev/cmdstan 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。