#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?

#1142711#20
Date:
2026-09-06 09:10:23 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
rust-libcst, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1142711@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Maximiliano Curia <maxy@debian.org> (supplier of updated rust-libcst package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 06 Sep 2026 10:27:36 +0200
Source: rust-libcst
Architecture: source
Version: 1.8.6-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Changed-By: Maximiliano Curia <maxy@debian.org>
Closes: 1142711
Changes:
 rust-libcst (1.8.6-3) unstable; urgency=medium
 .
   * Team upload.
   * Package libcst 1.8.6 from crates.io using debcargo 2.8.3
   * Port to annotate-snippets 0.12 (Closes: #1142711)
Checksums-Sha1:
 201e238dec46e8410feacaed62ef33d58b2ffebf 2804 rust-libcst_1.8.6-3.dsc
 b6311d4e4a811c95e2bf5ab2f9bbf3cdc62a6124 5772 rust-libcst_1.8.6-3.debian.tar.xz
 6d679ee0d05b43e35710871d4dbabd60a354eb3a 7811 rust-libcst_1.8.6-3_source.buildinfo
Checksums-Sha256:
 3d8cdec7ad153d4338d5fba15a6c4287e001568f77c7dd62277a0a35289d7ee7 2804 rust-libcst_1.8.6-3.dsc
 e7cffdf3bfe8d50cb8e98a45ed21f47103ef24237aee26531ff403abf253226b 5772 rust-libcst_1.8.6-3.debian.tar.xz
 d902fb99351756d96a91b7a4d6b31df998e06c64a724b471a357f5d965f7bb29 7811 rust-libcst_1.8.6-3_source.buildinfo
Files:
 1fe4d574c9153b73e35f34879c647749 2804 rust optional rust-libcst_1.8.6-3.dsc
 1b9320b474576b33de95dad7a2390a1e 5772 rust optional rust-libcst_1.8.6-3.debian.tar.xz
 044c7cf901c4772efeae932a86388d28 7811 rust optional rust-libcst_1.8.6-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+JIdOnQEyG4RNSIVxxl2mbKbIyoFAmqdJDMACgkQxxl2mbKb
Iyo3hBAAl8dcov6l6t1iImydB8wc/uNVrCdYiP5vmPw6NEtLtTE2zNA5e3AZ02Y6
Un0hykbbZ6RR2lx+C0O5bjv27JiRGmB/ORvgPNheHV597UgfjyeaSX35Ag+HItUw
70nswsbzyDtPTz/2PlYtyrWKL7nt6s8GQtSxTs910AtPaJ6niUPdEgq32fOT273Z
bY6CC8r7x43oCD81W37G67dvQ2KKebGWbJA/3wDvNGl59dYz9Z/vETAvfJ1Z4bO9
MjmWnx1qdYePvIC1Kp9aL2ClNRrBkx8WM5M/bCkH906a/6BrGA6bUTua6XLREYDa
ukX7L7G1xus2CzPYhbclMpiPPy0MyS816+bgR3LfmwjhOQz8W8FrmBwgCW4rPQCX
VwFK74jMoNf5BThfG72k1KycXcL39SdcHgF/IwA39L3M4RAh1i8ORvW5UCxJH5s/
INvOHt7m8DiRhBmUaHmzgl4vj6x1vYPFg2ORAmZ1thAsB94iNZvDkdHRFnSWzEXA
/42EgmC8QvvKDGUnt6NI2dVXwoGR0Gp+DF+B1HFruRgWeBzmF0XkZqZpdQEjOpvS
Ku5pkxLTBnAUk56Cs6B9fls7fU5Pg17uRE9uf+DSwQRtUFSGa3abvKXVaNitV50B
7+Fg6NNcem0bEEaowisXSPtoKNjSqIJjb6EuGN89IpvjIOh1NTA=
=7c+k
-----END PGP SIGNATURE-----