From b7fde2c723ee5006a2f1f0198df682fa20fcf857 Mon Sep 17 00:00:00 2001 From: Collin Schwantes Date: Tue, 9 Jan 2024 12:05:08 -0600 Subject: [PATCH 1/2] adding system dependencies --- .github/workflows/bookdown_action.yml | 4 ++++ sys_deps/sys_deps.sh | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 sys_deps/sys_deps.sh diff --git a/.github/workflows/bookdown_action.yml b/.github/workflows/bookdown_action.yml index 0ee28fc..483aabc 100644 --- a/.github/workflows/bookdown_action.yml +++ b/.github/workflows/bookdown_action.yml @@ -31,6 +31,10 @@ jobs: - name: Install libgit2 run: sudo apt install libgit2-dev + - name: Install system dependencies + run: | + sh sys_deps/sys_deps.sh + - name: Cache bookdown results uses: actions/cache@v2 with: diff --git a/sys_deps/sys_deps.sh b/sys_deps/sys_deps.sh new file mode 100644 index 0000000..2cacd21 --- /dev/null +++ b/sys_deps/sys_deps.sh @@ -0,0 +1,9 @@ +apt-get update && apt-get install -y --no-install-recommends \ + libcurl4-openssl-dev \ + libssl-dev \ + git-crypt \ + libudunits2-dev \ + libgdal-dev \ + libgeos-dev \ + libproj-dev \ + libglpk-dev \ No newline at end of file From bf61279611089edf75882f2817e9de24d833fb81 Mon Sep 17 00:00:00 2001 From: Collin Schwantes Date: Tue, 9 Jan 2024 12:09:29 -0600 Subject: [PATCH 2/2] added section on gcc --- dependencies.Rmd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dependencies.Rmd b/dependencies.Rmd index 07bb1c2..5046363 100644 --- a/dependencies.Rmd +++ b/dependencies.Rmd @@ -14,5 +14,17 @@ project](http://ropenscilabs.github.io/r-docker-tutorial/) - R packages can be a useful project output. We have some in-house R packages to provide access to internal data and generate reports, and may be developing more for external audiences. Hadley Wickham's [R Packages Book](http://r-pkgs.had.co.nz/) provides guidance for these, and we expect our packages to be up to [rOpenSci standards](https://github.com/ropensci/onboarding). +## GCC and mac silicon +For some reason mac computers with mac silicon (e.g. M2 chip) have issues with +c compilers. Use the following to ensure your mac knows which c compiler to use. + +``` +CXX14FLAGS += -O3 -arch arm64 -ftemplate-depth-256 +FC = /opt/homebrew/Cellar/gcc/13.2.0/bin/gfortran +F77 = /opt/homebrew/Cellar/gcc/13.2.0/bin/gfortran +FLIBS = -L/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/13 +``` + +## Historically some projects used [Packrat](https://rstudio.github.io/packrat/) or [checkpoint](https://CRAN.R-project.org/package=checkpoint) to fix R package versions. These systems have been superceded by `renv`. \ No newline at end of file