Re: rust library returns "Invalid target name: 'x86_64-pc-cygwin'"
Dr Bean via Cygwin <[email protected]>
| Newsgroups | gmane.os.cygwin |
|---|---|
| Message-ID | <[email protected]> |
Enabling both envars produces fuller backtrace, as below.
On Sun, 22 Feb 2026, Dr Bean via Cygwin wrote:
> I'm trying to build tooi, a python mastodon TUI
> (https://codeberg.org/ihabunek/tooi), which depends on
> pydantic, a python-rust data validation module.
> Building with python-3.12, in a venv virtual
> environment, invoking `pip3 install .`,
> pydantic fails with the message,
> Building wheel for pydantic-core (pyproject.toml) ... error
> error: subprocess-exited-with-error
> × Building wheel for pydantic-core (pyproject.toml) did not run successfully.
> │ exit code: 1
> ╰─> [22 lines of output]
> Running `maturin pep517 build-wheel -i /home/drbean/dot/browser/tooi/.venv.312/bin/python3 --compatibility off`
> 🍹 Building a mixed python/rust project
> 🔗 Found pyo3 bindings
> 🐍 Found CPython 3.12 at /home/drbean/dot/browser/tooi/.venv.312/bin/python3
> 📡 Using build options bindings from pyproject.toml
> Compiling proc-macro2 v1.0.86
> Compiling unicode-ident v1.0.12
> Compiling target-lexicon v0.13.2
> error: failed to run custom build command for `target-lexicon v0.13.2`
> Caused by:
> process didn't exit successfully: `/tmp/pip-install-jvwnp9e1/pydantic-core_f4b932677649467ab031f90bc26a5065/target/release/build/target-lexicon-a0d8869a1d22c23b/build-script-build` (exit status: 101)
> --- stderr
> thread 'main' (1) panicked at /home/drbean/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.13.2/build.rs:52:54:
> Invalid target name: 'x86_64-pc-cygwin'
> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
> warning: build failed, waiting for other jobs to finish...
> 💥 maturin failed
> Caused by: Failed to build a native library through cargo
> Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_BUILD_EXTENSION_MODULE="1" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.12-64bit" PYO3_PYTHON="/home/drbean/dot/browser/tooi/.venv.312/bin/python3" PYTHON_SYS_EXECUTABLE="/home/drbean/dot/browser/tooi/.venv.312/bin/python3" "cargo" "rustc" "--profile" "release" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-jvwnp9e1/pydantic-core_f4b932677649467ab031f90bc26a5065/Cargo.toml" "--lib" "--crate-type" "cdylib"`
> Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/home/drbean/dot/browser/tooi/.venv.312/bin/python3', '--compatibility', 'off'] returned non-zero exit status 1
> [end of output]
> note: This error originates from a subprocess, and is likely not a problem with pip.
> ERROR: Failed building wheel for pydantic-core
> Successfully built toot-tooi
> Failed to build pydantic-core
> Running with RUST_BACKTRACE=1 and then RUST_BACKTRACE=full, produces
> the same output but in addition the backtrace,
> --->%
> error: failed to run custom build command for `target-lexicon v0.13.2`
> note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
> Caused by:
> process didn't exit successfully: `/tmp/pip-install-i6xwee_g/pydantic-core_d54b807af2e64234b3895bffc7166967/target/release/build/target-lexicon-a0d8869a1d22c23b/build-script-build` (exit status: 101)
> --- stderr
> thread 'main' (1) panicked at /home/drbean/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.13.2/build.rs:52:54:
> Invalid target name: 'x86_64-pc-cygwin'
> stack backtrace:
> 0: 0x10045e9b0 - <unknown>
> 1: 0x10048d1aa - <unknown>
> 2: 0x1004186ff - <unknown>
> 3: 0x10042a0e5 - <unknown>
> 4: 0x100431ba2 - <unknown>
> 5: 0x100431a1a - <unknown>
> 6: 0x100432367 - <unknown>
> 7: 0x100432132 - <unknown>
> 8: 0x10042a21f - <unknown>
> 9: 0x10040fece - <unknown>
> 10: 0x10049db01 - <unknown>
> 11: 0x1004091bd - <unknown>
> 12: 0x10040ae1c - <unknown>
> 13: 0x100408f9d - <unknown>
> 14: 0x1004099b6 - <unknown>
> 15: 0x1004094b9 - <unknown>
> 16: 0x100401bac - <unknown>
> 17: 0x10041c045 - <unknown>
> 18: 0x100401b97 - <unknown>
> 19: 0x10040d80f - <unknown>
> 20: 0x7ffc3dbf80f3 - <unknown>
> 21: 0x7ffc3dbf5cd5 - <unknown>
> 22: 0x7ffc3dbf5d8b - <unknown>
> 23: 0x0 - <unknown>
> warning: build failed, waiting for other jobs to finish...
> ------>%
> Running with the advised
> CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true envar
> produces the same output as with no envars.
> Reading from a "Platform" dropdown on a target-lexicon
> doc page, https://docs.rs/crate/target-lexicon/latest
> the supported platforms appear to be
> aarch64-apple-darwin
> aarch64-unknown-linux-gnu
> i686-pc-windows-msvc
> x86_64-pc-windows-msvc
> x86_64-unknown-linux-gnu
> That is, no x86_64-pc-cygwin
Enabling both RUST_BACKTRACE=full and
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true
produces more information:
× Building wheel for pydantic-core (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [91 lines of output]
Running `maturin pep517 build-wheel -i /home/drbean/dot/browser/tooi/.venv.312/bin/python3 --compatibility off`
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.12 at /home/drbean/dot/browser/tooi/.venv.312/bin/python3
📡 Using build options bindings from pyproject.toml
Compiling proc-macro2 v1.0.86
Compiling unicode-ident v1.0.12
Compiling target-lexicon v0.13.2
error: failed to run custom build command for `target-lexicon v0.13.2`
Caused by:
process didn't exit successfully: `/tmp/pip-install-s56o7awx/pydantic-core_db6fcc382f8942f1b53e915621dc0eb1/target/release/build/target-lexicon-64e748e5367b5657/build-script-build` (exit status: 101)
--- stderr
thread 'main' (1) panicked at /home/drbean/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.13.2/build.rs:52:54:
Invalid target name: 'x86_64-pc-cygwin'
stack backtrace:
0: 0x100460b20 - std::backtrace_rs::backtrace::libunwind::trace::hb646b3818c959e30
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
1: 0x100460b20 - std::backtrace_rs::backtrace::trace_unsynchronized::hccaef05b188d129d
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
2: 0x100460b20 - std::sys::backtrace::_print_fmt::h125f99c616e9f9a8
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/sys/backtrace.rs:66:9
3: 0x100460b20 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha6ddd3ae47888e14
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/sys/backtrace.rs:39:26
4: 0x10048f31a - core::fmt::rt::Argument::fmt::h00686ef01f35f425
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/core/src/fmt/rt.rs:173:76
5: 0x10048f31a - core::fmt::write::hafb6881693bf3ac2
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/core/src/fmt/mod.rs:1468:25
6: 0x10041a86f - std::io::default_write_fmt::h4dab8dfbed8868d4
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/io/mod.rs:639:11
7: 0x10041a86f - std::io::Write::write_fmt::h6edf97c3b63c3bce
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/io/mod.rs:1954:13
8: 0x10042c255 - std::sys::backtrace::BacktraceLock::print::hd2c616b84c76485c
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/sys/backtrace.rs:42:9
9: 0x100433d12 - std::panicking::default_hook::{{closure}}::h6da411585cd73d3b
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:301:27
10: 0x100433b8a - std::panicking::default_hook::h8cc9d3cc33951cab
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:328:9
11: 0x1004344d7 - std::panicking::panic_with_hook::h4312c31a5a302915
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:834:13
12: 0x1004342a2 - std::panicking::panic_handler::{{closure}}::hd9bcf2a0d94c90cb
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:707:13
13: 0x10042c38f - std::sys::backtrace::__rust_end_short_backtrace::hf2f69349f5fedde2
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/sys/backtrace.rs:174:18
14: 0x10041203e - __rustc[bb0b2f28308e8f2c]::rust_begin_unwind
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:698:5
15: 0x10049fc71 - core::panicking::panic_fmt::h4fdf6c90c527357e
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/core/src/panicking.rs:75:14
16: 0x100402375 - build_script_build::main::{{closure}}::h9b09661ee805f8eb
at /home/drbean/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.13.2/build.rs:52:54
17: 0x10040bdae - core::result::Result<T,E>::unwrap_or_else::hde682de2de6c2c40
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/core/src/result.rs:1615:23
18: 0x10040213d - build_script_build::main::h3471bd3a69afb0f6
at /home/drbean/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/target-lexicon-0.13.2/build.rs:52:35
19: 0x10040a51b - core::ops::function::FnOnce::call_once::h0752857881febfc5
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/core/src/ops/function.rs:250:5
20: 0x100409f2e - std::sys::backtrace::__rust_begin_short_backtrace::hc45b17075d48ad69
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/sys/backtrace.rs:158:18
21: 0x100402771 - std::rt::lang_start::{{closure}}::hc389f9dae62d10bf
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/rt.rs:206:18
22: 0x10041e1b5 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc60b0456de58364d
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/core/src/ops/function.rs:287:21
23: 0x10041e1b5 - std::panicking::catch_unwind::do_call::h2e5898e688b1a50b
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:590:40
24: 0x10041e1b5 - std::panicking::catch_unwind::h7f62609155fe9d0e
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:553:19
25: 0x10041e1b5 - std::panic::catch_unwind::h0ba95c81ca504784
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panic.rs:359:14
26: 0x10041e1b5 - std::rt::lang_start_internal::{{closure}}::h0c3db5bbfb345efc
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/rt.rs:175:24
27: 0x10041e1b5 - std::panicking::catch_unwind::do_call::h63c21c83bfb6e719
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:590:40
28: 0x10041e1b5 - std::panicking::catch_unwind::h0d97b5c5b15613b0
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panicking.rs:553:19
29: 0x10041e1b5 - std::panic::catch_unwind::h8fbdd35aeccb7f71
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/panic.rs:359:14
30: 0x10041e1b5 - std::rt::lang_start_internal::h9c9e175168bee11c
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/rt.rs:171:5
31: 0x10040275a - std::rt::lang_start::hd92f0fe6ad35a7be
at /cygdrive/d/a/scallywag/rust/rust-1.91.0-1.x86_64/src/rustc-1.91.0-src/library/std/src/rt.rs:205:5
32: 0x1004095ef - main
33: 0x7ffb7d4980f3 - <unknown>
34: 0x7ffb7d495cd5 - <unknown>
35: 0x7ffb7d495d8b - <unknown>
36: 0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_BUILD_EXTENSION_MODULE="1" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.12-64bit" PYO3_PYTHON="/home/drbean/dot/browser/tooi/.venv.312/bin/python3" PYTHON_SYS_EXECUTABLE="/home/drbean/dot/browser/tooi/.venv.312/bin/python3" "cargo" "rustc" "--profile" "release" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-s56o7awx/pydantic-core_db6fcc382f8942f1b53e915621dc0eb1/Cargo.toml" "--lib" "--crate-type" "cdylib"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/home/drbean/dot/browser/tooi/.venv.312/bin/python3', '--compatibility', 'off'] returned non-zero exit status 1
[end of output]
--
Greg "Dr Bean" Matheson Academic politics is so bitter because the stakes
http://drbean.sdf.org are so small.
[email protected] --Wallace S Sayre
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple