Rstan 2.26 crashes with no error when (accidentally) using # as comment

This looks like a need to apply a patch to TBB headers for R/Rcpp, not due to static linking. Can you try the following?

sed -i 's|no_copy( const no_copy& );|//no_copy( const no_copy& );|g' StanHeaders/include/tbb/tbb_stddef.h

This assumes that you’re at the R library directory. It basically comments out line #332 of tbb_stddef.h. If that fixes it, we could patch it in Math or StanHeaders. We might need a few similar patches, but let’s test this 1st.

Alternatively, we could statically build TBB source code from RcppParallel not Math.