Skip to content

Commit

Permalink
i#6947: Document "using undefined symbol!" runtime error (#6948)
Browse files Browse the repository at this point in the history
Add a comment documenting the "using undefined symbol!" runtime error
that client developers get if they use a DynamoRIO extension like drmgr
but don't call use_DynamoRIO_extension in their CMakeLists.txt.

Fixes: #6947
  • Loading branch information
philramsey-arm authored Aug 29, 2024
1 parent 8db35ac commit 2583278
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/docs/deployment.dox
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ The \p samples/CMakeLists.txt file in the release package serves as another
example. The top of \p DynamoRIOConfig.cmake contains detailed
instructions as well.

If your client uses DynamoRIO extensions like drmgr or drx be sure to call
use_DynamoRIO_extension() in your client's CMakeLists.txt file.

When configuring, the \p DynamoRIO_DIR CMake variable can be passed in to
identify the directory that contains the \p DynamoRIOConfig.cmake file. For
example:
Expand Down
3 changes: 3 additions & 0 deletions make/DynamoRIOConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,9 @@ set(DynamoRIO_EXT_droption_INC ${DynamoRIO_cwd}/../ext/include)
set(DynamoRIO_EXT_drmemtrace_static_NOLIB ON)

# DynamoRIO Extensions
# Failure to call this in your client CMakeLists.txt when using an extension like
# drmgr or drx will result in an obscure "using undefined symbol!" runtime
# error on Linux.
function (use_DynamoRIO_extension target extname)
if (NOT DynamoRIO_INTERNAL)
# We only support Extensions as imported targets that have already
Expand Down

0 comments on commit 2583278

Please sign in to comment.