Unable to install cmdstanr on Mac ventura M1 MacBook Air

In RStudio:

> install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
Installing package into ‘/Users/andy/Library/R/arm64/4.2/library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ps’, ‘data.table’, ‘processx’

Warning in install.packages :
  unable to access index for repository https://mc-stan.org/r-packages/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://mc-stan.org/r-packages/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.2/ps_1.7.2.tgz'
Content type 'application/x-gzip' length 309645 bytes (302 KB)
==================================================
downloaded 302 KB

trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.2/data.table_1.14.4.tgz'
Content type 'application/x-gzip' length 2360008 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.2/processx_3.8.0.tgz'
Content type 'application/x-gzip' length 312935 bytes (305 KB)
==================================================
downloaded 305 KB


The downloaded binary packages are in
	/var/folders/9q/l3y9hz6j365_4drmq649dy740000gp/T//RtmpbriUTw/downloaded_packages
installing the source package ‘cmdstanr’

trying URL 'https://mc-stan.org/r-packages/src/contrib/cmdstanr_0.5.3.tar.gz'
Content type 'application/gzip' length 667799 bytes (652 KB)
==================================================
downloaded 652 KB

* installing *source* package ‘cmdstanr’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (cmdstanr)

The downloaded source packages are in
	‘/private/var/folders/9q/l3y9hz6j365_4drmq649dy740000gp/T/RtmpbriUTw/downloaded_packages’

> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.2.2  fastmap_1.1.0   cli_3.4.1       htmltools_0.5.3 tools_4.2.2     yaml_2.3.6      rmarkdown_2.18 
 [8] knitr_1.40      xfun_0.34       digest_0.6.30   rlang_1.0.6     evaluate_0.18

Operating System: Macos
Interface Version: 13.0.1
Compiler/Toolkit: N/A

If anyone can help?

Thanks

Is that the development version?

I followed the instruction from here:

Do I need to install the dev version on m1?

I don’t think so. I installed CmdStan directly. I haven’t tried going through R on my M1 running 13.0. I think someone else did but let me check for that thread.

I seems to that that it was the cmdstanr R package installation that has died. I didn’t even made it to the step of actually installing cmdstan

cmdstan you have to install manually: cmdstanr::install_cmdstan(cores=4)

1 Like

There is no error in your installation, the warning:

Warning in install.packages :
  unable to access index for repository https://mc-stan.org/r-packages/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://mc-stan.org/r-packages/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'

Is just saying that our Stan R package repo does not have binaries built for Arm MacOS, so the package is installed from source instead. Your installation has completed successfully and you can continue the steps to install cmdstan

2 Likes

FYI: I’ve now added macos arm64 binaries to our R packages repo for R 4.2, so this warning won’t appear again

EDIT: R4.1 binaries added now as well

1 Like

Thanks everyone for the help and @andrjohns for the obvious. I guess the speed of M1 + warning message convinced me there had been an error.

But I do ran into additional warning during cmdstan installation.

> cmdstanr::install_cmdstan(cores=4, overwrite = T)
The C++ toolchain required for CmdStan is setup properly!
* Latest CmdStan release is v2.30.1
* Installing CmdStan v2.30.1 in /Users/andy/.cmdstan/cmdstan-2.30.1
* Downloading cmdstan-2.30.1.tar.gz from GitHub...
* Removing the existing installation of CmdStan...
* Download complete
* Unpacking archive...
* Building CmdStan binaries...
cp bin/mac-stanc bin/stanc
clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1/src/nvector/serial/nvector_serial.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/nvector/serial/nvector_serial.o
clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_math.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_math.o
clang++ -pipe   -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT  -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT     -O3  -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvodea.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvodea.o
chmod +x bin/stanc
xattr -d com.apple.quarantine bin/stanc
xattr: bin/stanc: No such xattr: com.apple.quarantine
make: *** [bin/stanc] Error 1
make: *** Waiting for unfinished jobs....

Warning message:
There was a problem during installation. See the error message(s) above.

And then when I tried to compile some stan code/program, it worked but got the following:

model_simplex <- cmdstan_model("~/tmp/persistent_drift/test_simplex.stan")
Compiling Stan program...
ar: creating archive stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a

ar: creating archive stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a

ar: creating archive stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a

ar: creating archive stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a

In file included from src/cmdstan/main.cpp:1:
In file included from src/cmdstan/command.hpp:4:
In file included from src/cmdstan/arguments/arg_data.hpp:4:
In file included from src/cmdstan/arguments/categorical_argument.hpp:4:
In file included from src/cmdstan/arguments/argument.hpp:4:
In file included from stan/src/stan/callbacks/writer.hpp:4:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:31:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/bad_lexical_cast.hpp:28:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/throw_exception.hpp:24:
stan/lib/stan_math/lib/boost_1.78.0/boost/assert/source_location.hpp:75:14: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
        std::sprintf( buffer, ":%ld", static_cast<long>( line() ) );
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from src/cmdstan/main.cpp:1:
In file included from src/cmdstan/command.hpp:4:
In file included from src/cmdstan/arguments/arg_data.hpp:4:
In file included from src/cmdstan/arguments/categorical_argument.hpp:4:
In file included from src/cmdstan/arguments/argument.hpp:4:
In file included from stan/src/stan/callbacks/writer.hpp:4:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:31:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/bad_lexical_cast.hpp:28:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/throw_exception.hpp:24:
stan/lib/stan_math/lib/boost_1.78.0/boost/assert/source_location.hpp:80:18: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            std::sprintf( buffer, ":%ld", static_cast<long>( column() ) );
                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

In file included from src/cmdstan/main.cpp:1:
In file included from src/cmdstan/command.hpp:4:
In file included from src/cmdstan/arguments/arg_data.hpp:4:
In file included from src/cmdstan/arguments/categorical_argument.hpp:4:
In file included from src/cmdstan/arguments/argument.hpp:4:
In file included from stan/src/stan/callbacks/writer.hpp:4:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:32:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical.hpp:54:
stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical_streams.hpp:285:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin,
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from src/cmdstan/main.cpp:1:
In file included from src/cmdstan/command.hpp:4:
In file included from src/cmdstan/arguments/arg_data.hpp:4:
In file included from src/cmdstan/arguments/categorical_argument.hpp:4:
In file included from src/cmdstan/arguments/argument.hpp:4:
In file included from stan/src/stan/callbacks/writer.hpp:4:
In 
file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:32:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical.hpp:54:
stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical_streams.hpp:297:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin,
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

In file included from src/cmdstan/main.cpp:1:
In file included from src/cmdstan/command.hpp:4:
In file included from src/cmdstan/arguments/arg_data.hpp:4:
In file included from src/cmdstan/arguments/categorical_argument.hpp:4:
In file included from src/cmdstan/arguments/argument.hpp:4:
In file included from stan/src/stan/callbacks/writer.hpp:4:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:32:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical.hpp:54:
stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical_streams.hpp:310:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin,
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

In file included from src/cmdstan/main.cpp:1:
In file included from src/cmdstan/command.hpp:30:
In file included from stan/src/stan/io/dump.hpp:7:
In file included from stan/lib/stan_math/stan/math/prim.hpp:15:
In file included from stan/lib/stan_math/stan/math/prim/functor.hpp:14:
In file included from stan/lib/stan_math/stan/math/prim/functor/integrate_ode_rk45.hpp:6:
In file included from stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:9:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint.hpp:37:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp:40:
stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/integrate/max_step_checker.hpp:72:18: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            std::sprintf(error_msg, "Max number of iterations exceeded (%d).", m_max_steps);
                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

In file included from src/cmdstan/main.cpp:1:
In file included from src/cmdstan/command.hpp:30:
In file included from stan/src/stan/io/dump.hpp:7:
In file included from stan/lib/stan_math/stan/math/prim.hpp:15:
In file included from stan/lib/stan_math/stan/math/prim/functor.hpp:14:
In file included from stan/lib/stan_math/stan/math/prim/functor/integrate_ode_rk45.hpp:6:
In file included from stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:9:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint.hpp:37:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp:40:
stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/integrate/max_step_checker.hpp:104:18: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            std::sprintf(error_msg, "Max number of iterations exceeded (%d). A new step size was not found.", m_max_steps);
                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

7 warnings generated.

/Users/andy/.cmdstan/cmdstan-2.30.1/stan/lib/stan_math/lib/tbb_2020.3/build/Makefile.tbb:28: CONFIG: cfg=release arch=arm64 compiler=clang target=macos runtime=cc14.0.0_os13.0.1

../tbb_2020.3/src/tbb/arena.cpp:308:14: warning: variable 'drained' set but not used [-Wunused-but-set-variable]
    intptr_t drained = 0;
             ^

1 warning generated.

ld: warning: cannot export hidden symbol typeinfo for tbb::tbb_exception from task_group_context.o
ld: warning: cannot export hidden symbol typeinfo name for tbb::tbb_exception from task_group_context.o
ld: warning: cannot export hidden symbol typeinfo name for tbb::empty_task from arena.o
ld: warning: cannot export hidden symbol typeinfo for tbb::empty_task from arena.o
ld: warning: cannot export hidden symbol typeinfo name for tbb::empty_task from scheduler.o
ld: warning: cannot export hidden symbol typeinfo name for tbb::tbb_exception from scheduler.o
ld: warning: cannot export hidden symbol typeinfo for tbb::empty_task from scheduler.o
ld: warning: cannot export hidden symbol typeinfo for tbb::tbb_exception from scheduler.o

In file included from stan/src/stan/model/model_header.hpp:4:
In file included from stan/lib/stan_math/stan/math.hpp:19:
In file included from stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from stan/lib/stan_math/stan/math/rev/core.hpp:10:
In file included from stan/lib/stan_math/stan/math/rev/core/chainable_object.hpp:6:
In file included from stan/lib/stan_math/stan/math/rev/core/typedefs.hpp:7:
In file included from stan/lib/stan_math/stan/math/rev/core/Eigen_NumTraits.hpp:5:
In file included from stan/lib/stan_math/stan/math/prim/core.hpp:4:
In file included from stan/lib/stan_math/stan/math/prim/core/init_threadpool_tbb.hpp:6:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:31:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/bad_lexical_cast.hpp:28:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/throw_exception.hpp:24:
stan/lib/stan_math/lib/boost_1.78.0/boost/assert/source_location.hpp:75:14: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
        std::sprintf( buffer, ":%ld", static_cast<long>( line() ) );
             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

In file included from stan/src/stan/model/model_header.hpp:4:
In file included from stan/lib/stan_math/stan/math.hpp:19:
In file included from stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from stan/lib/stan_math/stan/math/rev/core.hpp:10:
In file included from stan/lib/stan_math/stan/math/rev/core/chainable_object.hpp:6:
In file included from stan/lib/stan_math/stan/math/rev/core/typedefs.hpp:7:
In file included from stan/lib/stan_math/stan/math/rev/core/Eigen_NumTraits.hpp:5:
In file included from stan/lib/stan_math/stan/math/prim/core.hpp:4:
In file included from stan/lib/stan_math/stan/math/prim/core/init_threadpool_tbb.hpp:6:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:31:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/bad_lexical_cast.hpp:28:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/throw_exception.hpp:24:
stan/lib/stan_math/lib/boost_1.78.0/boost/assert/source_location.hpp:80:18: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            std::sprintf( buffer, ":%ld", static_cast<long>( column() ) );
                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

In file included from stan/src/stan/model/model_header.hpp:4:
In file included from stan/lib/stan_math/stan/math.hpp:19:
In file included from stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from stan/lib/stan_math/stan/math/rev/core.hpp:10:
In file included from stan/lib/stan_math/stan/math/rev/core/chainable_object.hpp:6:
In file included from stan/lib/stan_math/stan/math/rev/core/typedefs.hpp:7:
In file included from stan/lib/stan_math/stan/math/rev/core/Eigen_NumTraits.hpp:5:
In file included from stan/lib/stan_math/stan/math/prim/core.hpp:4:
In file included from stan/lib/stan_math/stan/math/prim/core/init_threadpool_tbb.hpp:6:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:32:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical.hpp:54:
stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical_streams.hpp:285:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin,
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from stan/src/stan/model/model
_header.hpp:4:
In file included from stan/lib/stan_math/stan/math.hpp:19:
In file included from stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from stan/lib/stan_math/stan/math/rev/core.hpp:10:
In file included from stan/lib/stan_math/stan/math/rev/core/chainable_object.hpp:6:
In file included from stan/lib/stan_math/stan/math/rev/core/typedefs.hpp:7:
In file included from stan/lib/stan_math/stan/math/rev/core/Eigen_NumTraits.hpp:5:
In file included from stan/lib/stan_math/stan/math/prim/core.hpp:4:
In file included from stan/lib/stan_math/stan/math/prim/core/init_threadpool_tbb.hpp:6:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:32:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical.hpp:54:
stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical_streams.hpp:297:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin,
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
-
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
In file included from stan/src/stan/model/model_header.hpp:4:
In file included from stan/lib/stan_math/stan/math.hpp:19:
In file included from stan/lib/stan_math/stan/math/rev.hpp:8:
In file included from stan/lib/stan_math/stan/math/rev/core.hpp:10:
In file included from stan/lib/stan_math/stan/math/rev/core/chainable_object.hpp:6:
In file included from stan/lib/stan_math/stan/math/rev/core/typedefs.hpp:7:
In file included from stan/lib/stan_math/stan/math/rev/core/Eigen_NumTraits.hpp:5:
In file included from stan/lib/stan_math/stan/math/prim/core.hpp:4:
In file included from stan/lib/stan_math/stan/math/prim/core/init_threadpool_tbb.hpp:6:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast.hpp:32:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/try_lexical_convert.hpp:44:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical.hpp:54:
stan/lib/stan_math/lib/boost_1.78.0/boost/lexical_cast/detail/converter_lexical_streams.hpp:310:21: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                    sprintf(begin,
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attri
bute__((__deprecated__(_msg)))
                                                      ^

In file included from stan/src/stan/model/model_header.hpp:4:
In file included from stan/lib/stan_math/stan/math.hpp:19:
In file included from stan/lib/stan_math/stan/math/rev.hpp:10:
In file included from stan/lib/stan_math/stan/math/rev/fun.hpp:196:
In file included from stan/lib/stan_math/stan/math/prim/functor.hpp:14:
In file included from stan/lib/stan_math/stan/math/prim/functor/integrate_ode_rk45.hpp:6:
In file included from stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:9:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint.hpp:37:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp:40:
stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/integrate/max_step_checker.hpp:72:18: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            std::sprintf(error_msg, "Max number of iterations exceeded (%d).", m_max_steps);
                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

In file included from stan/src/stan/model/model_header.hpp:4:
In file included from stan/lib/stan_math/stan/math.hpp:19:
In file included from stan/lib/stan_math/stan/math/rev.hpp:10:
In file included from stan/lib/stan_math/stan/math/rev/fun.hpp:196:
In file included from stan/lib/stan_math/stan/math/prim/functor.hpp:14:
In file included from stan/lib/stan_math/stan/math/prim/functor/integrate_ode_rk45.hpp:6:
In file included from stan/lib/stan_math/stan/math/prim/functor/ode_rk45.hpp:9:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint.hpp:37:
In file included from stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp:40:
stan/lib/stan_math/lib/boost_1.78.0/boost/numeric/odeint/integrate/max_step_checker.hpp:104:18: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            std::sprintf(error_msg, "Max number of iterations exceeded (%d). A new step size was not found.", m_max_steps);
                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^

7 warnings generated.

Warning message:
In readLines(stan_file) :
  incomplete final line found on '~/tmp/persistent_drift/test_simplex.stan'

I have recent migrated my user account from an Intel Mac to M1 Mac using Apple’s migration assistant. Would this be an issue?

Ah that xattr error is an issue with the installer attempting to remove an attribute that doesn’t exist, I’ll submit a patch to cmdstan for that later today.

For the warnings during model compilation, this is just saying that one of the functions used by the Boost c++ library (one of our dependencies) has been marked as deprecated. This is completely safe to ignore, and you can suppress this warning in future output by running:

cmdstanr::make_local(cpp_options = list("CXXFLAGS += -Wno-deprecated-declarations"), append = TRUE)
2 Likes

PR to fix the xattr error opened here: Allow xattr -d to fail by andrjohns · Pull Request #1127 · stan-dev/cmdstan · GitHub

This should be included in the next RC/release (@rok_cesnovar feel free to correct me on this though!), so won’t be an issue soon

2 Likes

Yes, definitely, we should include this in the next release. I don’t feel like RC2 is required for this, but we can do it, if you feel that we should.

1 Like

Great! No I don’t think an RC2 should be needed

1 Like