DynamoRIO / DynamoRIO/dynamorio

BUILD: Testsuite looks for release libdrx.so in lib64/release on debug builds

Open
#7,764 7 comments 0 reactions 0 assignees View on GitHub
Component-Build Component-Tests Status-CannotReproduce Status-NeedInfo
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 18h
Merged PRs (30d)
30

Description

**Describe the bug**
I'm trying to build the test suite in a build directory that has only ever contained a debug build, and it's looking for release libraries. Specifically

````
20: make[2]: *** No rule to make target '/home/palmerdabbelt/dynamorio/build/ext/lib64/release/libdrx.so', needed by 'bin/libopcodes.so'. Stop.
````

**To Reproduce**
1. Start with a clean build directory.
2. Configure a debug build.
3. `make check`

**Expected behavior**
Debug builds from a clean build directory can pass the test suite.

**Screenshots or Pasted Text**
````
Start 20: samples_proj

20: Test command: /usr/bin/ctest "--build-and-test" "/home/palmerdabbelt/dynamorio/build/api/samples" "/home/palmerdabbelt/dynamorio/build/api/samples/build_and_test" "--build-generator" "Unix Makefiles" "--build-project" "DynamoRIO_samples" "--build-makeprogram" "/usr/bin/make" "--build-options" "-DDEBUG=ON" "-DDynamoRIO_DIR:PATH=/home/palmerdabbelt/dynamorio/build/cmake"
20: Test timeout computed to be: 1500
20: Internal cmake changing into directory: /home/palmerdabbelt/dynamorio/build/api/samples/build_and_test
20: ======== CMake output ======
20: The C compiler identification is GNU 9.4.0
20: The CXX compiler identification is GNU 9.4.0
20: Check for working C compiler: /usr/bin/cc
20: Check for working C compiler: /usr/bin/cc -- works
20: Detecting C compiler ABI info
20: Detecting C compiler ABI info - done
20: Detecting C compile features
20: Detecting C compile features - done
20: Check for working CXX compiler: /usr/bin/c++
20: Check for working CXX compiler: /usr/bin/c++ -- works
20: Detecting CXX compiler ABI info
20: Detecting CXX compiler ABI info - done
20: Detecting CXX compile features
20: Detecting CXX compile features - done
20: Configuring done
20: Generating done
20: Build files have been written to: /home/palmerdabbelt/dynamorio/build/api/samples/build_and_test
20: ======== End CMake output ======
20: Change Dir: /home/palmerdabbelt/dynamorio/build/api/samples/build_and_test
20:
20: Run Clean Command:/usr/bin/make clean
20:
20: Run Build Command(s):/usr/bin/make && Scanning dependencies of target opcodes
20: [ 2%] Building C object CMakeFiles/opcodes.dir/opcodes.c.o
20: make[2]: *** No rule to make target '/home/palmerdabbelt/dynamorio/build/ext/lib64/release/libdrx.so', needed by 'bin/libopcodes.so'. Stop.
20: make[1]: *** [CMakeFiles/Makefile2:114: CMakeFiles/opcodes.dir/all] Error 2
20: make: *** [Makefile:84: all] Error 2
20:
20/437 Test #20: samples_proj .....................................................***Failed 0.74 sec
````

**Versions**
This happens on the latest master 049477870 ("i#5365 AArch64 tests: fix drcacheoff.scale_time test for Ubuntu 24.04 (#7761)"), but I think it's been happening for a while.

Contributor guide

Open the contributing guide

Research direction

Start with the samples_proj test invoked by make check and the CMake configuration under api/samples; inspect how DEBUG=ON selects DynamoRIO_DIR and extension-library paths. Reproduce the failure from a clean debug build, then verify that the generated build no longer depends on lib64/release/libdrx.so and that samples_proj passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake
Domain
build-system, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.