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

Fix pyrealsense2 crash when importing other pybind11 created modules #8570

Merged
merged 3 commits into from
Mar 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions wrappers/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ add_subdirectory("${CMAKE_BINARY_DIR}/third-party/pybind11"
)

set(PYBIND11_CPP_STANDARD -std=c++11)
# Force Pybind11 not to share pyrealsense2 resources with other pybind modules.
# With this definition we force the ABI version to be unique and not risk crashes on different modules.
maloel marked this conversation as resolved.
Show resolved Hide resolved
# (workaround for RS5-10582; see also https://github.com/pybind/pybind11/issues/2898)
add_definitions(-DPYBIND11_COMPILER_TYPE="_librs_abi")
include_directories(${CMAKE_BINARY_DIR}/third-party/pybind11/include)

set(PYRS_CPP
Expand Down