# Issues with CmdStan install on macOS Ventura w/ Intel chip

**URL:** <https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327>\
**Category:** CmdStan\
**Created:** [November 2, 2022, 6:50pm UTC](https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327 "2022-11-02T18:50:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgoldberg](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jgoldberg/32/18790_2.png) [@jgoldberg](https://discourse.mc-stan.org/u/jgoldberg)\
**Post date:** [November 2, 2022, 6:50pm UTC](https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327/1 "2022-11-02T18:50:41Z")

</div>

I have an Intel-based macOS machine and have yet to resolve a path forward with `cmdstan`/`cmdstanr` after upgrading to Ventura (13.0). I’ve managed to replicate this issue on two different computers (both Intel macOS Ventura).

When I run `cmdstanr::install_cmdstan()` I get a an error at `xattr -d com.apple.quarantine bin/stanc`. From what I’ve been able to gather, the `xattr -d com.apple.quarantine bin/stanc` is attempting to change the attributes/metadata of the Stan compiler, so something is different about the way things get unpacked from GitHub by `cmdstanr::install_cmdstan()` that is unique to Intel-based macOS. Multiple people (@torkar, @Ara_Winter) have reported [no issues with Apple chips](https://discourse.mc-stan.org/t/macos/29229/4).

I’m savvy enough to follow instructions for tweaking/adapting build instructions via Terminal, but not the person to invent novel work-arounds for these kinds of issues. Grateful for any help from the community!

- Operating System: macOS Ventura (13.0)
- CmdStan Version: 2.30.1
- Compiler/Toolkit: GitHub via CmdStanR

---

<div class="post-metadata">

**Author:** ![andrjohns](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/andrjohns/32/15297_2.png) [@andrjohns](https://discourse.mc-stan.org/u/andrjohns)\
**Post date:** [November 3, 2022, 6:16am UTC](https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327/2 "2022-11-03T06:16:56Z")

</div>

Can you post the error you get from that command?

---

<div class="post-metadata">

**Author:** ![jgoldberg](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jgoldberg/32/18790_2.png) [@jgoldberg](https://discourse.mc-stan.org/u/jgoldberg)\
**Post date:** [November 3, 2022, 2:56pm UTC](https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327/3 "2022-11-03T14:56:54Z")

</div>

Sure, @andrjohns . The error I get from that command in particular is `xattr: bin/stanc: No such xattr: com.apple.quarantine`. I’ll go ahead and include my full R console output for reference:

```nohighlight
> cmdstanr::install_cmdstan()
The C++ toolchain required for CmdStan is setup properly!
* Latest CmdStan release is v2.30.1
* Installing CmdStan v2.30.1 in /Users/pokey54/.cmdstan/cmdstan-2.30.1
* Downloading cmdstan-2.30.1.tar.gz from GitHub...
* Download complete
* Unpacking archive...
* Building CmdStan binaries...
cp bin/mac-stanc bin/stanc
clang++ -pipe -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1/src/nvector/serial/nvector_serial.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/nvector/serial/nvector_serial.o
chmod +x bin/stanc
xattr -d com.apple.quarantine bin/stanc
xattr: bin/stanc: No such xattr: com.apple.quarantine
make: *** [bin/stanc] Error 1
make: *** Waiting for unfinished jobs....

Warning message:
There was a problem during installation. See the error message(s) above. 

```

And here’s the details for my R session, although the error above manifests with slight modifications of packages loaded, etc.

```nohighlight
> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.0

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base     

loaded via a namespace (and not attached):
[1] compiler_4.2.1 cli_3.4.1 tools_4.2.1   

```

---

<div class="post-metadata">

**Author:** ![GracoRoza](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/gracoroza/32/15419_2.png) [@GracoRoza](https://discourse.mc-stan.org/u/GracoRoza)\
**Post date:** [November 16, 2022, 4:29pm UTC](https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327/4 "2022-11-16T16:29:42Z")

</div>

Hi,

I am just echoing the question because I am having the exact same issue.

Is there some incompatibility between CmdStan and the OS Ventura?

```nohighlight
cp bin/mac-stanc bin/stanc
arch -arch arm64e clang++ -pipe -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1/src/nvector/serial/nvector_serial.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/nvector/serial/nvector_serial.o
arch -arch arm64e clang++ -pipe -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_math.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_math.o
arch -arch arm64e clang++ -pipe -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvodea.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvodea.o
chmod +x bin/stanc
xattr -d com.apple.quarantine bin/stanc
xattr: bin/stanc: No such xattr: com.apple.quarantine
make: *** [bin/stanc] Error 1
make: *** Waiting for unfinished jobs....

Warning message:
There was a problem during installation. See the error message(s) above. 

```

```nohighlight
R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS 13.0

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base     

loaded via a namespace (and not attached):
[1] compiler_4.2.0 tools_4.2.0  

```

---

<div class="post-metadata">

**Author:** ![GracoRoza](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/gracoroza/32/15419_2.png) [@GracoRoza](https://discourse.mc-stan.org/u/GracoRoza)\
**Post date:** [November 16, 2022, 4:40pm UTC](https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327/5 "2022-11-16T16:40:16Z")

</div>

The issue seems to be related to Rstudio. I managed to run with no errors by using R directly.

---

<div class="post-metadata">

**Author:** ![jgoldberg](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jgoldberg/32/18790_2.png) [@jgoldberg](https://discourse.mc-stan.org/u/jgoldberg)\
**Post date:** [November 16, 2022, 4:49pm UTC](https://discourse.mc-stan.org/t/issues-with-cmdstan-install-on-macos-ventura-w-intel-chip/29327/6 "2022-11-16T16:49:47Z")

</div>

This particular issues seems to be a bit more pervasive than my description of the problem. This [thread](https://discourse.mc-stan.org/t/unable-to-install-cmdstanr-on-mac-ventura-m1-macbook-air/29471/11) seems to bump into the same issue, however, it seems like `cmdstan`/`cmdstanr`will run (with some warning that can be safely ignored). It seems like this issue will go away with the next release.

Good to know that install via R directly will work without warnings or errors!
