[R] `arrow::install_arrow()` doesn't use the same compiler arguments as `install.packages`
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 91
Description
### Describe the bug, including details regarding any error messages, version, and platform.
When running `arrow::install_arrow()` on R, it will not use the exact same compiler and arguments that are set by default when compiling R packages, which tyically include additional library paths compared to the system's compiler.
For a concrete example, in a mac-ARM setup in which one has `apple-clang` from `xcode-select`, a user `Makevars` file like this would succeed in compiling packages with `install.packages`:
```
CFLAGS += -Xclang -fopenmp
CXXFLAGS += -Xclang -fopenmp
LDFLAGS += -lomp
```
(plus an additional entry for `CPPFLAGS`)
But this would throw an error when calling `arrow::install_arrow()` due to `-lomp` - instead, one needs to add a `-L` argument to `LDFLAGS` in `Makevars`.
To be clear, the bug report is not _spefically_ about this particular case, but about not using the remainder of the flags that would end up used with `install.packages`.
This is also quite problematic when using a conda-installed R that might have an environment that differs very significantly from the system's default
### Component(s)
R
Contributor guide
Research direction
The issue names no files or tests. Start by tracing the R install_arrow() path and comparing its compiler and environment flag handling with install.packages, then reproduce the macOS ARM Makevars case; done means the relevant package compiler arguments are honored, including in differing conda and system environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100