-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown target cpu : xtensa-esp32s3-espidf #2088
Comments
It looks like you're building ring from source, but not from within a Git checkout. Thus, build.rs doesn't see
What is the exact command line of |
Everytime I set from cmd:
And finally I do cargo build. warning: ring@0.17.8: In file included from C:\Users\lpirc.cargo\git\checkouts\ring-51509f604a4fd25b\70b59d6\include/ring-core/base.h:74, error: failed to run custom build command for It's the same error as #2008 (comment) |
What does |
This is xtensa-esp32s3-elf-gcc.exe --version output: xtensa-esp32s3-elf-gcc.exe (crosstool-NG esp-2021r2-patch5) 8.4.0 I added this to target.h: Now, when I compile it, I don't get any errors or warnings, but I don't know actually if it will work fine. |
In target.h, you can see:
Ideally, you would upgrade to a newer version of GCC. Then it should "just work." Otherwise, you can find out what symbol to add to the above |
Yes, I wrote Xtensa with '__' as the beginning and end as you said, but in markdown double underscores are used to format text as bold, as you can see in the previous message. |
OK, it looks like somebody just needs to submit the PR. |
Do you want me to submit a PR with the lines I added for xtensa? |
^ Please extend that line. Incidentally, is there no newer version of the xtensa SDK that lets you use GCC 10 or higher? |
I changed to GCC 12 because now I'm using esp-idf 5.1, which requires GCC 12. |
https://www.esp32.com/viewtopic.php?t=1612 and other things seem to say that you may need |
@briansmith since I can't find a PR from @lorenzo-pirchio , I will create one myself. Furthermore, I'm on GCC V 13 (via crosstools) and still encounter the same error. |
@briansmith I can confirm building works with
|
im also trying to build rustls with ring on esp32, here is a fragment of my [dependencies]
log = { version = "0.4", default-features = false }
esp-idf-svc = { version = "0.49", default-features = false }
h3-shim = { git = "https://github.com/ealinye/gm-quic.git" }
bytes = "1"
futures = "0.3"
tokio = { version = "1", features = ["rt"] }
ring = { version = "0.17.8", features = ["less-safe-getrandom-espidf"] }
[dependencies.rustls]
version = "0.23"
default-features = false
features = ["std", "ring"]
# [dependencies.reqwest]
# git = "https://github.com/ealinye/reqwest.git"
# default-features = false
# features = ["http3"]
# branch = "ealinye"
[patch.crates-io]
ring = { git = "https://github.com/briansmith/ring.git" }
rustls = { git = "https://github.com/rustls/rustls.git" }
[build-dependencies]
embuild = "0.32.0" But the error i met is different with you, it seems a internal error of conpiler?
|
Hi,
I'm working on a project on esp32s3, I need to use rustls but I have problems with the ring crate since xtensa is not supported .
I'm using the esp32-idf-template (https://github.com/esp-rs/esp-idf-template), and I changed the depedencies adding the ones I needed.
As suggested by @briansmith, I am using the latest commit on the main branch, checking if there is this change (ed5b2a8), but It still doesn't work.
To be sure that I was using the latest commit, I downloaded the repo and added it as a local dependency.
This is my cargo.toml:
`[package]
name = "s3_rust"
version = "0.1.0"
edition = "2021"
resolver = "2"
rust-version = "1.71"
[[bin]]
name = "s3_rust"
harness = false # do not use the built in cargo test harness -> resolve rust-analyzer errors
[profile.release]
opt-level = "s"
[profile.dev]
debug = true # Symbols are nice and they don't increase the size on Flash
opt-level = "z"
[features]
default = ["std", "embassy", "esp-idf-svc/native"]
pio = ["esp-idf-svc/pio"]
std = ["alloc", "esp-idf-svc/binstart", "esp-idf-svc/std"]
alloc = ["esp-idf-svc/alloc"]
nightly = ["esp-idf-svc/nightly"]
experimental = ["esp-idf-svc/experimental"]
embassy = ["esp-idf-svc/embassy-sync", "esp-idf-svc/critical-section", "esp-idf-svc/embassy-time-driver"]
[dependencies]
log = { version = "0.4", default-features = false }
esp-idf-svc = { version = "0.48", default-features = false }
[target.'cfg(target_os="espidf")'.dependencies]
ring = {path="C:/ring-main/ring-main", features =[ "less-safe-getrandom-espidf"] }
rustls = { version = "0.23.7", default-features = false, features = ["ring", "logging", "std", "tls12"] }
[build-dependencies]
embuild = "0.31.3"
`
This is my config.toml:
`[build]
target = "xtensa-esp32s3-espidf"
[target.xtensa-esp32s3-espidf]
linker = "ldproxy"
runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x
rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: esp-rs/rust#110
[unstable]
build-std = ["std", "panic_abort"]
[env]
MCU="esp32s3"
ESP_IDF_VERSION = "v5.1.3"
CRATE_CC_NO_DEFAULTS = "1"
`
This is what I get when I do cargo build:
warning: ring@0.17.8: cc1.exe: warning: C:\ring-main\ring-main\pregenerated: No such file or directory [-Wmissing-include-dirs]
warning: ring@0.17.8: In file included from C:\ring-main\ring-main\include/ring-core/base.h:74,
warning: ring@0.17.8: from C:\ring-main\ring-main\include/ring-core/mem.h:60,
warning: ring@0.17.8: from C:\ring-main\ring-main\crypto/curve25519/curve25519.c:22:
warning: ring@0.17.8: C:\ring-main\ring-main\include/ring-core/target.h:53:2: error: #error "Unknown target CPU"
warning: ring@0.17.8: 53 | #error "Unknown target CPU"
warning: ring@0.17.8: | ^~~~~
warning: ring@0.17.8: C:\ring-main\ring-main\include/ring-core/base.h:76:10: fatal error: ring_core_generated/prefix_symbols.h: No such file or directory
warning: ring@0.17.8: 76 | #include <ring_core_generated/prefix_symbols.h>
warning: ring@0.17.8: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: ring@0.17.8: compilation terminated.
If any of you know what is the problem, please help me.
Thanks
The text was updated successfully, but these errors were encountered: