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

Optionally (by default) download & build stripped arrow as part of rerun_sdk #4051

Merged
merged 20 commits into from
Oct 29, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Oct 27, 2023

What

Confirmed to be working on Linux, Mac and Windows. On windows also made sure this works with debug runtime and experimented a bit with Visual Studio setups. Also checked Windows against the external sample, see rerun-io/cpp-example-opencv-eigen#8

Made improvements to our CMakeLists files overall. Notably we no longer need DOWNLOAD_EXTRACT_TIMESTAMP ON to suppress warnings - idea from rerun-io/cpp-example-opencv-eigen#6, setting a range for the cmake version fixes it

Drawbacks:

  • LOTS of cmake log spam during build
  • a bit longer builds on the first run, seems to be a bit more pronounced on Windows (no hard numbers available yet)

Advantages:

  • no longer needed to install libarrow
  • works on Windows debug builds (note that other libraries like OpenCV might still have this issue)
  • stable against all c++ library/compiler changes, no fear of weird runtime errors because of stdlib mismatches
  • more lightweight artifacts - on Windows one would have needed to ship a large number of dlls, now none

It's still worth considering if we should ship prebuilt debug & release arrow dlls instead.

TODO: We need to document this new behavior and how to turn it off in the respective doc pages. By default the user no longer needs to install libArrow with this.

Important CMake options that need documenting (can partially copy& paste this!):

  • RERUN_ARROW_LINK_SHARED
    • exited before but now it's default OFF (EDIT:) on windows. This makes it easier to relocate windows executable (don't need to copy Arrow.dll around!). EDIT: On mac this made the address sanitizer crazy for me and I reckon it's an unnecessary slowdown
  • RERUN_ARROW_EXTERNAL_PROJECT (new!)
    • Default on
    • If enabled we download Arrow 10.0.1 and build it in a as small as possible fashion
    • If disabled we run find_package == old behavior
  • RERUN_C_LIB
    • where to find the static c library that rerun_sdk links against
    • in repo defaults to cargo built
    • outside repo defaults to /lib/ folder + platform artifact name

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@Wumpf Wumpf added enhancement New feature or request 🏹 arrow concerning arrow 🌊 C++ API C/C++ API specific exclude from changelog PRs with this won't show up in CHANGELOG.md labels Oct 27, 2023
rerun_cpp/CMakeLists.txt Outdated Show resolved Hide resolved
rerun_cpp/CMakeLists.txt Outdated Show resolved Hide resolved
rerun_cpp/CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

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

Tested this on linux -- works for me and looks great. Much as I love pixi this really lowers the bar for ease of integration.

@Wumpf Wumpf merged commit c0521ee into main Oct 29, 2023
33 of 34 checks passed
@Wumpf Wumpf deleted the cmc/arrow_cpp_from_src branch October 29, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏹 arrow concerning arrow 🌊 C++ API C/C++ API specific enhancement New feature or request exclude from changelog PRs with this won't show up in CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate whether we can build arrow-cpp from source in C++
3 participants