stan-dev / cmdstan

CmdStan, the command line interface to Stan
https://mc-stan.org/users/interfaces/cmdstan
BSD 3-Clause "New" or "Revised" License
212 stars 93 forks source link

Unable to install `cmdstan < 2.33.0` on Mac OS Ventura #1210

Closed cmgoold closed 1 year ago

cmgoold commented 1 year ago

Summary:

I can't install any version of cmdstan prior to 2.33.0 on my Mac OS Ventura machine.

Description:

I have been using cmdstan==2.29.2 locally, and recently ran into errors with compiling models. Re-building cmdstan via cmdstanpy.rebuild_cmdstan() doesn't work, and installing cmdstan==2.29.2 fails with:

48 warnings and 14 errors generated.
make: *** [src/cmdstan/main.o] Error 1

The full log is attached below:

cmdstan-install-fail-log.txt

I am able to install >= 2.33.0.

Reproducible Steps:

At my company, we have had some colleagues able to use 2.29.2 and others unable to install, like me. At the moment, I'm not sure it's reproducible.

Current Output:

See the log above.

Expected Output:

A successful install of older cmdstan versions, or more informative error.

Current Version:

v2.29.2/v2.33.1

mitzimorris commented 1 year ago

here's the first error:

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:607:12: error: no matching function for call to 'isinf'
    return std::isinf(__lcpp_x);
WardBrian commented 1 year ago

Can you share your Clang/libc++ versions?

cmgoold commented 1 year ago
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
WardBrian commented 1 year ago

I'm guessing this is a duplicate of https://github.com/stan-dev/cmdstan/issues/1158.

Can you try 2.32.0 and 2.32.1? The only difference between those versions was the fix for the above issue

cmgoold commented 1 year ago

@WardBrian Thanks! 2.32.1 works while 2.32.0 fails. Sorry, I only tested up to 2.32.0 before.

What I'm still unsure of is why this occurred now. To my knowledge, I hadn't changed anything locally, models just stopped compiling recently.

WardBrian commented 1 year ago

The issue would have started following an update to your compiler/toolchain. This could have been part of an OS update or done independently. If your computer is managed by someone else (e.g. company IT), it certainly could have happened without your knowing

WardBrian commented 1 year ago

Closing as a duplicate of #1158. The solution is to use cmdstan >= 2.32.1, or, if that is not possible, an older compiler toolchain for your platform