Skip to content

Conversation

@youknowone
Copy link

No description provided.

@youknowone youknowone marked this pull request as ready for review November 18, 2025 16:44
Copy link
Owner

@emmatyping emmatyping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor suggestions but otherwise seems good! Thank you for working on this!

@youknowone youknowone changed the title Fix cargo path for cross compile Fix cargo path and add CARGO_TARGET for cross compile Nov 19, 2025
@youknowone
Copy link
Author

youknowone commented Nov 19, 2025

Since the original patch was just 2 lines, I added another commit to support --target instead creating a new one.
Please review it again.
Now configure correctly generate commands, but not compilable. I will leave it for who knows better than me

.../cpython/Include/internal/mimalloc/mimalloc/prim.h:129:8: error: thread-local storage is not supported for the current target
.../cpython/Include/internal/pycore_pystate.h:93:8: error: thread-local storage is not supported for the current target
.../cpython/Include/internal/pycore_pystate.h:94:8: error: thread-local storage is not supported for the current target
.../cpython/Include/internal/pycore_unicodeobject.h:110:9: warning: '_PyUnicodeWriter_PrepareInternal' is deprecated [-Wdeprecated-declarations]
.../cpython/Include/cpython/unicodeobject.h:572:1: note: '_PyUnicodeWriter_PrepareInternal' has been explicitly marked deprecated here
  clang diag:  .../cpython/Include/internal/pycore_unicodeobject.h:110:9: warning: '_PyUnicodeWriter_PrepareInternal' is deprecated [-Wdeprecated-declarations]

  thread 'main' (9832330) panicked at Modules/cpython-sys/build.rs:60:10:
  Unable to generate bindings: ClangDiagnostic(".../cpython/Include/internal/mimalloc/mimalloc/prim.h:129:8: error: thread-local storage is not supported for the current target\n.../cpython/Include/internal/pycore_pystate.h:93:8: error: thread-local storage is not supported for the current target\n.../cpython/Include/internal/pycore_pystate.h:94:8: error: thread-local storage is not supported for the current target\n")
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [cpython-sys] Error 101

@emmatyping emmatyping merged commit 071b7f1 into emmatyping:rust-in-cpython Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants