Skip to content
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

does not build on an esp32 #317

Open
keredson opened this issue May 19, 2024 · 1 comment
Open

does not build on an esp32 #317

keredson opened this issue May 19, 2024 · 1 comment

Comments

@keredson
Copy link

this does not build on the esp32 microcontroller. example:

$ cargo install espup
$ espup install
$ . $HOME/export-esp.sh
$ cargo generate esp-rs/esp-idf-template
⚠️   Favorite `esp-rs/esp-idf-template` not found in config, using it as a git repository: https://github.com/esp-rs/esp-idf-template.git
✔ 🤷   Which template should be expanded? · cargo
🤷   Project Name: test-ssh2
🔧   Destination: /tmp/test-ssh2 ...
🔧   project-name: test-ssh2 ...
🔧   Generating template ...
✔ 🤷   Which MCU to target? · esp32
✔ 🤷   Configure advanced template options? · true
✔ 🤷   ESP-IDF version (master = UNSTABLE) · v5.1
✔ 🤷   Enable STD support? · true
✔ 🤷   Configure project to use Dev Containers (VS Code and GitHub Codespaces)? · false
✔ 🤷   Configure project to support Wokwi simulation with Wokwi VS Code extension? · false
✔ 🤷   Add CI files for GitHub Action? · false
🔧   Moving generated files into: `/tmp/test-ssh2`...
🔧   Initializing a fresh Git repository
✨   Done! New project created /tmp/test-ssh2
$ cargo build
   Compiling test-ssh2 v0.1.0 (/tmp/test-ssh2)
    Finished dev [optimized + debuginfo] target(s) in 2.77s

but when you add ssh2:

$ cargo add ssh2 -F vendored-openssl
    Updating crates.io index
      Adding ssh2 v0.9.4 to dependencies.
             Features:
             + vendored-openssl
             - openssl-on-win32

you get:

$ cargo build
[...]
error: failed to run custom build command for `openssl-sys v0.9.102`

Caused by:
  process didn't exit successfully: `/tmp/test-ssh2/target/debug/build/openssl-sys-682491a0cf30e5a8/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=XTENSA_ESP32_ESPIDF_OPENSSL_NO_VENDOR
  XTENSA_ESP32_ESPIDF_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset

  --- stderr
  thread 'main' panicked at /home/derek/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.2.3+3.2.1/src/lib.rs:366:18:
  don't know how to configure OpenSSL for xtensa-esp32-espidf
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
@keredson
Copy link
Author

interesting. if i only add openssl-sys = "0.9.35" directly and build with PKG_CONFIG_ALLOW_CROSS=1 cargo build, it builds successfully.

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

No branches or pull requests

1 participant