#1142711 rust-libcst : FTBFS on power systems with linkage error

#1142711#5
Date:
2026-07-24 12:29:54 UTC
From:
To:
Source: rust-libcst
Version: 1.8.6-2
Severity: serious
Tags: ftbfs patch
X-Debbugs-Cc: debian-powerpc@lists.debian.org
User: debian-powerpc@lists.debian.org
Usertags: ppc64el powerpc ppc64
X-Debbugs-Cc: pkg-rust-maintainers@alioth-lists.debian.net,
elmer@debian.org

Dear Maintainer,

rust-libcst 1.8.6-2 still FTBFS on ppc64el, ppc64 and powerpc
Bug #1123821 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1123821
was closed as
fixed in 1.8.6-2 but the actual root cause was not addressed.

rust-libcst FTBFS with below errors

Running `CARGO=/usr/bin/cargo CARGO_BIN_NAME=parse
CARGO_CRATE_NAME=parse
CARGO_MANIFEST_DIR=/build/reproducible-path/rust-libcst-1.8.6
CARGO_MANIFEST_PATH=/build/reproducible-path/rust-libcst-1.8.6/Cargo.toml
CARGO_PKG_AUTHORS='LibCST Developers' CARGO_PKG_DESCRIPTION='A Python
parser and Concrete Syntax Tree library.' CARGO_PKG_HOMEPAGE=''
CARGO_PKG_LICENSE='MIT AND (MIT AND PSF-2.0)' CARGO_PKG_LICENSE_FILE=''
CARGO_PKG_NAME=libcst CARGO_PKG_README=README.md
CARGO_PKG_REPOSITORY='https://github.com/Instagram/LibCST'
CARGO_PKG_RUST_VERSION=1.70 CARGO_PKG_VERSION=1.8.6
CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=8
CARGO_PKG_VERSION_PATCH=6 CARGO_PKG_VERSION_PRE=''
CARGO_PRIMARY_PACKAGE=1
LD_LIBRARY_PATH=/build/reproducible-path/rust-libcst-1.8.6/target/debug/deps
rustc --crate-name parse --edition=2018 src/bin.rs --error-format=json
--json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type 
bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg
'feature="default"' --cfg 'feature="py"' --cfg 'feature="pyo3"'
--check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, 
values("default", "py", "pyo3", "trace"))' -C metadata=c90b192fb7fc2851
-C extra-filename=-a525872e85d3246c --out-dir 
/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps
--target powerpc-unknown-linux-gnu -C 
incremental=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/incremental
-L 
dependency=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps
-L 
dependency=/build/reproducible-path/rust-libcst-1.8.6/target/debug/deps
--extern 
annotate_snippets=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps/libannotate_snippets-62a5e459b31f3f7d.rlib
--extern 
libcst_native=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps/liblibcst_native.rlib
--extern 
libcst_derive=/build/reproducible-path/rust-libcst-1.8.6/target/debug/deps/liblibcst_derive-9682f9e59e45b48e.so
--extern 
memchr=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps/libmemchr-f9862d65c1439b32.rlib
--extern 
paste=/build/reproducible-path/rust-libcst-1.8.6/target/debug/deps/libpaste-8db5ccca53e9c49e.so
--extern 
peg=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps/libpeg-18d0c9c74e4c82d8.rlib
--extern 
pyo3=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps/libpyo3-0353dc184ffba90d.rlib
--extern 
regex=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps/libregex-28c92c581806fe37.rlib
--extern 
thiserror=/build/reproducible-path/rust-libcst-1.8.6/target/powerpc-unknown-linux-gnu/debug/deps/libthiserror-aa27799233c2a768.rlib
-C debuginfo=2 -C strip=none --cap-lints warn -C 
linker=powerpc-linux-gnu-gcc -C link-arg=-Wl,-z,relro
--remap-path-prefix 
/build/reproducible-path/rust-libcst-1.8.6=/usr/share/cargo/registry/libcst-1.8.6
--remap-path-prefix 
/build/reproducible-path/rust-libcst-1.8.6/debian/cargo_registry=/usr/share/cargo/registry`
error: linking with `powerpc-linux-gnu-gcc` failed: exit status: 1


See build logs for reference:
ppc64el:
https://buildd.debian.org/status/fetch.php?pkg=rust-libcst&arch=ppc64el&ver=1.8.6-2&stamp=1776711560&raw=0
powerpc:
https://buildd.debian.org/status/fetch.php?pkg=rust-libcst&arch=powerpc&ver=1.8.6-2&stamp=1776855421&raw=0
ppc64:
https://buildd.debian.org/status/fetch.php?pkg=rust-libcst&arch=ppc64&ver=1.8.6-2&stamp=1784027611&raw=0


Thanks,
Trupti

#1142711#10
Date:
2026-07-24 13:03:41 UTC
From:
To:
Hello,


The package is falling because:

The [[bin]] "parse" target in Cargo.toml is compiled with
feature="py" active, which enables pyo3/extension-module. Since
pyo3 >= 0.27 this feature suppresses -lpython from the linker
command. During cross-compilation no target Python interpreter
is available, so all Python C-API symbols (PyTuple_New,
_Py_Dealloc, PyGILState_Ensure, etc.) are unresolved -> link fails.

The binary is not shipped in any Debian package (bin=false in
debcargo.toml), so the fix is simply to disable building it,
the same way benchmarks are disabled in the existing
debian/patches/disable-benches patch.

Below patch fix the issue on all ppc64el, powerpc and ppc64 architecture
I have tested it on my ppc64el system.


Index: rust-libcst-1.8.6/Cargo.toml
===================================================================
--- rust-libcst-1.8.6.orig/Cargo.toml
+++ rust-libcst-1.8.6/Cargo.toml
@@ -49,7 +49,7 @@ crate-type = [
  ]
  path = "src/lib.rs"

-[[bin]]
+[[disabled.bin]]
  name = "parse"
  path = "src/bin.rs"



Thanks,
Trupti

#1142711#15
Date:
2026-07-25 09:56:13 UTC
From:
To:
but doesn't that mean the `py` feature is broken? and why do you
mention cross compilation, the FTBFS is for a regular build and
from a quick glance I also don't see any of the CROSS variables
set in pyo3?