diff --git a/R/model.R b/R/model.R index c64d792c6..023248b8a 100644 --- a/R/model.R +++ b/R/model.R @@ -503,6 +503,11 @@ compile_method <- function(quiet = TRUE, spinner = quiet && interactive(), stderr_line_callback = function(x,p) { if (!startsWith(x, paste0(make_cmd(), ": *** No rule to make target"))) message(x) + if (regexpr("PCH file uses an older PCH format that is no longer supported", x, fixed = TRUE) > 0 + || regexpr("PCH file built from a different branch", x, fixed = TRUE) > 0) { + warning("Cmdstan encountered an issue with an outdated precompiled header (PCH). Run rebuild_cmdstan() to rebuild the PCH files.\n", + "If the issue persists please open a bug report.") + } }, error_on_status = FALSE )