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

Update dependencies for esp-hal, esp-wifi and embassy-net #62

Closed
wants to merge 1 commit into from

Conversation

AnthonyGrondin
Copy link
Collaborator

Bump dependencies used in examples and in esp-mbedtls, and fix examples.

@AnthonyGrondin
Copy link
Collaborator Author

CI throws a linker error when building for esp32c3 with nightly-2024-07-22

Compiling esp-mbedtls v0.1.0 (/home/runner/work/esp-mbedtls/esp-mbedtls/esp-mbedtls)
error: linking with `rust-lld` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/runner/.rustup/toolchains/nightly-2024-07-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/runner/.rustup/toolchains/nightly-2024-07-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/runner/.rustup/toolchains/nightly-2024-07-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/opt/hostedtoolcache/just/1.13.0/x64:/home/runner/.rustup/toolchains/esp/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin:/etc/skel/.cargo/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" VSLANG="1033" "rust-lld" "-flavor" "gnu" "/tmp/rustcjmGUD6/symbols.o" "/home/runner/work/esp-mbedtls/esp-mbedtls/target/riscv32imc-unknown-none-elf/release/examples/sync_client-34dfbaa79a2917f3.sync_client.2d5e2d7251d75bc3-cgu.3.rcgu.o" "--as-needed" "-L" "/home/runner/work/esp-mbedtls/esp-mbedtls/target/riscv32imc-unknown-none-elf/release/deps" "-L" "/home/runner/work/esp-mbedtls/esp-mbedtls/target/release/deps" "-L" "/home/runner/work/esp-mbedtls/esp-mbedtls/target/riscv32imc-unknown-none-elf/release/build/esp-hal-f79e111d5c88c7ba/out" "-L" "/home/runner/work/esp-mbedtls/esp-mbedtls/target/riscv32imc-unknown-none-elf/release/build/esp32c3-3b06b4248d20313a/out" "-L" "/home/runner/work/esp-mbedtls/esp-mbedtls/esp-mbedtls-sys/libs/riscv32imc-unknown-none-elf" "-L" "/home/runner/work/esp-mbedtls/esp-mbedtls/target/riscv32imc-unknown-none-elf/release/build/esp-wifi-sys-7f25db094d801907/out" "-L" "/home/runner/.rustup/toolchains/nightly-2024-07-22-x86_64-unknown-linux-gnu/lib/rustlib/riscv32imc-unknown-none-elf/lib" "-Bstatic" "/tmp/rustcjmGUD6/libesp_mbedtls_sys-2e4713cf20a0b251.rlib" "/home/runner/work/esp-mbedtls/esp-mbedtls/target/riscv32imc-unknown-none-elf/release/deps/libcompiler_builtins-9ccee2b35f5bfdf1.rlib" "-Bdynamic" "-lbtbb" "-lbtdm_app" "-lcoexist" "-lcore" "-lespnow" "-lmesh" "-lnet80211" "-lphy" "-lpp" "-lsmartconfig" "-lwapi" "-lwpa_supplicant" "-lprintf" "-z" "noexecstack" "-L" "/home/runner/.rustup/toolchains/nightly-2024-07-22-x86_64-unknown-linux-gnu/lib/rustlib/riscv32imc-unknown-none-elf/lib" "-o" "/home/runner/work/esp-mbedtls/esp-mbedtls/target/riscv32imc-unknown-none-elf/release/examples/sync_client-34dfbaa79a2917f3" "--gc-sections" "-Tlinkall.x"
  = note: rust-lld: error: undefined symbol: memchr
          >>> referenced by x509.c
          >>>               x509.c.obj:(mbedtls_x509_dn_gets) in archive /tmp/rustcjmGUD6/libesp_mbedtls_sys-2e4713cf20a0b251.rlib
          

error: could not compile `examples` (example "sync_client") due to 1 previous error

@bjoernQ
Copy link
Collaborator

bjoernQ commented Dec 24, 2024

Oh - apparently we lost memchr when moving the ROM-functions from esp-wifi-sys to esp-hal:

esp-wifi-sys\ld\esp32h2\rom_functions.x
482:memchr = 0x40000514;

esp-wifi-sys\ld\esp32c3\rom_functions.x
2214:memchr = 0x400003c8;

esp-wifi-sys\ld\esp32\rom_functions.x
423:PROVIDE ( memchr = 0x4000c244 );

@AnthonyGrondin
Copy link
Collaborator Author

So this will need to be fixed in esp-hal and we use a patched version until a new release is out. This would require to build on 1.83
This also broke the example for edge_server.rs, it doesn't accept connections anymore.

@AnthonyGrondin
Copy link
Collaborator Author

Closing as superseded by #63

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