Skip to content

[setup-r-dependencies] data.table needs libintl on MacOS R-Devel #998

@andrjohns

Description

@andrjohns

Describe the bug

data.table is failing to build on macos r-devel as as part of a setup-r-dependencies action, due to a missing libintl.h header:

✖ Failed to build data.table 1.17.0 (1.5s)
  Error: 
  ! error in pak subprocess
  Caused by error in `stop_task_build(state, worker)`:
  ! Failed to build source package data.table.
  Full installation output:
  * installing *source* package ‘data.table’ ...
  ** this is package ‘data.table’ version ‘1.17.0’
  ** package ‘data.table’ successfully unpacked and MD5 sums checked
  staged installation is only possible with locking
  ** using non-staged installation
  zlib 1.2.12 is available ok
  * checking if R installation supports OpenMP with "-Xclang -fopenmp" ... no
  * checking if R installation supports OpenMP with "-fopenmp" ... no
  ***
  *** OpenMP not supported! data.table uses OpenMP to automatically
  ***   parallelize operations like sorting, grouping, file reading, etc.
  *** For details on how to install the necessary toolchains on your OS see:
  ***   https://github.com/Rdatatable/data.table/wiki/Installation
  *** Continuing installation without OpenMP support...
  ***
  ** libs
  using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
  using SDK: ‘’
  clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -Wall -pedantic -c assign.c -o assign.o
  In file included from assign.c:1:
  In file included from ./data.table.h:26:
  ./po.h:2:10: fatal error: 'libintl.h' file not found
  #include <libintl.h>
           ^~~~~~~~~~~
  1 error generated.
  make: *** [assign.o] Error 1
  ERROR: compilation failed for package ‘data.table’
  * removing ‘/private/var/folders/r1/4882c7yd7wx9hcpc__xp04_m0000gn/T/Rtmpx0Tsgt/pkg-lib14777bc84500/data.table’

To Reproduce

Failed CI run here: https://github.com/stan-dev/cmdstanr/actions/runs/14153038755/job/39648721375?pr=1071

Additional context
Using setup-r-dependencies@2.11.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions