Article View: linux.debian.bugs.dist
Article #835Bug#1150887: librnp-dev: CMake package config is unusable, find_package(rnp) fails
From: Olivier Marty
Date: Wed, 14 Oct 2026 11:00
Date: Wed, 14 Oct 2026 11:00
66 lines
4832 bytes
4832 bytes
Package: librnp-dev
Version: 0.18.1-2+b1
Severity: important
Tags: upstream fixed-upstream
Linking rnp::librnp fails to configure:
$ cat > CMakeLists.txt <<'EOT'
cmake_minimum_required(VERSION 3.16)
project(p LANGUAGES C)
find_package(rnp REQUIRED)
file(WRITE ${CMAKE_BINARY_DIR}/t.c "int main(void){return 0;}")
add_executable(t ${CMAKE_BINARY_DIR}/t.c)
target_link_libraries(t PRIVATE rnp::librnp)
EOT
$ cmake -S . -B build
[...]
CMake Error at
/usr/lib/x86_64-linux-gnu/cmake/rnp/rnp-targets.cmake:71
(set_target_properties):
The link interface of target "rnp::librnp" contains:
JSON-C::JSON-C
but the target was not found. Possible reasons include:
[...]
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/rnp/rnp-config.cmake:64 (include)
CMakeLists.txt:3 (find_package)
[...]
CMake Generate step failed. Build files cannot be regenerated
correctly.
Same with -G Ninja, and it is not a CMake 4 strictness thing: trixie fails
identically with cmake 3.31.6 and librnp-dev 0.17.1-1+b1.
rnp-targets.cmake puts JSON-C::JSON-C, Botan::Botan, BZip2::BZip2 and
ZLIB::ZLIB in the link interface, but rnp-config.cmake has no
find_dependency
call, so none of those four targets exists. pkg-config --libs librnp still
works.
Upstream fixed this in 1a597a67 ("cmake: make librnp properly consumable by
downstream packages"), which is in main but in no release: v0.18.1 was
released
2025-11-21, the commit is from July 2026. It adds the find_dependency calls
and installs the find modules the exported targets need, which 0.18.1's
source
tree already contains (they are simply never installed today).
I tried it here: it cherry-picks onto v0.18.1 with no conflict, and patching
the installed files with what it generates makes find_package succeed
and the
consumer build. One caveat: the find_dependency calls mean a consumer then
needs libbotan-3-dev, libjson-c-dev, zlib1g-dev and libbz2-dev at configure
time (checked one by one), so librnp-dev would have to depend on them, where
today it depends on librnp0 alone.
If you would rather not pull those in, the alternative is to drop the
$<LINK_ONLY:...> entries from the exported interface: rnp::librnp is
declared
SHARED IMPORTED, librnp-dev ships no static library, and librnp.pc
already has
an empty Libs.private, so nothing downstream needs them.
Could you apply one of the two?
Technical Details
Message-ID:
<NO4Sd-5rD4-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Olivier Marty <omarty@neurontech.fr> Newsgroups: linux.debian.bugs.dist Subject: Bug#1150887: librnp-dev: CMake package config is unusable, find_package(rnp) fails Date: Wed, 14 Oct 2026 13:00:01 +0200 Message-ID: <NO4Sd-5rD4-1@gated-at.bofh.it> X-Original-To: submit@bugs.debian.org, Marty Olivier Vincent <omarty@neurontech.fr> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Oct 14 10:51:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Olivier Marty <omarty@neurontech.fr>, 1150887@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: dkg@fifthhorseman.net X-Debian-Pr-Message: report 1150887 X-Debian-Pr-Package: librnp-dev X-Debian-Pr-Keywords: fixed-upstream upstream X-Debian-Pr-Source: rnp MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: fr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Antiabuse: This header was added to track abuse, please include it with any abuse report X-Antiabuse: Primary Hostname - pf-014.whm.fr-par.scw.cloud X-Antiabuse: Original Domain - bugs.debian.org X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12] X-Antiabuse: Sender Address Domain - neurontech.fr X-Get-Message-Sender-Via: pf-014.whm.fr-par.scw.cloud: authenticated_id: omarty@neurontech.fr X-Authenticated-Sender: pf-014.whm.fr-par.scw.cloud: omarty@neurontech.fr X-Greylist: delayed 1104 seconds by postgrey-1.37 at buxtehude; Wed, 14 Oct 2026 10:49:39 UTC X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1996752 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 66 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 14 Oct 2026 12:31:09 +0200 X-Original-Message-ID: <3865e005-0666-43b3-b365-f8bdc02e35ec@neurontech.fr>