#729·py-spy

Native extensions (--native) on Linux aarch64

Author: michalhaberaCreated Nov 28, 2024Updated Mar 27, 2026

I am trying to run with --native and getting

Collecting stack traces from native extensions (`--native`) is not supported on your platform.

if I install using pip3 install py-spy. I am running this inside a privileged docker container (Docker Desktop) with ubuntu 24.04 and Python 3.12.3, on Apple M4.

So I assume that wheels are not built using the unwind feature for my platfrom. Thus I tried a manual install as

bash
apt install libunwind-dev
maturin develop --features unwind

However, this fails when compiling python_spy.rs due to

error[E0599]: no method named `bx` found for struct `remoteprocess::libunwind::Cursor` in the current scope
   --> src/python_spy.rs:504:36
    |
504 |             if let Ok(bx) = cursor.bx() {
    |                                    ^^ method not found in `Cursor`

For more information about this error, try `rustc --explain E0599`.

I've checked the library remoteprocess that provides wrappers for libunwind here, and I can only see cursor.bx() implemented for x86_64, not for my platform (Linux d13234187034 6.10.14-linuxkit #1 SMP Thu Oct 24 19:28:55 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux), see https://github.com/benfred/remoteprocess/blob/master/src/linux/libunwind/mod.rs#L89.