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-14506: [C++] Conda support for google-cloud-cpp #11916

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Dec 9, 2021

This PR adds support for google-cloud-cpp to the Conda files.
Probably the most difficult change to grok is the change to compile with
C++17 when using Conda:

  • Conda defaults all its builds to C++17,
    this bug goes into
    some detail as to why.
  • Arrow defaults to C++11 if no CMAKE_CXX_STANDARD argument is
    provided.
  • Abseil's ABI changes when used from C++11 vs. C++17, see
    Abseil should install w/ the correct base/options.h abseil/abseil-cpp#696
  • Therefore, one must compile with C++17 to use Abseil in Conda.
  • And because google-cloud-cpp has a direct dependency on Abseil,
    exposed through the headers, one must use C++17 to use
    google-cloud-cpp too.

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

@coryan coryan marked this pull request as ready for review December 9, 2021 15:57
@coryan
Copy link
Contributor Author

coryan commented Dec 9, 2021

The build failures seem unrelated, but do let me know if I missed something.

@pitrou
Copy link
Member

pitrou commented Dec 9, 2021

@coryan They are unrelated. I wonder why it's necessary to enable C++17 for the conda builds and not the bundled builds, though?

@pitrou pitrou requested a review from xhochy December 9, 2021 17:03
@pitrou
Copy link
Member

pitrou commented Dec 9, 2021

Ah, sorry, I've just read the description more attentively :-)

@coryan
Copy link
Contributor Author

coryan commented Dec 13, 2021

Ping. Should I take some action or is this ready to be merged?

@@ -54,6 +56,7 @@ ENV ARROW_BUILD_TESTS=ON \
ARROW_WITH_SNAPPY=ON \
ARROW_WITH_ZLIB=ON \
ARROW_WITH_ZSTD=ON \
CMAKE_CXX_STANDARD=17 \
Copy link
Member

Choose a reason for hiding this comment

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

Note this will break OSX for now, so it should only be set for Linux (as it is done here). See the tracking issue conda-forge/clang-compiler-activation-feedstock#17 for that. Can we remove the explicit setting of CMAKE_CXX_STANDARD in CMake instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note this will break OSX for now, so it should only be set for Linux (as it is done here).

So this change is doing the "Right Thing"[tm] but maybe accidentally?

See the tracking issue conda-forge/clang-compiler-activation-feedstock#17 for that.

Ack.

Can we remove the explicit setting of CMAKE_CXX_STANDARD in CMake instead?

That is way above my pay grade (for this project). It depends on whether arrow supports any compiler where the default C++ version is < C++11. For example, GCC defaults to C++98 until GCC 6.x, and there is a similar story with Clang.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pitrou do you have any thoughts on whether we can change the default for CMAKE_CXX_STANDARD?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm. I'm not sure I understand the situation entirely, but for now Arrow C++ needs to compile on gcc 4.9 (and perhaps even gcc 4.8, for a subset of Arrow). This is because of the compiler requirements for R packages...

Copy link
Member

@pitrou pitrou Dec 13, 2021

Choose a reason for hiding this comment

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

Also, unless I misunderstand @xhochy 's first message ("it should only be set for Linux (as it is done here)"), it seems there's no real problem here?

Copy link
Member

Choose a reason for hiding this comment

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

My message was mainly a heads-up that on OSX, you need to set CMAKE_CXX_STANDARD to 14. This is Linux here, so everything is fine here.

I'm not sure about the general removal of CMAKE_CXX_STANDARD as google-cloud-cpp does also set it: https://github.com/googleapis/google-cloud-cpp/blob/13ec1e946ae1baad6bcae952daf5910649dcfd0a/CMakeLists.txt#L31-L41 Possibly that combination could also be used here?

Copy link
Member

Choose a reason for hiding this comment

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

Well, we already have the following:

if(NOT DEFINED CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 11)
endif()

The only difference AFAICT is that we don't error out if the user explicitly asked for something earlier than C++11, but that must be a really rare case.

Copy link
Member

Choose a reason for hiding this comment

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

@xhochy Can you remind me the reason of CMAKE_CXX_STANDARD=17 here? Also, perhaps explain it in a comment?

@apache apache deleted a comment from github-actions bot Dec 14, 2021
@pitrou
Copy link
Member

pitrou commented Dec 14, 2021

@github-actions crossbow submit -g conda

@github-actions
Copy link

Revision: 4e33f9f

Submitted crossbow builds: ursacomputing/crossbow @ actions-1294

Task Status
conda-clean Azure
conda-linux-gcc-py310-arm64 Azure
conda-linux-gcc-py310-cuda Azure
conda-linux-gcc-py36-arm64 Azure
conda-linux-gcc-py36-cpu-r40 Azure
conda-linux-gcc-py36-cuda Azure
conda-linux-gcc-py37-arm64 Azure
conda-linux-gcc-py37-cpu-r41 Azure
conda-linux-gcc-py37-cuda Azure
conda-linux-gcc-py38-arm64 Azure
conda-linux-gcc-py38-cpu Azure
conda-linux-gcc-py38-cuda Azure
conda-linux-gcc-py39-arm64 Azure
conda-linux-gcc-py39-cpu Azure
conda-linux-gcc-py39-cuda Azure
conda-osx-arm64-clang-py38 Azure
conda-osx-arm64-clang-py39 Azure
conda-osx-clang-py36-r40 Azure
conda-osx-clang-py37-r41 Azure
conda-osx-clang-py38 Azure
conda-osx-clang-py39 Azure
conda-win-vs2017-py36-r40 Azure
conda-win-vs2017-py37-r41 Azure
conda-win-vs2017-py38 Azure
conda-win-vs2017-py39 Azure

@github-actions
Copy link

Revision: 4e33f9f

Submitted crossbow builds: ursacomputing/crossbow @ actions-1295

Task Status
conda-clean Azure
conda-linux-gcc-py310-arm64 Azure
conda-linux-gcc-py310-cuda Azure
conda-linux-gcc-py36-arm64 Azure
conda-linux-gcc-py36-cpu-r40 Azure
conda-linux-gcc-py36-cuda Azure
conda-linux-gcc-py37-arm64 Azure
conda-linux-gcc-py37-cpu-r41 Azure
conda-linux-gcc-py37-cuda Azure
conda-linux-gcc-py38-arm64 Azure
conda-linux-gcc-py38-cpu Azure
conda-linux-gcc-py38-cuda Azure
conda-linux-gcc-py39-arm64 Azure
conda-linux-gcc-py39-cpu Azure
conda-linux-gcc-py39-cuda Azure
conda-osx-arm64-clang-py38 Azure
conda-osx-arm64-clang-py39 Azure
conda-osx-clang-py36-r40 Azure
conda-osx-clang-py37-r41 Azure
conda-osx-clang-py38 Azure
conda-osx-clang-py39 Azure
conda-win-vs2017-py36-r40 Azure
conda-win-vs2017-py37-r41 Azure
conda-win-vs2017-py38 Azure
conda-win-vs2017-py39 Azure

@pitrou
Copy link
Member

pitrou commented Dec 14, 2021

Hmm. There are a lot of build failures on conda CI jobs. @xhochy I don't know if you could provide guidance on these?

@coryan
Copy link
Contributor Author

coryan commented Jan 4, 2022

@xhochy ping, is there something I can do to make this move forward?

@coryan
Copy link
Contributor Author

coryan commented Jan 6, 2022

/cc: @emkornfield

@emkornfield
Copy link
Contributor

Conda is not something I'm very familiar with. I'll try once again to ping @xhochy to see if they might be have some free cycles in the new year.

This PR adds support for `google-cloud-cpp` to the Conda files.
Probably the most difficult change to grok is the change to compile with
C++17 when using Conda:

- Conda defaults all its builds to C++17,
  [this bug](conda/conda-build#3375) goes into
  some detail as to why.
- Arrow defaults to C++11 if no `CMAKE_CXX_STANDARD` argument is
  provided.
- Abseil's ABI changes when used from C++11 vs. C++17, see
  abseil/abseil-cpp#696
- Therefore, one must compile with C++17 to use Abseil in Conda.
- And because `google-cloud-cpp` has a direct dependency on Abseil,
  exposed through the headers, one must use C++17 to use
  `google-cloud-cpp` too.
@coryan coryan force-pushed the ARROW-14506-add-google-cloud-cpp-to-conda-files branch from 4e33f9f to 584f3f4 Compare January 19, 2022 13:25
@xhochy
Copy link
Member

xhochy commented Jan 23, 2022

@github-actions crossbow submit -g conda

@github-actions
Copy link

Revision: 584f3f4

Submitted crossbow builds: ursacomputing/crossbow @ actions-1434

Task Status
conda-clean Azure
conda-linux-gcc-py310-arm64 Azure
conda-linux-gcc-py310-cuda 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-py38-arm64 Azure
conda-linux-gcc-py38-cpu Azure
conda-linux-gcc-py38-cuda Azure
conda-linux-gcc-py39-arm64 Azure
conda-linux-gcc-py39-cpu Azure
conda-linux-gcc-py39-cuda Azure
conda-osx-arm64-clang-py38 Azure
conda-osx-arm64-clang-py39 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-vs2017-py37-r40 Azure
conda-win-vs2017-py37-r41 Azure
conda-win-vs2017-py38 Azure
conda-win-vs2017-py39 Azure

@xhochy
Copy link
Member

xhochy commented Jan 23, 2022

@github-actions crossbow submit conda-linux-gcc-py38-cpu

@github-actions
Copy link

Revision: c0ef3c5

Submitted crossbow builds: ursacomputing/crossbow @ actions-1438

Task Status
conda-linux-gcc-py38-cpu Azure

@xhochy
Copy link
Member

xhochy commented Jan 23, 2022

@github-actions crossbow submit conda-linux-gcc-py38-cpu

@github-actions
Copy link

Revision: 7f3f567

Submitted crossbow builds: ursacomputing/crossbow @ actions-1442

Task Status
conda-linux-gcc-py38-cpu Azure

@xhochy
Copy link
Member

xhochy commented Jan 23, 2022

@github-actions crossbow submit conda-linux-gcc-py38-cpu

@github-actions
Copy link

Revision: 44d84f5

Submitted crossbow builds: ursacomputing/crossbow @ actions-1445

Task Status
conda-linux-gcc-py38-cpu Azure

@github-actions
Copy link

github-actions bot commented Feb 6, 2022

Revision: d87af2a

Submitted crossbow builds: ursacomputing/crossbow @ actions-1592

Task Status
conda-linux-gcc-py37-ppc64le Azure

@xhochy
Copy link
Member

xhochy commented Feb 6, 2022

@github-actions crossbow submit conda-linux-gcc-py37-ppc64le

@github-actions
Copy link

github-actions bot commented Feb 6, 2022

Revision: cd79992

Submitted crossbow builds: ursacomputing/crossbow @ actions-1593

Task Status
conda-linux-gcc-py37-ppc64le Azure

@xhochy
Copy link
Member

xhochy commented Feb 6, 2022

@coryan Can you have a look at the failure in the last crossbow job?

Explicitly convert from `std::unique_ptr<Buffer>` to a `std::shared_ptr` on the way to convert to `Result<std::shared_ptr<>>`.  I am not sure why it only failed with one compiler.
@coryan
Copy link
Contributor Author

coryan commented Feb 6, 2022

@coryan Can you have a look at the failure in the last crossbow job?

Fixed, thanks for the heads up. I am not sure why only this compiler complained. Two user-defined conversions are not allowed 🤷

@xhochy
Copy link
Member

xhochy commented Feb 6, 2022

@github-actions crossbow submit conda-linux-gcc-py37-ppc64le

@github-actions
Copy link

github-actions bot commented Feb 6, 2022

Revision: 8c4f77a

Submitted crossbow builds: ursacomputing/crossbow @ actions-1595

Task Status
conda-linux-gcc-py37-ppc64le Azure

@xhochy
Copy link
Member

xhochy commented Feb 6, 2022

@github-actions crossbow submit conda-linux-gcc-py37-ppc64le

@github-actions
Copy link

github-actions bot commented Feb 6, 2022

Revision: 366b494

Submitted crossbow builds: ursacomputing/crossbow @ actions-1596

Task Status
conda-linux-gcc-py37-ppc64le Azure

@xhochy
Copy link
Member

xhochy commented Feb 6, 2022

@github-actions crossbow submit -g conda

@github-actions
Copy link

github-actions bot commented Feb 6, 2022

Revision: 366b494

Submitted crossbow builds: ursacomputing/crossbow @ actions-1597

Task Status
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-vs2017-py310 Azure
conda-win-vs2017-py37-r40 Azure
conda-win-vs2017-py37-r41 Azure
conda-win-vs2017-py38 Azure
conda-win-vs2017-py39 Azure

@xhochy
Copy link
Member

xhochy commented Feb 7, 2022

@pitrou Ready for review, all 💚 again.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

Just one question.

@@ -54,6 +56,7 @@ ENV ARROW_BUILD_TESTS=ON \
ARROW_WITH_SNAPPY=ON \
ARROW_WITH_ZLIB=ON \
ARROW_WITH_ZSTD=ON \
CMAKE_CXX_STANDARD=17 \
Copy link
Member

Choose a reason for hiding this comment

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

@xhochy Can you remind me the reason of CMAKE_CXX_STANDARD=17 here? Also, perhaps explain it in a comment?

@pitrou
Copy link
Member

pitrou commented Feb 7, 2022

(really great to see all conda builds green again!)

@coryan
Copy link
Contributor Author

coryan commented Feb 7, 2022

Just one question.

Is the PR description good enough?

@pitrou
Copy link
Member

pitrou commented Feb 8, 2022

Just one question.

Is the PR description good enough?

Woops, sorry. Yes, definitely!

@pitrou pitrou closed this in d78967e Feb 8, 2022
@ursabot
Copy link

ursabot commented Feb 8, 2022

Benchmark runs are scheduled for baseline = fa4d517 and contender = d78967e. d78967e 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
[Finished ⬇️0.9% ⬆️0.09%] test-mac-arm
[Failed] ursa-i9-9960x
[Finished ⬇️0.48% ⬆️0.0%] ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. 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

@coryan coryan deleted the ARROW-14506-add-google-cloud-cpp-to-conda-files branch February 8, 2022 15:53
jorisvandenbossche added a commit that referenced this pull request Feb 23, 2022
The actual builds were already fixed before (#11916), but now enabling them again to run them nightly.

Closes #12492 from jorisvandenbossche/ARROW-14256

Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
vfraga pushed a commit to rafael-telles/arrow that referenced this pull request Mar 21, 2022
This PR adds support for `google-cloud-cpp` to the Conda files.
Probably the most difficult change to grok is the change to compile with
C++17 when using Conda:

- Conda defaults all its builds to C++17,
  [this bug](conda/conda-build#3375) goes into
  some detail as to why.
- Arrow defaults to C++11 if no `CMAKE_CXX_STANDARD` argument is
  provided.
- Abseil's ABI changes when used from C++11 vs. C++17, see
  abseil/abseil-cpp#696
- Therefore, one must compile with C++17 to use Abseil in Conda.
- And because `google-cloud-cpp` has a direct dependency on Abseil,
  exposed through the headers, one must use C++17 to use
  `google-cloud-cpp` too.

Closes apache#11916 from coryan/ARROW-14506-add-google-cloud-cpp-to-conda-files

Lead-authored-by: Uwe L. Korn <uwe.korn@quantco.com>
Co-authored-by: Carlos O'Ryan <coryan@google.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
vfraga pushed a commit to rafael-telles/arrow that referenced this pull request Mar 24, 2022
This PR adds support for `google-cloud-cpp` to the Conda files.
Probably the most difficult change to grok is the change to compile with
C++17 when using Conda:

- Conda defaults all its builds to C++17,
  [this bug](conda/conda-build#3375) goes into
  some detail as to why.
- Arrow defaults to C++11 if no `CMAKE_CXX_STANDARD` argument is
  provided.
- Abseil's ABI changes when used from C++11 vs. C++17, see
  abseil/abseil-cpp#696
- Therefore, one must compile with C++17 to use Abseil in Conda.
- And because `google-cloud-cpp` has a direct dependency on Abseil,
  exposed through the headers, one must use C++17 to use
  `google-cloud-cpp` too.

Closes apache#11916 from coryan/ARROW-14506-add-google-cloud-cpp-to-conda-files

Lead-authored-by: Uwe L. Korn <uwe.korn@quantco.com>
Co-authored-by: Carlos O'Ryan <coryan@google.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
vfraga pushed a commit to rafael-telles/arrow that referenced this pull request Mar 25, 2022
This PR adds support for `google-cloud-cpp` to the Conda files.
Probably the most difficult change to grok is the change to compile with
C++17 when using Conda:

- Conda defaults all its builds to C++17,
  [this bug](conda/conda-build#3375) goes into
  some detail as to why.
- Arrow defaults to C++11 if no `CMAKE_CXX_STANDARD` argument is
  provided.
- Abseil's ABI changes when used from C++11 vs. C++17, see
  abseil/abseil-cpp#696
- Therefore, one must compile with C++17 to use Abseil in Conda.
- And because `google-cloud-cpp` has a direct dependency on Abseil,
  exposed through the headers, one must use C++17 to use
  `google-cloud-cpp` too.

Closes apache#11916 from coryan/ARROW-14506-add-google-cloud-cpp-to-conda-files

Lead-authored-by: Uwe L. Korn <uwe.korn@quantco.com>
Co-authored-by: Carlos O'Ryan <coryan@google.com>
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

6 participants