Skip to content

Commit e48f813

Browse files
authored
i#7260: tool.drcacheoff.purestatic bug fix (#7261)
`tool.drcacheoff.purestatic` fails to build due to `libxxhash` missing. This library is used by `liblz4` in some cases, and must be statically linked when building the `tool.drcacheoff.purestatic` app, which we use in some tests. We update the doc adding `libxxhash-dev` to the list of packages that need to be installed to build DynamoRIO on Linux. Note: `tool.drcacheoff.purestatic` is currently only built in x64 Linux hosts. Fixes #7260
1 parent 700df3d commit e48f813

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,10 @@ if (UNIX AND X64)
19151915
mac_add_inc_and_lib(lz4.h liblz4.a)
19161916
endif ()
19171917
endif ()
1918+
find_library(libxxhash xxhash)
1919+
if (libxxhash)
1920+
message(STATUS "Found libxxhash: ${libxxhash}")
1921+
endif ()
19181922
endif ()
19191923

19201924
if (BUILD_CLIENTS)

api/docs/building.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ To build DynamoRIO on Linux, use the following commands as a guide. This builds
4545
```
4646
# Install dependencies for Ubuntu 15+. Adjust this command as appropriate for
4747
# other distributions (in particular, use "cmake3" for Ubuntu Trusty).
48-
$ sudo apt-get install cmake g++ g++-multilib doxygen git zlib1g-dev libunwind-dev libsnappy-dev liblz4-dev
48+
$ sudo apt-get install cmake g++ g++-multilib doxygen git zlib1g-dev libunwind-dev libsnappy-dev liblz4-dev libxxhash-dev
4949
# Get sources and initialize the submodules.
5050
$ git clone --recurse-submodules -j4 https://github.com/DynamoRIO/dynamorio.git
5151
# Make a separate build directory. Building in the source directory is not
@@ -170,7 +170,7 @@ In order to build both 32-bit and 64-bit on the same platform you'll need
170170
compiler support for targeting both architectures. Then install these packages:
171171

172172
```
173-
sudo apt-get install cmake g++ g++-multilib doxygen zlib1g-dev libunwind-dev libunwind-dev:i386 libsnappy-dev liblz4-dev
173+
sudo apt-get install cmake g++ g++-multilib doxygen zlib1g-dev libunwind-dev libunwind-dev:i386 libsnappy-dev liblz4-dev libxxhash-dev
174174
```
175175

176176
For older distributions, the `ia32-libs` package is needed.

clients/drcachesim/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,9 @@ macro(add_drmemtrace name type static_DR no_main)
568568
if (liblz4)
569569
target_link_libraries(${name} lz4)
570570
endif ()
571+
if (libxxhash)
572+
target_link_libraries(${name} xxhash)
573+
endif ()
571574
if (RISCV64)
572575
target_link_libraries(${name} atomic)
573576
endif ()

0 commit comments

Comments
 (0)