Skip to content

[R] arrow::install_arrow() doesn't use the same compiler arguments as install.packages #35640

@david-cortes

Description

@david-cortes

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions