Closed GertjanBrouwer closed 17 hours ago
I recently upgraded to 24.04, but this looks like what can happen if your environment changes between builds sometimes, especially if you use a tool like Conda.
Do you get the same error on a completely fresh build? The output you provide looks like build
has been run previously
The cmdstan was cloned a couple of hours ago, I tried a couple of make
with different settings and also added CXX=gcc
to make/local in cmdstan. This is the output after running make clean
and then make examples/bernoulli/bernoulli
:
output.txt
I did not realize the output would (did not look different to me with or without make clean
)
I do not use Conda btw, is that necessary? I followed the wiki on github.
Conda is not necessary, I only mentioned it because it is common and sometimes produces similar-ish errors.
I think your issue is CXX=gcc
. The name of the GNU C++ compiler is g++
, so you'd need CC=gcc
and CXX=g++
After this I would try to make clean-all
before building again
Thank you. This solved the issue for me.
Great!
Description:
For the repository stan-dev/stan I want to make some changes to the source. To test this, I want to use cmdstan, which I cloned recursively. When building with
make build
ormake examples/bernoulli/bernoulli
I get numerous linking(?) errors with the message "undefined reference to" to even the most basic things.Reproducible Steps:
Install Ubuntu 22.04 lts Clone cmdstan:
git clone --recursive https://github.com/stan-dev/cmdstan.git
runmake build
ormake examples/bernoulli/bernoulli
Current Output:
output.txt
Additional Information:
Compiler: GCC 11.4.0 Make: GNU Make 4.3.0
Current Version:
Develop