Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions dev/conbench_envs/hooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,25 @@ build_arrow_python() {

build_arrow_r() {
cat ci/etc/rprofile >> $(R RHOME)/etc/Rprofile.site

# Ensure CXX20 is configured in R's Makeconf.
# conda-forge's R may have empty CXX20 entries even though the compiler supports it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we report an issue to the corresponding conda-forge feedstock, so that we can get rid of this workaround later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure it was a bug but reported it at conda-forge/r-base-feedstock#401

# Arrow requires C++20, so we need to add these settings if missing.
MAKECONF="$(R RHOME)/etc/Makeconf"
if [ -z "$(R CMD config CXX20)" ]; then
echo "*** CXX20 not configured in R, adding it to Makeconf"
cat >> "$MAKECONF" << 'EOF'

# Added for Arrow C++20 support
CXX20 = g++
CXX20FLAGS = -g -O2 $(LTO)
CXX20PICFLAGS = -fpic
CXX20STD = -std=gnu++20
SHLIB_CXX20LD = $(CXX20) $(CXX20STD)
SHLIB_CXX20LDFLAGS = -shared
EOF
fi

ci/scripts/r_deps.sh $(pwd) $(pwd)
(cd r; R CMD INSTALL .;)
}
Expand Down