[0.26] Missing libiwyu.so.22.1 library
envgap__include-what-you-use__include-what-you-use-1961
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
df466a6b07ea56781b8109858c4dcee3adffe1ae- Manifest
CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
include-what-you-use/include-what-you-use #1961 · read the original issue
The `include-what-you-use` binary builds and links with `libiwyu.so.22.1`, but the CMake doesn't install it, resulting in errors when attempting to run the installed package:
```
can't install iwyu:
- nothing provides libiwyu.so.22.1()(64bit) needed by iwyu-0.26-1.fc45.x86_64
```
The regression introduced by https://github.com/include-what-you-use/include-what-you-use/commit/9c7a6a3c08af3ecfc6e0a8716455435c696b7bb2 and https://github.com/include-what-you-use/include-what-you-use/commit/e9a08a9e6cb32eff8120473ccc51e035d5942451 commits.
Full ldd output:
```
$ ldd ./include-what-you-use
linux-vdso.so.1 (0x00007f511846c000)
libiwyu.so.22.1 => not found
libLLVM.so.22.1 => not found
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f5118000000)
libc.so.6 => /lib64/libc.so.6 (0x00007f5117e0d000)
libm.so.6 => /lib64/libm.so.6 (0x00007f511834e000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f5118320000)
/lib64/ld-linux-x86-64.so.2 (0x00007f511846e000)
```
> We didn't plan to install these libraries, they are only for internal use.
Then these libraries need to be `STATIC` or `OBJECT` to prevent linking against them dynamically.
UPD. Fedora build system always explicitly sets the `-DBUILD_SHARED_LIBS:BOOL=ON` build flag. This may cause `BUILDTREE_ONLY` to be treated as `SHARED`.
UPD2. Explicitly setting the `-DBUILD_SHARED_LIBS:BOOL=OFF` can be used as a workaround. Most Linux distributions will need it.04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]