# Development branch CmdStan installation error

**URL:** <https://discourse.mc-stan.org/t/development-branch-cmdstan-installation-error/6993>\
**Category:** CmdStan\
**Created:** [December 16, 2018, 10:35pm UTC](https://discourse.mc-stan.org/t/development-branch-cmdstan-installation-error/6993 "2018-12-16T22:35:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![caesoma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/caesoma/32/19767_2.png) [@caesoma](https://discourse.mc-stan.org/u/caesoma)\
**Post date:** [December 16, 2018, 10:35pm UTC](https://discourse.mc-stan.org/t/development-branch-cmdstan-installation-error/6993/1 "2018-12-16T22:35:46Z")

</div>

I am trying to install the latest (develop) CmdStan and I am getting an error I don’t get with the 2.18 release – I am migrating from PyStan it would be extremely helpful to get json support which seems to be available only the latest version.  
I used the master branch Stan and Stan Math repos and placed them where they are found on the 2.18 archive. I had no problems building the 2.18 version (with and without -jX flag) using a Debian Windows Subsystem for Linux (WSL, a.k.a. “bash on windows”, which for all command line purposes so far worked for me just like the real thing).  
With the cmstan-develop repo I get the following error when building with `make build -j8` (and get the same error line without the -j8 flag, but with less output).

```
g++ -c src/test/test-models/stanc.cpp -o test/test-models/stanc.o`
src/test/test-models/stanc.cpp:1:41: fatal error: stan/command/stanc_helper.hpp: No such file or directory #include <stan/command/stanc_helper.hpp>                                                                                                                       
                                                       ^
compilation terminated.                

```

The files and folder structure seem to be the same (unless I’m missing something). Are there any other steps I should take to build from the develop repos? Thanks

---

<div class="post-metadata">

**Author:** ![ahartikainen](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ahartikainen/32/321_2.png) [@ahartikainen](https://discourse.mc-stan.org/u/ahartikainen)\
**Post date:** [December 16, 2018, 10:55pm UTC](https://discourse.mc-stan.org/t/development-branch-cmdstan-installation-error/6993/2 "2018-12-16T22:55:10Z")

</div>

I’m sure someone will give better answer, but I usually do

```
git clone --recursive https://github.com/stan-dev/cmdstan

```

And then

```
cd cmdstan

```

After that

```
make build -j8
```

---

<div class="post-metadata">

**Author:** ![syclik](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/syclik/32/6_2.png) [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Post date:** [December 17, 2018, 2:02am UTC](https://discourse.mc-stan.org/t/development-branch-cmdstan-installation-error/6993/3 "2018-12-17T02:02:03Z")

</div>

> [@ahartikainen](#):
>
> I’m sure someone will give better answer

Nope. That’s a good answer.

If you’ve already cloned CmdStan, then from within the CmdStan repository:

```no-highlight
git submodule update --init --recursive

```

will grab the required submodules.

---

<div class="post-metadata">

**Author:** ![increasechief](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/increasechief/32/2039_2.png) [@increasechief](https://discourse.mc-stan.org/u/increasechief)\
**Post date:** [December 17, 2018, 2:18am UTC](https://discourse.mc-stan.org/t/development-branch-cmdstan-installation-error/6993/4 "2018-12-17T02:18:59Z")

</div>

Just

`make stan-update`

will also grab those same submodules.

---

<div class="post-metadata">

**Author:** ![caesoma](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/caesoma/32/19767_2.png) [@caesoma](https://discourse.mc-stan.org/u/caesoma)\
**Post date:** [December 17, 2018, 3:26am UTC](https://discourse.mc-stan.org/t/development-branch-cmdstan-installation-error/6993/5 "2018-12-17T03:26:45Z")

</div>

I guess any answer that works well is a good answer.  
Since we are here, I have a couple more questions:

- is it straightforward to point out what generated that error when copying the Stan and Math repos separately into the interface and trying to build?

- Parallel sampling with CmdStan doesn’t require anything other than running them in the background (is the `-jN` flag required? it’s not clear to me why that’d be), but is there any downside to that compared to using a specific interface like Python’s `multiprocessing`?

- (also Threading or MPI are completely separate from that, which are for within-run threading-parallelization instead. All that is needed is to include the appropriate flags in make/local, right? )

I appreciate the responses so far. Despite not being as easy as using the interfaces, it’s being helpful to me to see what the C++ code is doing. Thanks.
