Merged
Conversation
emilk
approved these changes
Oct 27, 2023
Member
emilk
left a comment
There was a problem hiding this comment.
Thank you for submitting this PR! Looks good to me
Merged
4 tasks
Wumpf
added a commit
to rerun-io/rerun
that referenced
this pull request
Oct 29, 2023
…run_sdk (#4051) ### What * Fixes #4028 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 * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/{{ pr.number }}) (if applicable) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/{{ pr.number }}) - [Docs preview](https://rerun.io/preview/{{ pr.commit }}/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/{{ pr.commit }}/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/) --------- Co-authored-by: Clement Rey <cr.rey.clement@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I tested the example, on Windows, and I experienced the following problems.
Link failure due to use of Debug CMAKE_BUILD_TYPE
At the end of
pixi run runthe linking was failing with:The reason for that is (I believe) that in general on Windows/MSVC the ABI of Release builds is not compatible with the Debug builds.
conda-forge(and so pixi) only containsReleasebuilds, so in general it is not possible to build C++ projects in Debug mode on Windows/MSVC. I think a good compromise is to useRelWithDebInfoinstead ofDebug, this is done in 6353d7e .CMake warning due to unset policy
During CMake configuration, I get this warning:
A simple way to avoid this warning is just to set
policy_maxargument ofcmake_minimum_requiredto3.27, as done in 63bf6c6 .