Running R 4.3.0 on an M2 Mac with OS 13.5, I am running into PCH issues trying to compile a package after internal installation of CmdStan. First, I install instantiate with the "internal" method where CmdStan is compiled inside the package file system.
Sys.setenv(CMDSTAN_INSTALL = "internal")
remotes::install_github('wlandau/instantiate")
library(instantiate)
stan_cmdstan_path() # CmdStan is inside the package file system
#> [1] "/Users/CENSORED/projects/instantiate/inst/cmdstan/cmdstan-2.32.2"
Then I create an example package with a Stan file inside.
Indeed, commenting out the manually-inserted CXXFLAGS="$CXXFLAGS -falign-functions=1" line in configure made it work. But omitting it broke compilation before. All this makes #1 really important.
Running R 4.3.0 on an M2 Mac with OS 13.5, I am running into PCH issues trying to compile a package after internal installation of CmdStan. First, I install
instantiate
with the "internal" method where CmdStan is compiled inside the package file system.Then I create an example package with a Stan file inside.
Compilation fails:
Manually rebuilding CmdStan makes it work, but having to do that defeats the purpose of
instantiate
. This is definitely related to #1.