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

Can't compile the example - invalid certificate #42

Open
raaymax opened this issue Oct 29, 2021 · 1 comment
Open

Can't compile the example - invalid certificate #42

raaymax opened this issue Oct 29, 2021 · 1 comment

Comments

@raaymax
Copy link

raaymax commented Oct 29, 2021

[ 64%] Built target mbedtls
[ 64%] Generating x509_crt_bundle
gen_crt_bundle.py: Invalid certificate in /home/raay/Workspace/Robotics/esp-idf/components/mbedtls/esp_crt_bundle/cacrt_all.pem
Invalid certificate
make[2]: *** [esp-idf/mbedtls/CMakeFiles/__idf_mbedtls.dir/build.make:67: esp-idf/mbedtls/x509_crt_bundle] Error 2
make[1]: *** [CMakeFiles/Makefile2:2485: esp-idf/mbedtls/CMakeFiles/__idf_mbedtls.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
   Compiling toml v0.5.8
   Compiling rustlib v0.1.0 (/home/raay/Workspace/Robotics/rust-esp32-example/components/rustlib)
error: failed to run custom build command for `rustlib v0.1.0 (/home/raay/Workspace/Robotics/rust-esp32-example/components/rustlib)`

Caused by:
  process didn't exit successfully: `/home/raay/Workspace/Robotics/rust-esp32-example/build/esp-idf/rustlib/target/release/build/rustlib-88b5bbc1e09b33a8/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=/home/raay/Workspace/Robotics/rust-esp32-example/build/esp-idf/rustlib/target/RustApi.h

  --- stderr
  thread 'main' panicked at 'libclang error; possible causes include:
  - Invalid flag syntax
  - Unrecognized flags
  - Invalid flag arguments
  - File I/O errors
  - Host vs. target architecture mismatch
  If you encounter an error missing from this list, please file an issue or a PR!', /home/raay/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.58.1/src/ir/context.rs:535:15
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make[2]: *** [esp-idf/rustlib/CMakeFiles/rustlib_project.dir/build.make:112: esp-idf/rustlib/stamp/rustlib_project-build] Error 101
make[1]: *** [CMakeFiles/Makefile2:4931: esp-idf/rustlib/CMakeFiles/rustlib_project.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
make failed with exit code 2
@MabezDev
Copy link
Collaborator

This is currently an issue with platformio's distribution of esp-idf. You can either enable the native feature of esp-idf-sys to use cmake instead of pio. Alternatively, if you'd like to stick with pio the following commands should work.

source ~/.platformio/penv/bin/activate
pip install "cryptography<4"

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

2 participants