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

-- 
Greg "Dr Bean" Matheson         Teaching: The last refuge of the manipulative.
http://drbean.sdf.org           --Dr Bean
[email protected]            

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

Reply via email to