Skip to content

Commit

Permalink
Fix RPATH problem that was causing bad auditwheel grafting
Browse files Browse the repository at this point in the history
If the RPATH for the plugin did not point to the correct cudaq-qec.so
file, then the auditwheel script was grafting a brand new
cuda-qec-1234abcd.so file, which was causing duplicate extension_point
registries. This was very bad. Setting the correct RPATH seems to make
auditwheel behave much better.

Signed-off-by: Ben Howe <[email protected]>
  • Loading branch information
bmhowe23 committed Jan 18, 2025
1 parent b7c9ad6 commit 7070990
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/qec/lib/decoders/plugins/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ set_target_properties(${MODULE_NAME} PROPERTIES
# ==============================================================================

if (NOT SKBUILD)
set_target_properties(${LIBRARY_NAME} PROPERTIES
set_target_properties(${MODULE_NAME} PROPERTIES
BUILD_RPATH "$ORIGIN"
INSTALL_RPATH "$ORIGIN:$ORIGIN/.."
)

# Let CMake automatically add paths of linked libraries to the RPATH:
set_target_properties(${LIBRARY_NAME} PROPERTIES
set_target_properties(${MODULE_NAME} PROPERTIES
INSTALL_RPATH_USE_LINK_PATH TRUE)
else()
# CUDA-Q install its libraries in site-packages/lib (or dist-packages/lib)
# Thus, we need the $ORIGIN/../lib
set_target_properties(${LIBRARY_NAME} PROPERTIES
set_target_properties(${MODULE_NAME} PROPERTIES
INSTALL_RPATH "$ORIGIN/../../lib"
)
endif()
Expand Down

0 comments on commit 7070990

Please sign in to comment.