Problems running CmdStan's basic examples

Hi everyone!
I am trying to run some examples available in a fork of cmdstan that uses also PETSc (Using PETSc library together with Stan - #6 by IvanYashchuk). The CmdStan version inside it is 2.24.0.
I am using a cluster with Ubuntu 14.04.6 LTS (GNU/Linux 3.13.0-44-generic x86_64). My g++ version is 5.3.1 and the output of make --version is GNU Make 3.81. From the user guide the version should be fine.
I have a warning while building, it says the following:
cc1: warning: command line option ‘-std=gnu++14’ is valid for C++/ObjC++ but not for C
Should I put something more specific inside my make/local before building?

In principle this is only a warning, but I am having troubles compiling the basic examples provided and I do not know where to look at. The errors I have are all identical:

examples/bernoulli/bernoulli.hpp:59:13: error: ‘profile_map’ in namespace ‘stan::math’ does not name a type
stan::math::profile_map profiles__;

I tried also to remove the GitHub clone and download the package again but it is not working. Does someone know if, after removing the folder (with rm -rf namefolder), something remains in other directories and may cause errors (I did also make clean-all before removing)?
It is very odd because I am having the same errors also running these examples on my personal machine (macOS 11.1). The only thing that changes is that on my computer I do not have warnings while building.
I would very much appreciate if someone could help me somehow.
Francesco

Hi,

the problem there is that is a clone of cmdstan and will thus use the latest stanc3 binary.

Download the 2.24.1 version here: Release v2.24.1 (11 August 2020) · stan-dev/stanc3 · GitHub

Download the binary for your OS. For example if you have linux download linux-stanc, rename it to stanc and replace the stanc file in bin/.

Hi,
Many thanks, that solved the problem.
Have a good day.
Francesco

2 Likes