You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ARROW-6237: [R] Allow compilation flags to be passed for R package with ARROW_R_CXXFLAGS
For example:
```
export ARROW_R_CXXFLAGS="-fno-omit-frame-pointer"
```
(this flag is needed to record performance data on Linux with `perf`)
I also amended the README.Rmd to say to use `$R_LD_LIBRARY_PATH` instead of `$LD_LIBRARY_PATH` for custom install location
Closes#5088 from wesm/r-cxxflags and squashes the following commits:
e25de5e <Wes McKinney> Add ARROW_R_CXXFLAGS to documentation
8718aaf <Wes McKinney> Change R package README to indicate to use R_LD_LIBRARY_PATH
3a919df <Wes McKinney> Allow compilation flags to be passed for R package with ARROW_R_CXXFLAGS
Authored-by: Wes McKinney <wesm+git@apache.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Copy file name to clipboardExpand all lines: r/README.Rmd
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ arrow::install_arrow()
46
46
47
47
for version- and platform-specific guidance on installing the Arrow C++ library.
48
48
49
-
When installing from source, if the R and C++ library versions do not match, installation may fail. If you've previously installed the libraries and want to upgrade the R package, you'll need to update the Arrow C++ library first.
49
+
When installing from source, if the R and C++ library versions do not match, installation may fail. If you've previously installed the libraries and want to upgrade the R package, you'll need to update the Arrow C++ library first.
50
50
51
51
## Example
52
52
@@ -112,6 +112,14 @@ R -e 'install.packages("devtools"); devtools::install_dev_deps()'
112
112
R CMD INSTALL .
113
113
```
114
114
115
+
If you need to set any compilation flags while building the Rcpp extensions,
116
+
you can use the `ARROW_R_CXXFLAGS` environment variable. For example, if you
117
+
are using `perf` to profile the R extensions, you may need to set
118
+
119
+
```shell
120
+
export ARROW_R_CXXFLAGS=-fno-omit-frame-pointer
121
+
```
122
+
115
123
If the package fails to install/load with an error like this:
116
124
117
125
```
@@ -121,9 +129,9 @@ unable to load shared object '/Users/you/R/00LOCK-r/00new/arrow/libs/arrow.so':
121
129
dlopen(/Users/you/R/00LOCK-r/00new/arrow/libs/arrow.so, 6): Library not loaded: @rpath/libarrow.14.dylib
122
130
```
123
131
124
-
try setting the environment variable `LD_LIBRARY_PATH` (or `DYLD_LIBRARY_PATH`
125
-
on macOS) to wherever Arrow C++ was put in `make install`, e.g. `export
126
-
LD_LIBRARY_PATH=/usr/local/lib`, and retry installing the R package.
132
+
try setting the environment variable `R_LD_LIBRARY_PATH` to wherever Arrow C++
133
+
was put in `make install`, e.g. `export R_LD_LIBRARY_PATH=/usr/local/lib`, and
134
+
retry installing the R package.
127
135
128
136
For any other build/configuration challenges, see the [C++ developer
0 commit comments