From 3c53935d28ece8b6cd6c6b2c2624f62658545726 Mon Sep 17 00:00:00 2001 From: Theresa O'Brien Date: Tue, 9 Apr 2024 13:01:24 +1000 Subject: [PATCH] Windows fix (#11) Fix adapted from https://discourse.mc-stan.org/t/pkgbuild-compile-dll-on-previously-working-rstantools-based-package-fails-with-file-too-big-error/21938/16 to make package compile on my Win10 desktop. Only included the code for `configure.win` as changing the other files broke everything. * Updated configure.win and testing workflow to check if this breaks everything. * Removed windows-fix from testing workflow. --- .gitignore | 3 +++ configure.win | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 92d552e..48a7f59 100644 --- a/.gitignore +++ b/.gitignore @@ -56,5 +56,8 @@ inst/doc *.o *.so +# Ignore large file generated by compilation +src/rmot.dll + # Bugged directory from snapshot package tests/testthat/_snaps diff --git a/configure.win b/configure.win index 5e2dceb..347d0dd 100755 --- a/configure.win +++ b/configure.win @@ -3,3 +3,6 @@ # Generated by rstantools. Do not edit by hand. "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "rstantools::rstan_config()" + +# Add configuration needed for big object files +echo "PKG_CXXFLAGS += -Wa,-mbig-obj" >> ./src/Makevars.win