error: failed to run custom build command for `esp-idf-sys v0.33.2`
ds2k5 opened this issue · comments
Hi,
using Debian 12 on x86_64
did following:
$ rustup toolchain install nightly --component rust-src
$ cargo install cargo-generate
$ cargo install ldproxy
$ cargo install espflash
$ cargo install cargo-espflash
$ rustc --version
rustc 1.73.0-nightly (9163a2087 2023-10-03) (1.73.0.0)
$ cargo generate --git https://github.com/esp-rs/esp-idf-template cargo
$ cargo build
Compiling embassy-futures v0.1.0
Compiling esp-idf-sys v0.33.2
Compiling esp-idf-hal v0.41.2
Compiling esp-idf-svc v0.46.2
Compiling test3 v0.1.0 (/home/developer/rust/test3)
Compiling embedded-svc v0.25.3
error: failed to run custom build command for `esp-idf-sys v0.33.2`
Caused by:
process didn't exit successfully: `/home/developer/rust/test3/target/debug/build/esp-idf-sys-1bb90064ef145193/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=ESP_IDF_TOOLS_INSTALL_DIR
cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG
cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG_DEFAULTS
cargo:rerun-if-env-changed=MCU
cargo:rerun-if-env-changed=ESP_IDF_SYS_ROOT_CRATE
cargo:rerun-if-env-changed=ESP_IDF_VERSION
cargo:rerun-if-env-changed=ESP_IDF_REPOSITORY
cargo:rerun-if-env-changed=ESP_IDF_CMAKE_GENERATOR
cargo:rerun-if-env-changed=IDF_PATH
cargo:rerun-if-env-changed=EXTRA-COMPONENTS
cargo:rerun-if-env-changed=ESP_IDF_COMPONENTS
Submodule path 'components/asio/asio': checked out 'f31694c9f1746ba189a4bcae2e34db15135ddb22'
Submodule path 'components/bootloader/subproject/components/micro-ecc/micro-ecc': checked out 'd037ec89546fad14b5c4d5456c2e23a71e554966'
Submodule path 'components/bt/controller/lib_esp32': checked out '7bb0d445db3414ce96d21c50ba9249125d41480f'
Submodule path 'components/bt/controller/lib_esp32c3_family': checked out '0cfac1b21ebc995e8e9aa040ab1ab29deee4f580'
Submodule path 'components/bt/host/nimble/nimble': checked out 'e2d7a766fb3927d008902611b3985e8595864c55'
Submodule path 'components/cbor/tinycbor': checked out '7c349dbb6b8d76db39383b226d3ebdf59b8ab37d'
Submodule path 'components/cmock/CMock': checked out 'eeecc49ce8af123cf8ad40efdb9673e37b56230f'
Submodule path 'components/cmock/CMock/vendor/c_exception': checked out '71b47be7c950f1bf5f7e5303779fa99a16224bb6'
Submodule path 'components/cmock/CMock/vendor/unity': checked out 'cf949f45ca6d172a177b00da21310607b97bc7a7'
Submodule path 'components/coap/libcoap': checked out '3aa11612c143c9734d72022720f33e12506f7a2c'
Submodule path 'components/coap/libcoap/ext/tinydtls': checked out '59055b8a935bc53bf69d002fc089ad4bd08851b2'
Submodule path 'components/esp_phy/lib': checked out '32583f98f229ab9b3c48aa3a10f954fcdddfe4d1'
Submodule path 'components/esp_wifi/lib': checked out 'a9f72f895dd74bb763f1ff9146203ff57846ab5d'
Submodule path 'components/esptool_py/esptool': checked out '7b17ea072fbac0f92fc417ddbe34e28afbd8ced0'
Submodule path 'components/expat/expat': checked out '454c6105bc2d0ea2521b8f8f7a5161c2abd8c386'
Submodule path 'components/ieee802154/lib': checked out 'f7b5e8059a3bb6f321e79ac3bf2aa4d2a9b93326'
Submodule path 'components/json/cJSON': checked out 'd348621ca93571343a56862df7de4ff3bc9b5667'
Submodule path 'components/libsodium/libsodium': checked out '4f5e89fa84ce1d178a6765b8b46f2b6f91216677'
Submodule path 'components/lwip/lwip': checked out '4f24c9baf9101634b7c690802f424b197b3bb685'
Submodule path 'components/mbedtls/mbedtls': checked out '1d7033af30e20ccb2a0c0a114d3a08e372430f34'
Submodule path 'components/mqtt/esp-mqtt': checked out 'bb9c8af9d552b608dd3aabf9617bde757a538ebe'
Submodule path 'components/nghttp/nghttp2': checked out '8f7b008b158e12de0e58247afd170f127dbb6456'
Submodule path 'components/nghttp/nghttp2/third-party/mruby': checked out '7c91efc1ffda769a5f1a872c646c82b00698f1b8'
Submodule path 'components/nghttp/nghttp2/third-party/neverbleed': checked out 'b967ca054f48a36f82d8fcdd32e54ec5144f2751'
Submodule path 'components/openthread/lib': checked out '9a8d34d8f698cad2c9468468b473e26a3dda51b9'
Submodule path 'components/openthread/openthread': checked out 'c36c0e77a2465355bcf13bd7dc718d8c9aa6ff64'
Submodule path 'components/protobuf-c/protobuf-c': checked out 'abc67a11c6db271bedbb9f58be85d6f4e2ea8389'
Submodule path 'components/spiffs/spiffs': checked out '0dbb3f71c5f6fae3747a9d935372773762baf852'
Submodule path 'components/tinyusb/tinyusb': checked out 'c4badd394eda18199c0196ed0be1e2d635f0a5f6'
Submodule path 'components/unity/unity': checked out '7d2bf62b7e6afaf38153041a9d53c21aeeca9a25'
Submodule path 'examples/build_system/cmake/import_lib/main/lib/tinyxml2': checked out '7e8e249990ec491ec15990cf95b6d871a66cf64a'
Submodule path 'examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib': checked out '36d0642e66ff5b1c7a291873f24c498ca6ffedef'
PATH=/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/tools:$PATH
pip 23.0.1 from /usr/lib/python3/dist-packages/pip (python 3.11)
Installing virtualenv
--- stderr
Build configuration: BuildConfig {
esp_idf_tools_install_dir: None,
esp_idf_sdkconfig: None,
esp_idf_sdkconfig_defaults: None,
mcu: None,
native: NativeConfig {
esp_idf_version: Some(
Tag(
"v4.4.6",
),
),
esp_idf_repository: None,
esp_idf_cmake_generator: None,
idf_path: None,
extra_components: [],
esp_idf_components: None,
},
esp_idf_sys_root_crate: None,
}
Using managed esp-idf repository: RemoteSdk { repo_url: None, git_ref: Tag("v4.4.6") }
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6'...
Note: switching to '357290093430e41e7e3338227a61ef5162f2deed'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Submodule 'components/asio/asio' (https://github.com/espressif/asio.git) registered for path 'components/asio/asio'
Submodule 'components/bootloader/subproject/components/micro-ecc/micro-ecc' (https://github.com/kmackay/micro-ecc.git) registered for path 'components/bootloader/subproject/components/micro-ecc/micro-ecc'
Submodule 'components/bt/controller/lib_esp32' (https://github.com/espressif/esp32-bt-lib.git) registered for path 'components/bt/controller/lib_esp32'
Submodule 'components/bt/controller/lib_esp32c3_family' (https://github.com/espressif/esp32c3-bt-lib.git) registered for path 'components/bt/controller/lib_esp32c3_family'
Submodule 'components/bt/host/nimble/nimble' (https://github.com/espressif/esp-nimble.git) registered for path 'components/bt/host/nimble/nimble'
Submodule 'components/cbor/tinycbor' (https://github.com/intel/tinycbor.git) registered for path 'components/cbor/tinycbor'
Submodule 'components/cmock/CMock' (https://github.com/ThrowTheSwitch/CMock.git) registered for path 'components/cmock/CMock'
Submodule 'components/coap/libcoap' (https://github.com/obgm/libcoap.git) registered for path 'components/coap/libcoap'
Submodule 'components/esp_phy/lib' (https://github.com/espressif/esp-phy-lib.git) registered for path 'components/esp_phy/lib'
Submodule 'components/esp_wifi/lib' (https://github.com/espressif/esp32-wifi-lib.git) registered for path 'components/esp_wifi/lib'
Submodule 'components/esptool_py/esptool' (https://github.com/espressif/esptool.git) registered for path 'components/esptool_py/esptool'
Submodule 'components/expat/expat' (https://github.com/libexpat/libexpat.git) registered for path 'components/expat/expat'
Submodule 'components/ieee802154/lib' (https://github.com/espressif/esp-ieee802154-lib.git) registered for path 'components/ieee802154/lib'
Submodule 'components/json/cJSON' (https://github.com/DaveGamble/cJSON.git) registered for path 'components/json/cJSON'
Submodule 'components/libsodium/libsodium' (https://github.com/jedisct1/libsodium.git) registered for path 'components/libsodium/libsodium'
Submodule 'components/lwip/lwip' (https://github.com/espressif/esp-lwip.git) registered for path 'components/lwip/lwip'
Submodule 'components/mbedtls/mbedtls' (https://github.com/espressif/mbedtls.git) registered for path 'components/mbedtls/mbedtls'
Submodule 'components/mqtt/esp-mqtt' (https://github.com/espressif/esp-mqtt.git) registered for path 'components/mqtt/esp-mqtt'
Submodule 'components/nghttp/nghttp2' (https://github.com/nghttp2/nghttp2.git) registered for path 'components/nghttp/nghttp2'
Submodule 'components/openthread/lib' (https://github.com/espressif/esp-thread-lib.git) registered for path 'components/openthread/lib'
Submodule 'components/openthread/openthread' (https://github.com/espressif/openthread.git) registered for path 'components/openthread/openthread'
Submodule 'components/protobuf-c/protobuf-c' (https://github.com/protobuf-c/protobuf-c.git) registered for path 'components/protobuf-c/protobuf-c'
Submodule 'components/spiffs/spiffs' (https://github.com/pellepl/spiffs.git) registered for path 'components/spiffs/spiffs'
Submodule 'components/tinyusb/tinyusb' (https://github.com/espressif/tinyusb.git) registered for path 'components/tinyusb/tinyusb'
Submodule 'components/unity/unity' (https://github.com/ThrowTheSwitch/Unity.git) registered for path 'components/unity/unity'
Submodule 'examples/build_system/cmake/import_lib/main/lib/tinyxml2' (https://github.com/leethomason/tinyxml2.git) registered for path 'examples/build_system/cmake/import_lib/main/lib/tinyxml2'
Submodule 'examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib' (https://github.com/espressif/esp-cryptoauthlib.git) registered for path 'examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib'
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/asio/asio'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/bootloader/subproject/components/micro-ecc/micro-ecc'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/bt/controller/lib_esp32'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/bt/controller/lib_esp32c3_family'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/bt/host/nimble/nimble'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/cbor/tinycbor'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/cmock/CMock'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/coap/libcoap'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/esp_phy/lib'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/esp_wifi/lib'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/esptool_py/esptool'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/expat/expat'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/ieee802154/lib'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/json/cJSON'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/libsodium/libsodium'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/lwip/lwip'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/mbedtls/mbedtls'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/mqtt/esp-mqtt'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/nghttp/nghttp2'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/openthread/lib'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/openthread/openthread'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/protobuf-c/protobuf-c'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/spiffs/spiffs'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/tinyusb/tinyusb'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/unity/unity'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/examples/build_system/cmake/import_lib/main/lib/tinyxml2'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib'...
From https://github.com/espressif/asio
* branch f31694c9f1746ba189a4bcae2e34db15135ddb22 -> FETCH_HEAD
From https://github.com/kmackay/micro-ecc
* branch d037ec89546fad14b5c4d5456c2e23a71e554966 -> FETCH_HEAD
From https://github.com/espressif/esp32-bt-lib
* branch 7bb0d445db3414ce96d21c50ba9249125d41480f -> FETCH_HEAD
From https://github.com/espressif/esp32c3-bt-lib
* branch 0cfac1b21ebc995e8e9aa040ab1ab29deee4f580 -> FETCH_HEAD
From https://github.com/espressif/esp-nimble
* branch e2d7a766fb3927d008902611b3985e8595864c55 -> FETCH_HEAD
From https://github.com/intel/tinycbor
* branch 7c349dbb6b8d76db39383b226d3ebdf59b8ab37d -> FETCH_HEAD
From https://github.com/ThrowTheSwitch/CMock
* branch eeecc49ce8af123cf8ad40efdb9673e37b56230f -> FETCH_HEAD
Submodule 'vendor/c_exception' (https://github.com/throwtheswitch/cexception.git) registered for path 'components/cmock/CMock/vendor/c_exception'
Submodule 'vendor/unity' (https://github.com/throwtheswitch/unity.git) registered for path 'components/cmock/CMock/vendor/unity'
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/cmock/CMock/vendor/c_exception'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/cmock/CMock/vendor/unity'...
From https://github.com/throwtheswitch/cexception
* branch 71b47be7c950f1bf5f7e5303779fa99a16224bb6 -> FETCH_HEAD
From https://github.com/throwtheswitch/unity
* branch cf949f45ca6d172a177b00da21310607b97bc7a7 -> FETCH_HEAD
From https://github.com/obgm/libcoap
* branch 3aa11612c143c9734d72022720f33e12506f7a2c -> FETCH_HEAD
Submodule 'ext/tinydtls' (https://github.com/eclipse/tinydtls.git) registered for path 'components/coap/libcoap/ext/tinydtls'
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/coap/libcoap/ext/tinydtls'...
From https://github.com/eclipse/tinydtls
* branch 59055b8a935bc53bf69d002fc089ad4bd08851b2 -> FETCH_HEAD
From https://github.com/espressif/esp-phy-lib
* branch 32583f98f229ab9b3c48aa3a10f954fcdddfe4d1 -> FETCH_HEAD
From https://github.com/espressif/esp32-wifi-lib
* branch a9f72f895dd74bb763f1ff9146203ff57846ab5d -> FETCH_HEAD
From https://github.com/espressif/esptool
* branch 7b17ea072fbac0f92fc417ddbe34e28afbd8ced0 -> FETCH_HEAD
From https://github.com/libexpat/libexpat
* branch 454c6105bc2d0ea2521b8f8f7a5161c2abd8c386 -> FETCH_HEAD
From https://github.com/espressif/esp-ieee802154-lib
* branch f7b5e8059a3bb6f321e79ac3bf2aa4d2a9b93326 -> FETCH_HEAD
From https://github.com/DaveGamble/cJSON
* branch d348621ca93571343a56862df7de4ff3bc9b5667 -> FETCH_HEAD
From https://github.com/jedisct1/libsodium
* branch 4f5e89fa84ce1d178a6765b8b46f2b6f91216677 -> FETCH_HEAD
From https://github.com/espressif/esp-lwip
* branch 4f24c9baf9101634b7c690802f424b197b3bb685 -> FETCH_HEAD
From https://github.com/espressif/mbedtls
* branch 1d7033af30e20ccb2a0c0a114d3a08e372430f34 -> FETCH_HEAD
From https://github.com/espressif/esp-mqtt
* branch bb9c8af9d552b608dd3aabf9617bde757a538ebe -> FETCH_HEAD
From https://github.com/nghttp2/nghttp2
* branch 8f7b008b158e12de0e58247afd170f127dbb6456 -> FETCH_HEAD
Submodule 'third-party/mruby' (https://github.com/mruby/mruby) registered for path 'components/nghttp/nghttp2/third-party/mruby'
Submodule 'third-party/neverbleed' (https://github.com/tatsuhiro-t/neverbleed.git) registered for path 'components/nghttp/nghttp2/third-party/neverbleed'
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/nghttp/nghttp2/third-party/mruby'...
Cloning into '/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/components/nghttp/nghttp2/third-party/neverbleed'...
From https://github.com/mruby/mruby
* branch 7c91efc1ffda769a5f1a872c646c82b00698f1b8 -> FETCH_HEAD
From https://github.com/tatsuhiro-t/neverbleed
* branch b967ca054f48a36f82d8fcdd32e54ec5144f2751 -> FETCH_HEAD
From https://github.com/espressif/esp-thread-lib
* branch 9a8d34d8f698cad2c9468468b473e26a3dda51b9 -> FETCH_HEAD
From https://github.com/espressif/openthread
* branch c36c0e77a2465355bcf13bd7dc718d8c9aa6ff64 -> FETCH_HEAD
From https://github.com/pellepl/spiffs
* branch 0dbb3f71c5f6fae3747a9d935372773762baf852 -> FETCH_HEAD
From https://github.com/espressif/tinyusb
* branch c4badd394eda18199c0196ed0be1e2d635f0a5f6 -> FETCH_HEAD
From https://github.com/ThrowTheSwitch/Unity
* branch 7d2bf62b7e6afaf38153041a9d53c21aeeca9a25 -> FETCH_HEAD
From https://github.com/leethomason/tinyxml2
* branch 7e8e249990ec491ec15990cf95b6d871a66cf64a -> FETCH_HEAD
From https://github.com/espressif/esp-cryptoauthlib
* branch 36d0642e66ff5b1c7a291873f24c498ca6ffedef -> FETCH_HEAD
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Traceback (most recent call last):
File "/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/tools/idf_tools.py", line 1594, in action_install_python_env
import virtualenv # noqa: F401
^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'virtualenv'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/tools/idf_tools.py", line 2003, in <module>
main(sys.argv[1:])
File "/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/tools/idf_tools.py", line 1999, in main
action_func(args)
File "/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/tools/idf_tools.py", line 1597, in action_install_python_env
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--user', 'virtualenv'],
File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'install', '--user', 'virtualenv']' returned non-zero exit status 1.
Error: Could not install esp-idf
Caused by:
command 'IDF_TOOLS_PATH="/home/developer/rust/test3/.embuild/espressif" "python3" "/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6/tools/idf_tools.py" "--idf-path" "/home/developer/rust/test3/.embuild/espressif/esp-idf/v4.4.6" "--non-interactive" "install-python-env"' exited with non-zero status code 1
How can I fix this ?
I tyed this:
$ cargo add virtualenv-rs
but got this by running: cargo build
Compiling globwalk v0.8.1
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `/home/developer/rust/test3/target/debug/build/ring-3c9642843c6b7cde/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at /home/developer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:358:10:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
This is a debian specific problem. You can't rawly install python packages via pip if its not in a venv or through apt, they enforced this now in debian 12. The esp-idf installtation try's to install virtualenv if its not found, but this failed because its only allowed inside a virtualenv. But because the virtualenv is not created you got this error.
Solution: apt install python3-virtualenv
Hi @Vollbrecht,
thanks for the hint
did the following:
$ sudo apt-get install python3-virtualenv
$ cargo clean
$ rm -rf .embuild
$ cargo build
Successfully created esp32 image.
Generated /home/developer/rust/test23/target/xtensa-esp32-espidf/debug/build/esp-idf-sys-d0b03021d1cb46d6/out/build/libespidf.bin
[884/884] cd /home/developer/rust/test23/target/xtensa-esp32-espidf/debug/build/esp-idf-sys-d0b03021d1cb46d6/out/build/esp-idf/esptool_py && /home/developer/rust/test23/.embuild/espressif/python_env/idf5.1_py3.11_env/bin/python /home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app /home/developer/rust/test23/target/xtensa-esp32-espidf/debug/build/esp-idf-sys-d0b03021d1cb46d6/out/build/partition_table/partition-table.bin /home/developer/rust/test23/target/xtensa-esp32-espidf/debug/build/esp-idf-sys-d0b03021d1cb46d6/out/build/libespidf.bin
libespidf.bin binary size 0x273d0 bytes. Smallest app partition is 0x100000 bytes. 0xd8c30 bytes (85%) free.
cargo:root=/home/developer/rust/test23/target/xtensa-esp32-espidf/debug/build/esp-idf-sys-d0b03021d1cb46d6/out
cargo:rerun-if-changed=/home/developer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-sys-0.33.2/src/include/esp-idf/bindings.h
cargo:rustc-env=EMBUILD_GENERATED_BINDINGS_FILE=/home/developer/rust/test23/target/xtensa-esp32-espidf/debug/build/esp-idf-sys-d0b03021d1cb46d6/out/bindings.rs
--- stderr
Build configuration: BuildConfig {
esp_idf_tools_install_dir: None,
esp_idf_sdkconfig: None,
esp_idf_sdkconfig_defaults: None,
mcu: None,
native: NativeConfig {
esp_idf_version: Some(
Tag(
"v5.1.1",
),
),
esp_idf_repository: None,
esp_idf_cmake_generator: None,
idf_path: None,
extra_components: [],
esp_idf_components: None,
},
esp_idf_sys_root_crate: None,
}
Using managed esp-idf repository: RemoteSdk { repo_url: None, git_ref: Tag("v5.1.1") }
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1'...
Note: switching to 'e088c3766ba440e72268b458a68f27b6e7d63986'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Submodule 'components/bootloader/subproject/components/micro-ecc/micro-ecc' (https://github.com/kmackay/micro-ecc.git) registered for path 'components/bootloader/subproject/components/micro-ecc/micro-ecc'
Submodule 'components/bt/controller/lib_esp32' (https://github.com/espressif/esp32-bt-lib.git) registered for path 'components/bt/controller/lib_esp32'
Submodule 'components/bt/controller/lib_esp32c2/esp32c2-bt-lib' (https://github.com/espressif/esp32c2-bt-lib.git) registered for path 'components/bt/controller/lib_esp32c2/esp32c2-bt-lib'
Submodule 'components/bt/controller/lib_esp32c3_family' (https://github.com/espressif/esp32c3-bt-lib.git) registered for path 'components/bt/controller/lib_esp32c3_family'
Submodule 'components/bt/controller/lib_esp32c6/esp32c6-bt-lib' (https://github.com/espressif/esp32c6-bt-lib.git) registered for path 'components/bt/controller/lib_esp32c6/esp32c6-bt-lib'
Submodule 'components/bt/controller/lib_esp32h2/esp32h2-bt-lib' (https://github.com/espressif/esp32h2-bt-lib.git) registered for path 'components/bt/controller/lib_esp32h2/esp32h2-bt-lib'
Submodule 'components/bt/host/nimble/nimble' (https://github.com/espressif/esp-nimble.git) registered for path 'components/bt/host/nimble/nimble'
Submodule 'components/cmock/CMock' (https://github.com/ThrowTheSwitch/CMock.git) registered for path 'components/cmock/CMock'
Submodule 'components/esp_coex/lib' (https://github.com/espressif/esp-coex-lib.git) registered for path 'components/esp_coex/lib'
Submodule 'components/esp_phy/lib' (https://github.com/espressif/esp-phy-lib.git) registered for path 'components/esp_phy/lib'
Submodule 'components/esp_wifi/lib' (https://github.com/espressif/esp32-wifi-lib.git) registered for path 'components/esp_wifi/lib'
Submodule 'components/heap/tlsf' (https://github.com/espressif/tlsf.git) registered for path 'components/heap/tlsf'
Submodule 'components/ieee802154/lib' (https://github.com/espressif/esp-ieee802154-lib.git) registered for path 'components/ieee802154/lib'
Submodule 'components/json/cJSON' (https://github.com/DaveGamble/cJSON.git) registered for path 'components/json/cJSON'
Submodule 'components/lwip/lwip' (https://github.com/espressif/esp-lwip.git) registered for path 'components/lwip/lwip'
Submodule 'components/mbedtls/mbedtls' (https://github.com/espressif/mbedtls.git) registered for path 'components/mbedtls/mbedtls'
Submodule 'components/mqtt/esp-mqtt' (https://github.com/espressif/esp-mqtt.git) registered for path 'components/mqtt/esp-mqtt'
Submodule 'components/openthread/lib' (https://github.com/espressif/esp-thread-lib.git) registered for path 'components/openthread/lib'
Submodule 'components/openthread/openthread' (https://github.com/espressif/openthread.git) registered for path 'components/openthread/openthread'
Submodule 'components/protobuf-c/protobuf-c' (https://github.com/protobuf-c/protobuf-c.git) registered for path 'components/protobuf-c/protobuf-c'
Submodule 'components/spiffs/spiffs' (https://github.com/pellepl/spiffs.git) registered for path 'components/spiffs/spiffs'
Submodule 'components/unity/unity' (https://github.com/ThrowTheSwitch/Unity.git) registered for path 'components/unity/unity'
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/bootloader/subproject/components/micro-ecc/micro-ecc'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/bt/controller/lib_esp32'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/bt/controller/lib_esp32c2/esp32c2-bt-lib'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/bt/controller/lib_esp32c3_family'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/bt/controller/lib_esp32c6/esp32c6-bt-lib'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/bt/controller/lib_esp32h2/esp32h2-bt-lib'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/bt/host/nimble/nimble'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/cmock/CMock'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/esp_coex/lib'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/esp_phy/lib'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/esp_wifi/lib'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/heap/tlsf'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/ieee802154/lib'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/json/cJSON'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/lwip/lwip'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/mbedtls/mbedtls'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/mqtt/esp-mqtt'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/openthread/lib'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/openthread/openthread'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/protobuf-c/protobuf-c'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/spiffs/spiffs'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/unity/unity'...
From https://github.com/kmackay/micro-ecc
* branch d037ec89546fad14b5c4d5456c2e23a71e554966 -> FETCH_HEAD
From https://github.com/espressif/esp32-bt-lib
* branch e1b3a29c58a452a6c017113686262094afd87042 -> FETCH_HEAD
From https://github.com/espressif/esp32c2-bt-lib
* branch 5fcfd0e457a76ebb234086ccd6dc391690d69e90 -> FETCH_HEAD
From https://github.com/espressif/esp32c3-bt-lib
* branch b438f60a295183e7c67eb42ae05f4580f4b1ced0 -> FETCH_HEAD
From https://github.com/espressif/esp32c6-bt-lib
* branch d785de0a7c46d9badcd73bc83c2e5cb78f7054b2 -> FETCH_HEAD
From https://github.com/espressif/esp32h2-bt-lib
* branch 35bd3cd7352014d303a96c46d8ea8446ea0a9a54 -> FETCH_HEAD
From https://github.com/espressif/esp-nimble
* branch 9478bc510fa9fc792d98efbc80dc547b97a13b99 -> FETCH_HEAD
From https://github.com/ThrowTheSwitch/CMock
* branch eeecc49ce8af123cf8ad40efdb9673e37b56230f -> FETCH_HEAD
Submodule 'vendor/c_exception' (https://github.com/throwtheswitch/cexception.git) registered for path 'components/cmock/CMock/vendor/c_exception'
Submodule 'vendor/unity' (https://github.com/throwtheswitch/unity.git) registered for path 'components/cmock/CMock/vendor/unity'
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/cmock/CMock/vendor/c_exception'...
Cloning into '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1/components/cmock/CMock/vendor/unity'...
From https://github.com/throwtheswitch/cexception
* branch 71b47be7c950f1bf5f7e5303779fa99a16224bb6 -> FETCH_HEAD
From https://github.com/throwtheswitch/unity
* branch cf949f45ca6d172a177b00da21310607b97bc7a7 -> FETCH_HEAD
From https://github.com/espressif/esp-coex-lib
* branch 37698e17a4c7fd2e0872317fc8befaac3bb10cb4 -> FETCH_HEAD
From https://github.com/espressif/esp-phy-lib
* branch 998e05636344949ba219e8ac56feb733e27bf5d2 -> FETCH_HEAD
From https://github.com/espressif/esp32-wifi-lib
* branch 0a89d5ffd2c452407940c2e617434e54f3c34576 -> FETCH_HEAD
From https://github.com/DaveGamble/cJSON
* branch d348621ca93571343a56862df7de4ff3bc9b5667 -> FETCH_HEAD
From https://github.com/espressif/esp-lwip
* branch 269a58f18597aedec31c439e34cdaea47229dda3 -> FETCH_HEAD
From https://github.com/espressif/mbedtls
* branch 65b3c0857c9f207dcb0b646f2b4ebd8e5edf83c1 -> FETCH_HEAD
From https://github.com/espressif/esp-mqtt
* branch dffabb067fb3c39f486033d2e47eb4b1416f0c82 -> FETCH_HEAD
From https://github.com/espressif/esp-thread-lib
* branch c9c17a0b6634af016111c9817f0be1fe0e7112f6 -> FETCH_HEAD
From https://github.com/espressif/openthread
* branch 5beae143700db54c6e9bd4b15a568abe2f305723 -> FETCH_HEAD
From https://github.com/pellepl/spiffs
* branch 0dbb3f71c5f6fae3747a9d935372773762baf852 -> FETCH_HEAD
From https://github.com/ThrowTheSwitch/Unity
* branch 7d2bf62b7e6afaf38153041a9d53c21aeeca9a25 -> FETCH_HEAD
Using esp-idf v5.1.1 at '/home/developer/rust/test23/.embuild/espressif/esp-idf/v5.1.1'
Compiler supported targets: xtensa-esp32-elf
Built components: xtensa, esp_ringbuf, efuse, driver, esp_pm, mbedtls, esp_app_format, bootloader_support, bootloader, esptool_py, partition_table, esp_partition, app_update, esp_mm, spi_flash, pthread, esp_system, esp_rom, hal, log, heap, soc, esp_hw_support, freertos, newlib, cxx, esp_common, esp_timer, app_trace, esp_event, nvs_flash, esp_phy, vfs, lwip, esp_netif_stack, esp_netif, wpa_supplicant, esp_coex, esp_wifi, bt, unity, cmock, console, http_parser, esp-tls, esp_adc, esp_eth, esp_gdbstub, esp_hid, tcp_transport, esp_http_client, esp_http_server, esp_https_ota, esp_https_server, esp_psram, esp_lcd, protobuf-c, protocomm, esp_local_ctrl, espcoredump, wear_levelling, sdmmc, fatfs, idf_test, ieee802154, json, mqtt, openthread, perfmon, spiffs, ulp, usb, wifi_provisioning
error: unknown target triple 'xtensa', please use -triple or -arch
thread 'main' panicked at /home/developer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.63.0/ir/context.rs:530:15:
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!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
did you install via espup ? make sure your env variables are not poluted and that you source the export script export-esp.sh
$ espup install
$ chmod u+x ~/export-esp.sh
$ ~/export-esp.sh
$ cargo generate --git https://github.com/esp-rs/esp-idf-template cargo
$ cd project1
$ cargo build
....
error as above
thats not how you source env file on debian - please also check out esp-rs/esp-idf-hal#319 for more info regarding this specific problem
thanks - will check tomorrow
$ chmod u+x ~/export-esp.sh
~/export-esp.sh
Yeah, to cut some chasing in the (long) other thread @Vollbrecht mentioned, you need to do, exactly:
. ~/export-esp.sh
And I'm so sick and tired of this problem :(
@SergioGasquez Enjoy your vacation, but maybe another nail on the "export" script coffin. :)
We need the symlink approach, I think.
$ . ~/export-esp.sh
$ caro clean
$ rm -rf .embuild
$ cargo build
Compiling esp-idf-svc v0.46.2
Compiling embedded-can v0.4.1
Compiling no-std-net v0.5.0
Compiling embassy-time v0.1.4
Compiling project1 v0.1.0 (/home/developer/rust/project1)
Compiling embassy-futures v0.1.0
Compiling embedded-svc v0.25.3
Finished dev [optimized + debuginfo] target(s) in 4m 03s
thanks a lot to @ALL !
And I'm so sick and tired of this problem :(
Sorry about that!