[Rpm-maint] [rpm-software-management/rpm] Please add documentation explaining how to use alternate libraries from the test suite (Issue #3199)
Neal H. Walfield
notifications at github.com
Mon Jul 8 15:27:19 UTC 2024
**Describe the bug**
While working on `rpm-sequoia`, I want to run the `rpm` test suite against my version of `librpm_sequoia.so`. `make tree` appears to take the `librpm-sequoia` library from the root file system even though I've configured it (using `PKG_CONFIG_PATH`) to look elsewhere.
**To Reproduce**
First, observe that `cmake` only works when I've set `PKG_CONFIG_PATH`, because I haven't installed `rpm-sequoia-devel`.
```
neal at fedora:~/rpm$ rm -rf _build/
neal at fedora:~/rpm$ mkdir _build
neal at fedora:~/rpm$ cd _build/
neal at fedora:~/rpm/_build$ cmake -DENABLE_PYTHON=OFF ..
-- Checking for module 'rpm-sequoia>=1.4.0'
-- Package 'rpm-sequoia', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:619 (message):
The following required packages were not found:
- rpm-sequoia>=1.4.0
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:841 (_pkg_check_modules_internal)
rpmio/CMakeLists.txt:21 (pkg_check_modules)
-- Configuring incomplete, errors occurred!
neal at fedora:~/rpm/_build$ cd ..
neal at fedora:~/rpm$ rm -rf _build/
neal at fedora:~/rpm$ mkdir _build
neal at fedora:~/rpm$ cd _build/
neal at fedora:~/rpm/_build$ export PKG_CONFIG_PATH=$HOME/rpm-sequoia/target/release
neal at fedora:~/rpm/_build$ export LD_LIBRARY_PATH=$HOME/rpm-sequoia/target/release
neal at fedora:~/rpm/_build$ cmake -DENABLE_PYTHON=OFF ..
...
-- Generating done (0.0s)
-- Build files have been written to: /home/neal/rpm/_build
...
Now I run the test suite:
```
neal at fedora:~/rpm/_build$ make && make check
ERROR: 448 tests were run,
7 failed (5 expected failures).
76 tests were skipped.
## ------------------------- ##
## rpmtests.log was created. ##
## ------------------------- ##
Please send `rpmtests.log' and all information you think might help:
To: <http://rpm.org>
Subject: [rpm 5.99.90] rpmtests: 90 207 failed
You may investigate any problem if you feel able to do so, in which
case the test suite provides a good starting point. Its output may
be found below `rpmtests.dir'.
make[3]: *** [tests/CMakeFiles/check.dir/build.make:70: tests/CMakeFiles/check] Error 1
make[2]: *** [CMakeFiles/Makefile2:1595: tests/CMakeFiles/check.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1602: tests/CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:754: check] Error 2
eal at fedora:~/rpm/_build$ cat tests/rpmtests.dir/207/rpmtests.log
# -*- compilation -*-
207. rpmsigdig.at:499: testing rpmkeys --import invalid keys ...
/rpmsigdig.at:507:
runroot rpmkeys --quiet --import /data/keys/CVE-2021-3521-badbind.asc
echo exit code: $? >&2
/rpmsigdig.at:520:
runroot rpmkeys --quiet --import /data/keys/CVE-2021-3521-nosubsig.asc
echo exit code: $? >&2
--- - 2024-07-08 15:09:28.800244394 +0000
+++ /srv/rpmtests.dir/at-groups/207/stderr 2024-07-08 15:09:28.797363072 +0000
@@ -1,2 +1,3 @@
-exit code: 0
+rpmkeys: symbol lookup error: /usr/local/lib64/librpmio.so.10: undefined symbol: _pgpPubkeyMerge
+exit code: 127
207. rpmsigdig.at:499: 207. rpmkeys --import invalid keys (rpmsigdig.at:499): FAILED (rpmsigdig.at:520)
```
The above is complaining about the missing `_pgpPubkeyMerge` symbol. So it looks like it is picking up the system `librpm_sequoia.so` and not the one configured via `pkg-config`:
```
neal at fedora:~/rpm/_build$ objdump -T $HOME/rpm-sequoia/target/release/librpm_sequoia.so.1 | grep pgpPubkeyMerge
0000000000062e90 g DF .text 00000000000005d7 Base _pgpPubkeyMerge
neal at fedora:~/rpm/_build$ objdump -T /usr/lib64/librpm_sequoia.so.1 | grep pgpPubkeyMerge
```
**Expected behavior**
I expect to be able to use an alternate library.
**Environment**
```
neal at fedora:~/rpm/_build$ git log -n 1
commit 775acf13850373c16d4b0d02a1970339c381f19b (HEAD -> master, origin/master, origin/HEAD)
Author: Panu Matilainen <pmatilai at redhat.com>
Date: Wed Jun 26 11:04:00 2024 +0300
...
```
**Additional context**
Thanks for any help.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3199
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3199 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240708/1c8c31ec/attachment.html>
More information about the Rpm-maint
mailing list