#1124333 tdjson.pc references tdjson_private but static libraries are disabled

Package:
src:td
Source:
src:td
Submitter:
Carl Keinath
Date:
2026-10-04 08:23:02 UTC
Severity:
normal
Tags:
#1124333#5
Date:
2025-12-30 19:16:08 UTC
From:
To:
Source: td
Version: 1.8.38~git20251126.f0d04d3+dfsg-1
Severity: normal

Dear Maintainer,

The pkg-config file tdjson1.8.57.pc installed by libtd-dev contains
Requires.private: tdjson_private, but Debian builds TDLib with static
libraries disabled and does not ship tdjson_private.pc. As a result,
pkg-config --cflags tdjson1.8.57 fails.

$ pkg-config --libs tdjson1.8.57
-L/usr/lib/x86_64-linux-gnu/TDLib1.8.57 -ltdjson

$ pkg-config --cflags tdjson1.8.57
Package tdjson_private was not found in the pkg-config search path.
Perhaps you should add the directory containing `tdjson_private.pc'
to the PKG_CONFIG_PATH environment variable
Package 'tdjson_private', required by 'tdjson1.8.57', not found

This breaks pkg-config --cflags for consumers such as Rust crates using
system-deps.

Best,

#1124333#10
Date:
2026-10-04 07:43:07 UTC
From:
To:
Control: severity -1 important
Control: tags -1 + patch fixed-upstream


Hi,

a small correction: --libs fails as well, not only --cflags, so the .pc
file is currently unusable. This does not block packaging and tgt, but
it forces me to hardcode library paths instead of using pkg-config.

I assume this is because GeneratePkgConfig.cmake lists tdjson_private in
Requires.private, although it is a static library that is linked into
libtdjson.so. Upstream fixed this in 51780ad[1] by skipping static
dependencies of shared libraries.

[1] https://github.com/tdlib/td/commit/51780adaa11465d112172a28d9c4b73bb22bd29c

Best,

#1124333#19
Date:
2026-10-04 08:20:35 UTC
From:
To:
Attached the backported patch

Best,