Skip to content

Conversation

@nealrichardson
Copy link
Member

@nealrichardson nealrichardson commented Mar 26, 2021

Also includes a followup to ARROW-11736 to add the utf8proc/re2 features to arrow_info() and use that in skip_if_not_available().

@github-actions
Copy link

@nealrichardson
Copy link
Member Author

@github-actions crossbow submit test-r-linux-as-cran

@github-actions
Copy link

Revision: e85b6b00caeb7b3e8ea33f923e7529fb4a13e2f8

Submitted crossbow builds: ursacomputing/crossbow @ actions-236

Task Status
test-r-linux-as-cran Github Actions

@nealrichardson
Copy link
Member Author

@github-actions crossbow submit test-r-linux-as-cran

@xhochy
Copy link
Member

xhochy commented Mar 26, 2021

@nealrichardson Do you have the error message / build log available?

@nealrichardson
Copy link
Member Author

@xhochy
Copy link
Member

xhochy commented Mar 26, 2021

The R arrow package is built using std=gnu11, if you can try and compile it with gnu17, chances are high that you get rid of the error. Where is the C++ part of Arrow built? I cannot find that in the logs.

@nealrichardson
Copy link
Member Author

Unfortunately because this is the as-cran test job, the C++ build output is suppressed (otherwise CRAN checks fail spuriously). It could be reproduced locally with docker-compose, if it were worthwhile. But we don't require C++ 17 for Arrow, only C++ 11, and we have to use the same compiler settings that R uses in order to avoid compiler mismatch: https://github.com/apache/arrow/blob/master/r/tools/nixlibs.R#L318. So I don't understand how we could compile re2 with gnu17.

@github-actions
Copy link

Revision: a347ac948a1871bab0b78d22602b2475cd1b10a0

Submitted crossbow builds: ursacomputing/crossbow @ actions-237

Task Status
test-r-linux-as-cran Github Actions

@kou
Copy link
Member

kou commented Mar 28, 2021

It's caused by ignoring -stdlib=c++ specified by CXX environment variable that is provided by R CMD config CXX.
We use CMAKE_CXX_COMPILER to tell CXX environment variable information to bundled libraries. But it only has compiler path such as /usr/bin/clang++ in CXX=/usr/bin/clang++ -std=gnu++14 -stdlib=libc++. It doesn't have other options such as -std=gnu++14 -stdlib=libc++. CMAKE_CXX_COMPILER_ARG1 has them.

How about passing CMAKE_CXX_COMPILER_ARG1 information to bundled libraries?

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index e19544182..ef2ccfd0a 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -620,8 +620,8 @@ endif()
 # ----------------------------------------------------------------------
 # ExternalProject options
 
-set(EP_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}}")
-set(EP_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}}")
+set(EP_CXX_FLAGS "${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPERCASE_BUILD_TYPE}}")
+set(EP_C_FLAGS "${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPERCASE_BUILD_TYPE}}")
 
 if(NOT MSVC_TOOLCHAIN)
   # Set -fPIC on all external projects

@nealrichardson
Copy link
Member Author

@github-actions crossbow submit test-r-linux-as-cran

@github-actions
Copy link

Revision: f402130

Submitted crossbow builds: ursacomputing/crossbow @ actions-242

Task Status
test-r-linux-as-cran Github Actions

@nealrichardson
Copy link
Member Author

@github-actions autotune

@nealrichardson
Copy link
Member Author

Thanks @kou! That seems to work.

@kou kou changed the title ARROW-12094: [C++][R] Fix/workaround re2 building on clang/libc++ ARROW-12094: [C++][R] Fix re2 building on clang/libc++ Mar 28, 2021
@kou
Copy link
Member

kou commented Mar 28, 2021

@github-actions crossbow submit -g nightly

@github-actions
Copy link

Revision: f52c105

Submitted crossbow builds: ursacomputing/crossbow @ actions-243

Task Status
centos-7-amd64 Github Actions
centos-8-aarch64 TravisCI
centos-8-amd64 Github Actions
conda-clean Azure
conda-linux-gcc-py36-aarch64 Drone
conda-linux-gcc-py36-cpu-r36 Azure
conda-linux-gcc-py36-cuda Azure
conda-linux-gcc-py37-aarch64 Drone
conda-linux-gcc-py37-cpu-r40 Azure
conda-linux-gcc-py37-cuda Azure
conda-linux-gcc-py38-aarch64 Drone
conda-linux-gcc-py38-cpu Azure
conda-linux-gcc-py38-cuda Azure
conda-linux-gcc-py39-aarch64 Drone
conda-linux-gcc-py39-cpu Azure
conda-linux-gcc-py39-cuda Azure
conda-osx-clang-py36-r36 Azure
conda-osx-clang-py37-r40 Azure
conda-osx-clang-py38 Azure
conda-osx-clang-py39 Azure
conda-win-vs2017-py36-r36 Azure
conda-win-vs2017-py37-r40 Azure
conda-win-vs2017-py38 Azure
debian-buster-amd64 Github Actions
debian-buster-arm64 TravisCI
example-cpp-minimal-build-static Github Actions
example-cpp-minimal-build-static-system-dependency Github Actions
gandiva-jar-osx Github Actions
gandiva-jar-ubuntu Github Actions
homebrew-cpp Github Actions
homebrew-r-autobrew Github Actions
nuget Github Actions
python-sdist Github Actions
test-build-vcpkg-win Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Github Actions
test-conda-python-3.6 Github Actions
test-conda-python-3.6-pandas-0.23 Github Actions
test-conda-python-3.7 Github Actions
test-conda-python-3.7-dask-latest Github Actions
test-conda-python-3.7-hdfs-3.2 Github Actions
test-conda-python-3.7-kartothek-latest Github Actions
test-conda-python-3.7-kartothek-master Github Actions
test-conda-python-3.7-pandas-latest Github Actions
test-conda-python-3.7-pandas-master Github Actions
test-conda-python-3.7-spark-branch-3.0 Github Actions
test-conda-python-3.7-turbodbc-latest Github Actions
test-conda-python-3.7-turbodbc-master Github Actions
test-conda-python-3.8 Github Actions
test-conda-python-3.8-dask-master Github Actions
test-conda-python-3.8-hypothesis Github Actions
test-conda-python-3.8-jpype Github Actions
test-conda-python-3.8-pandas-latest Github Actions
test-conda-python-3.8-pandas-nightly Github Actions
test-conda-python-3.8-spark-master Github Actions
test-debian-10-cpp Github Actions
test-debian-10-go-1.15 Azure
test-debian-10-python-3 Azure
test-debian-c-glib Github Actions
test-debian-ruby Github Actions
test-fedora-33-cpp Github Actions
test-fedora-33-python-3 Azure
test-r-install-local Github Actions
test-r-linux-as-cran Github Actions
test-r-minimal-build Azure
test-r-rhub-ubuntu-gcc-release Azure
test-r-rocker-r-base-latest Azure
test-r-rstudio-r-base-3.6-bionic Azure
test-r-rstudio-r-base-3.6-centos7-devtoolset-8 Azure
test-r-rstudio-r-base-3.6-centos8 Azure
test-r-rstudio-r-base-3.6-opensuse15 Azure
test-r-rstudio-r-base-3.6-opensuse42 Azure
test-r-version-compatibility Github Actions
test-r-versions Github Actions
test-ubuntu-16.04-cpp Github Actions
test-ubuntu-18.04-cpp Github Actions
test-ubuntu-18.04-cpp-release Github Actions
test-ubuntu-18.04-cpp-static Github Actions
test-ubuntu-18.04-docs Azure
test-ubuntu-18.04-python-3 Azure
test-ubuntu-18.04-r-sanitizer Azure
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-14 Github Actions
test-ubuntu-20.04-cpp-17 Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-c-glib Github Actions
test-ubuntu-ruby Azure
ubuntu-bionic-amd64 Github Actions
ubuntu-bionic-arm64 TravisCI
ubuntu-focal-amd64 Github Actions
ubuntu-focal-arm64 TravisCI
ubuntu-groovy-amd64 Github Actions
ubuntu-groovy-arm64 TravisCI
wheel-manylinux2010-cp36m-amd64 Github Actions
wheel-manylinux2010-cp37m-amd64 Github Actions
wheel-manylinux2010-cp38-amd64 Github Actions
wheel-manylinux2010-cp39-amd64 Github Actions
wheel-manylinux2014-cp36m-amd64 Github Actions
wheel-manylinux2014-cp36m-arm64 TravisCI
wheel-manylinux2014-cp37m-amd64 Github Actions
wheel-manylinux2014-cp37m-arm64 TravisCI
wheel-manylinux2014-cp38-amd64 Github Actions
wheel-manylinux2014-cp38-arm64 TravisCI
wheel-manylinux2014-cp39-amd64 Github Actions
wheel-manylinux2014-cp39-arm64 TravisCI
wheel-osx-high-sierra-cp36m Github Actions
wheel-osx-high-sierra-cp37m Github Actions
wheel-osx-high-sierra-cp38 Github Actions
wheel-osx-high-sierra-cp39 Github Actions
wheel-osx-mavericks-cp36m Github Actions
wheel-osx-mavericks-cp37m Github Actions
wheel-osx-mavericks-cp38 Github Actions
wheel-osx-mavericks-cp39 Github Actions
wheel-windows-cp36m Github Actions
wheel-windows-cp37m Github Actions
wheel-windows-cp38 Github Actions
wheel-windows-cp39 Github Actions

@nealrichardson
Copy link
Member Author

@github-actions crossbow submit test-r-versions

@github-actions
Copy link

Revision: 342ea03

Submitted crossbow builds: ursacomputing/crossbow @ actions-244

Task Status
test-r-versions Github Actions

@nealrichardson
Copy link
Member Author

nealrichardson commented Mar 29, 2021

@kou other than the test-r-versions nightly (for which I've pushed a fix), everything else looks no worse than master. I'll merge once CI confirms the fix. Thanks again for your help! ❤️

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

Could you update the pull request description before we merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants