Error Installing Packages dependent on StanHeaders
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Hi there, I'm running into errors when compiling packages in R dependent on StanHeaders. I've pasted a small section of the error below.
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/scal/meta/index_type.hpp:28:27: error: no template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
struct index_type<T, std::enable_if_t<std::is_pointer::value>> {
~~~~~^~~~~~~~~~~
enable_if
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:538:63: note: 'enable_if' declared here
template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
19 warnings and 20 errors generated.
make: *** [stan_files/bb_with_re.o] Error 1
19 warnings and 20 errors generated.
make: *** [stan_files/bb_fixed_conc.o] Error 1
rm stan_files/bb_fixed_conc.cc stan_files/is_het.cc stan_files/bb_w_replicates.cc stan_files/bb_with_re.cc stan_files/bb.cc
Operating System:
macOS Catalina Version 10.15.6
system("R --version")
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
packageVersion("rstan")
[1] ‘2.21.3’
packageVersion("StanHeaders")
[1] ‘2.21.0.7’
system("clang++ --version")
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
readLines("~/.R/Makevars")
[1] "CXX14FLAGS += -O3 -mtune=native -arch x86_64 -ftemplate-depth-256"
Any help would be greatly appreciated. Thanks!
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
Start by reproducing the package compilation with R 4.0.3, rstan 2.21.3, StanHeaders 2.21.0.7, macOS Catalina, and Apple clang 12. Inspect the StanHeaders include path and ~/.R/Makevars alongside the reported enable_if_t errors. Done means dependent R packages compile successfully without these errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, r
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100