Not compiling with clang19
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
Models do not compile with clang19. @SteveBronder or @WardBrian do you know what this means?
Description:
From https://www.stats.ox.ac.uk/pub/bdr/clang19/AovBay.log , which like rstanarm depends on rstan, StanHeaders, etc.
In file included from stanExports_onewaymodel.cc:5:
In file included from ./stanExports_onewaymodel.h:25:
In file included from /data/gannet/ripley/R/test-clang/StanHeaders/include/src/stan/model/model_header.hpp:11:
/data/gannet/ripley/R/test-clang/StanHeaders/include/src/stan/model/model_base_crtp.hpp:140:50: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
140 | return static_cast<const M*>(this)->template write_array(
| ^
/data/gannet/ripley/R/test-clang/StanHeaders/include/src/stan/model/model_base_crtp.hpp:209:50: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
209 | return static_cast<const M*>(this)->template write_array(
| ^
Reproducible Steps:
Try to compile a model with clang19
Current Output:
None
Expected Output:
A compiled stanmodel object
RStan Version:
2.31.x
R Version:
4.4.x
Operating System:
Linux
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the clang19 model compilation using the linked AovBay.log and inspect StanHeaders/include/src/stan/model/model_base_crtp.hpp at the reported write_array calls. Trace the includes from stanExports_onewaymodel.cc through stanExports_onewaymodel.h, then verify that an RStan 2.31.x model produces a compiled stanmodel object without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, r
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100