Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-17694: [C++] Remove std::optional backport #14105

Merged
merged 10 commits into from
Sep 15, 2022

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Sep 13, 2022

Just use the C++17 standard library version.

@pitrou

This comment was marked as outdated.

@github-actions
Copy link

@github-actions
Copy link

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

.github/workflows/cpp.yml Outdated Show resolved Hide resolved
@pitrou

This comment was marked as outdated.

@pitrou

This comment was marked as outdated.

@pitrou
Copy link
Member Author

pitrou commented Sep 14, 2022

@assignUser Would you know how to change the macOS deployment target for autobrew? I tried to set it to 10.14 using the env var MACOSX_DEPLOYMENT_TARGET but it wasn't picked up:
https://github.com/ursacomputing/crossbow/actions/runs/3047525991/jobs/4911606506#step:8:6773

/Users/voltrondata/tmp/hbtmp/apache-arrow-20220913-7531-1f8l15l/cpp/src/arrow/memory_pool.cc:143:20: error: call to unavailable member function 'value': introduced in macOS 10.14
    return backend.value();
           ~~~~~~~~^~~~~

@assignUser
Copy link
Member

Not of the bat, I'll look into it. I hope it is possible otherwise that might be an issue due to CRAN building on 10.13.

@assignUser
Copy link
Member

The envvar is correctly set in the wf and looking at our cmake it should get picked up. I wonder if the issue is that the deployment target can't be higher than the host? I haven't found anything documenting such behavior and the llvm/clang version installed should support c++17 (as we confirmed previously).

I also had a glance at autobrew and I don't think it is forcing the deployment target anywhere. Maybe passing it explicitly as a cmake arg in the formula works? https://github.com/pitrou/arrow/blob/ARROW-17694-std-optional/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb

@pitrou

This comment was marked as outdated.

@pitrou
Copy link
Member Author

pitrou commented Sep 14, 2022

@assignUser Well, it got even worse as there's now an error about something being available only in 10.12+:
https://github.com/ursacomputing/crossbow/actions/runs/3052496381/jobs/4921948251#step:7:6790

Yet as you can see the correct compiler command-line options seem to be given... I can only assume that homebrew is doing something horrible under the hood :-(

@pitrou
Copy link
Member Author

pitrou commented Sep 14, 2022

Revision: 93f4f3e

Submitted crossbow builds: ursacomputing/crossbow @ optional-4

Task Status
homebrew-cpp Github Actions
homebrew-cpp-autobrew Github Actions
homebrew-r-autobrew Github Actions
homebrew-r-brew Github Actions

@assignUser
Copy link
Member

I looked at some other packages on CRAN using C++17 and found that httpgd uses std::optional IIUC https://github.com/nx10/httpgd/blob/ae03f478c0fa4cc09b729cc00738ad2c1ceba4ed/src/lib/belle.h#L353

I'll check their configure/autobrew script

@pitrou
Copy link
Member Author

pitrou commented Sep 14, 2022

Revision: a184425

Submitted crossbow builds: ursacomputing/crossbow @ optional-5

Task Status
homebrew-r-autobrew Github Actions
homebrew-r-brew Github Actions

@assignUser
Copy link
Member

That looks promising 🤞

@pitrou

This comment was marked as outdated.

@pitrou pitrou requested a review from kou September 14, 2022 15:54
@pitrou
Copy link
Member Author

pitrou commented Sep 14, 2022

@kou Would you mind giving this another look?

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

Thanks!

@@ -42,6 +42,7 @@ class ApacheArrow < Formula
def install
ENV.cxx11
args = %W[
-DARROW_CXXFLAGS="-D_LIBCPP_DISABLE_AVAILABILITY"
Copy link
Member

Choose a reason for hiding this comment

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

Could you put this after -DARROW_CSV=ON to keep order?

@pitrou
Copy link
Member Author

pitrou commented Sep 15, 2022

Revision: 3566dee

Submitted crossbow builds: ursacomputing/crossbow @ optional-7

Task Status
almalinux-8-amd64 Github Actions
almalinux-8-arm64 TravisCI
almalinux-9-amd64 Github Actions
almalinux-9-arm64 TravisCI
amazon-linux-2-amd64 Github Actions
amazon-linux-2-arm64 TravisCI
centos-7-amd64 Github Actions
centos-8-stream-amd64 Github Actions
centos-8-stream-arm64 TravisCI
centos-9-stream-amd64 Github Actions
centos-9-stream-arm64 TravisCI
conan-maximum Github Actions
conan-minimum Github Actions
conda-clean Azure
conda-linux-gcc-py310-arm64 Azure
conda-linux-gcc-py310-cpu Azure
conda-linux-gcc-py310-cuda Azure
conda-linux-gcc-py310-ppc64le Azure
conda-linux-gcc-py37-arm64 Azure
conda-linux-gcc-py37-cpu-r40 Azure
conda-linux-gcc-py37-cpu-r41 Azure
conda-linux-gcc-py37-cuda Azure
conda-linux-gcc-py37-ppc64le Azure
conda-linux-gcc-py38-arm64 Azure
conda-linux-gcc-py38-cpu Azure
conda-linux-gcc-py38-cuda Azure
conda-linux-gcc-py38-ppc64le Azure
conda-linux-gcc-py39-arm64 Azure
conda-linux-gcc-py39-cpu Azure
conda-linux-gcc-py39-cuda Azure
conda-linux-gcc-py39-ppc64le Azure
conda-osx-arm64-clang-py310 Azure
conda-osx-arm64-clang-py38 Azure
conda-osx-arm64-clang-py39 Azure
conda-osx-clang-py310 Azure
conda-osx-clang-py37-r40 Azure
conda-osx-clang-py37-r41 Azure
conda-osx-clang-py38 Azure
conda-osx-clang-py39 Azure
conda-win-vs2019-py310 Azure
conda-win-vs2019-py37-r40 Azure
conda-win-vs2019-py37-r41 Azure
conda-win-vs2019-py38 Azure
conda-win-vs2019-py39 Azure
debian-bookworm-amd64 Github Actions
debian-bookworm-arm64 TravisCI
debian-bullseye-amd64 Github Actions
debian-bullseye-arm64 TravisCI
example-cpp-minimal-build-static Github Actions
example-cpp-minimal-build-static-system-dependency Github Actions
example-python-minimal-build-fedora-conda Github Actions
example-python-minimal-build-ubuntu-venv Github Actions
homebrew-cpp Github Actions
homebrew-r-autobrew Github Actions
homebrew-r-brew Github Actions
java-jars Github Actions
nuget Github Actions
python-sdist Github Actions
r-binary-packages Github Actions
test-alpine-linux-cpp Github Actions
test-build-cpp-fuzz Github Actions
test-build-vcpkg-win Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Azure
test-conda-python-3.10 Github Actions
test-conda-python-3.7 Github Actions
test-conda-python-3.7-hdfs-2.9.2 Github Actions
test-conda-python-3.7-hdfs-3.2.1 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-0.24 Github Actions
test-conda-python-3.7-pandas-latest Github Actions
test-conda-python-3.7-spark-v3.1.2 Github Actions
test-conda-python-3.8 Github Actions
test-conda-python-3.8-hypothesis 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-v3.2.0 Github Actions
test-conda-python-3.9 Github Actions
test-conda-python-3.9-dask-latest Github Actions
test-conda-python-3.9-dask-master Github Actions
test-conda-python-3.9-pandas-master Github Actions
test-conda-python-3.9-spark-master Github Actions
test-debian-10-cpp-amd64 Github Actions
test-debian-10-cpp-i386 Github Actions
test-debian-11-cpp-amd64 Github Actions
test-debian-11-cpp-i386 Github Actions
test-debian-11-go-1.17 Azure
test-debian-11-python-3 Azure
test-debian-c-glib Github Actions
test-debian-ruby Github Actions
test-fedora-35-cpp Github Actions
test-fedora-35-python-3 Azure
test-fedora-r-clang-sanitizer Azure
test-r-arrow-backwards-compatibility Github Actions
test-r-depsource-bundled Azure
test-r-depsource-system Github Actions
test-r-dev-duckdb Github Actions
test-r-devdocs Github Actions
test-r-gcc-11 Github Actions
test-r-gcc-12 Github Actions
test-r-install-local Github Actions
test-r-linux-as-cran Github Actions
test-r-linux-rchk Github Actions
test-r-linux-valgrind Azure
test-r-minimal-build Azure
test-r-offline-maximal Github Actions
test-r-offline-minimal Azure
test-r-rhub-debian-gcc-devel-lto-latest Azure
test-r-rhub-debian-gcc-release-custom-ccache Azure
test-r-rhub-ubuntu-gcc-release-latest Azure
test-r-rocker-r-base-latest Azure
test-r-rstudio-r-base-4.1-opensuse153 Azure
test-r-rstudio-r-base-4.2-centos7-devtoolset-8 Azure
test-r-rstudio-r-base-4.2-focal Azure
test-r-ubuntu-22.04 Github Actions
test-r-versions Github Actions
test-skyhook-integration 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-r-sanitizer Azure
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-17 Github Actions
test-ubuntu-20.04-cpp-bundled Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-20.04-python-3 Azure
test-ubuntu-22.04-cpp Github Actions
test-ubuntu-c-glib Github Actions
test-ubuntu-default-docs Azure
test-ubuntu-ruby Github Actions
ubuntu-bionic-amd64 Github Actions
ubuntu-bionic-arm64 TravisCI
ubuntu-focal-amd64 Github Actions
ubuntu-focal-arm64 TravisCI
ubuntu-jammy-amd64 Github Actions
ubuntu-jammy-arm64 TravisCI
wheel-macos-big-sur-cp310-arm64 Github Actions
wheel-macos-big-sur-cp310-universal2 Github Actions
wheel-macos-big-sur-cp38-arm64 Github Actions
wheel-macos-big-sur-cp39-arm64 Github Actions
wheel-macos-big-sur-cp39-universal2 Github Actions
wheel-macos-mojave-cp310-amd64 Github Actions
wheel-macos-mojave-cp37-amd64 Github Actions
wheel-macos-mojave-cp38-amd64 Github Actions
wheel-macos-mojave-cp39-amd64 Github Actions
wheel-manylinux2014-cp310-amd64 Github Actions
wheel-manylinux2014-cp310-arm64 TravisCI
wheel-manylinux2014-cp37-amd64 Github Actions
wheel-manylinux2014-cp37-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-windows-cp310-amd64 Github Actions
wheel-windows-cp37-amd64 Github Actions
wheel-windows-cp38-amd64 Github Actions
wheel-windows-cp39-amd64 Github Actions

@pitrou
Copy link
Member Author

pitrou commented Sep 15, 2022

The test failures seem the same as usual, so I'm going to merge.

@pitrou pitrou merged commit 5e49174 into apache:master Sep 15, 2022
@pitrou pitrou deleted the ARROW-17694-std-optional branch September 15, 2022 10:37
@ursabot
Copy link

ursabot commented Sep 15, 2022

Benchmark runs are scheduled for baseline = 2749fef and contender = 5e49174. 5e49174 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.51% ⬆️0.03%] test-mac-arm
[Failed ⬇️0.56% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.6% ⬆️0.39%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 5e49174d ec2-t3-xlarge-us-east-2
[Finished] 5e49174d test-mac-arm
[Failed] 5e49174d ursa-i9-9960x
[Finished] 5e49174d ursa-thinkcentre-m75q
[Finished] 2749fef9 ec2-t3-xlarge-us-east-2
[Failed] 2749fef9 test-mac-arm
[Failed] 2749fef9 ursa-i9-9960x
[Finished] 2749fef9 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
Just use the C++17 standard library version.

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
fatemehp pushed a commit to fatemehp/arrow that referenced this pull request Oct 17, 2022
Just use the C++17 standard library version.

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
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.

None yet

4 participants