# Problem compiling stan code - error from /usr/bin/ld

**URL:** <https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018>\
**Category:** CmdStan\
**Created:** [May 3, 2024, 4:29pm UTC](https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018 "2024-05-03T16:29:57Z")\
**Posts on this page:** 6\
**Page:** 2

<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:** [May 16, 2024, 3:37pm UTC](https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018/21 "2024-05-16T15:37:25Z")

</div>

`cmdstan_version()`

---

<div class="post-metadata">

**Author:** ![kgoldfeld](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/kgoldfeld/32/6833_2.png) [@kgoldfeld](https://discourse.mc-stan.org/u/kgoldfeld)\
**Post date:** [May 16, 2024, 6:45pm UTC](https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018/22 "2024-05-16T18:45:19Z")

</div>

I just wanted to follow up and let you know that we were able to reinstall 2.34.1 properly, and things seem to be working fine. We’ll hold off on 2.35.0 until those issues get worked out. Thanks so much for all of your help.

---

<div class="post-metadata">

**Author:** ![Amael](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/amael/32/13432_2.png) [@Amael](https://discourse.mc-stan.org/u/Amael)\
**Post date:** [June 19, 2024, 11:23am UTC](https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018/23 "2024-06-19T11:23:25Z")

</div>

I also had the same problem with the version 2.35.0 and R 4.2.2:

```R
Error in !is.null(csv_contents$metadata$save_warmup) && csv_contents$metadata$save_warmup : 
  invalid 'y' type in 'x && y'

```

Updating R to the last version (4.4.1) solved the problem

---

<div class="post-metadata">

**Author:** ![HPCurtis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/hpcurtis/32/16853_2.png) [@HPCurtis](https://discourse.mc-stan.org/u/HPCurtis)\
**Post date:** [June 24, 2024, 3:32pm UTC](https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018/25 "2024-06-24T15:32:58Z")

</div>

I can confirm the same result for anyone having the same issue.

---

<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:** [June 26, 2024, 9:01am UTC](https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018/26 "2024-06-26T09:01:10Z")

</div>

You likely need to upgrade your version of cmdstanr

---

<div class="post-metadata">

**Author:** ![HPCurtis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/hpcurtis/32/16853_2.png) [@HPCurtis](https://discourse.mc-stan.org/u/HPCurtis)\
**Post date:** [June 26, 2024, 1:59pm UTC](https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018/27 "2024-06-26T13:59:03Z")

</div>

No I did upgrade Cmdstsnr but the additional update of my r version was needed overcome the issue

[Previous page](https://discourse.mc-stan.org/t/problem-compiling-stan-code-error-from-usr-bin-ld/35018.md?page=1)
