Closed
Description
Bug description
Build extra esp_tinyusb
component with CONFIG_TINYUSB_MSC_ENABLED
set to y
, somehow encounter the cakkback functions symbols missing issue:
error: linking with `ldproxy` failed: exit code: 1
|
= note: "ldproxy" "C:\\Users\\Fang-Pen\\AppData\\Local\\Temp\\rustcrQegWk\\symbols.o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f.2qoaz9wb7ep67z0qujfglu4yk.rcgu.o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f.4hds22qrruv73nrr9ljitkaw4.rcgu.o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f.ewjildy4dmea1mjhk07gswjqy.rcgu.o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f.ek3ed1swuuj50eabg05hzfn0u.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libesp_idf_svc-d89e248162f947f6.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembassy_futures-4dd7b98316da210e.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembassy_time_driver-8dad0d94c7b130f4.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libuncased-547947eb7e70b8f5.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libesp_idf_hal-02bb17ab7df2cca7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_hal_async-e249d9e88b9180c5.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_can-919c04c9dd4a291c.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_hal-0da04245d18b2996.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libvoid-51cdb84cc35af7b3.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libnb-ed5b4bdf15f68b0e.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_hal_nb-ed5400dd423b5a44.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libnb-368281c0e611fbde.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libatomic_waker-8913311add159285.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembassy_sync-530069ec2ceaec36.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libfutures_util-d85c4e7fd26340f9.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libpin_project_lite-f0f5e50b49278681.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libfutures_task-ab077b771ac35733.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libpin_utils-b968344e217e695b.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libfutures_core-ea4b9ef6f4dcfee3.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libfutures_sink-75605a48403481da.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libcritical_section-4b666c255fceed72.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_hal-3d98d483e5d2907d.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libnum_enum-a233899e4d4d5925.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_svc-4783f60b49e30172.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libheapless-49b35f173bb6f03d.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libhash32-ab66924fc8ff433b.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libbyteorder-eefff2ac3abd8c9d.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libenumset-bdb60452e560eeb7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_io_async-6e5224c4d6bc03db.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libembedded_io-ef685ca30757134c.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\liblog-cf2e205841b09931.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libesp_idf_sys-ab956bf0aa48d8ad.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\liblibc-105a914b80963923.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libconst_format-bfbe81f5d480c771.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libstd-4c468461821b8e42.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libpanic_abort-40b5e4816c6d2d03.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libobject-e2337356ce84003f.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libmemchr-7e638e6cd9a8bf3e.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libaddr2line-09108638b704a856.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libgimli-91179c1d341704e4.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\librustc_demangle-0df14b1482c9f94c.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libstd_detect-16421a88257927e7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libhashbrown-f9fd6930d3df5877.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\librustc_std_workspace_alloc-225fd769b3c83fc9.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libminiz_oxide-68ad5c51c4d1a6a5.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libadler-1575b6ba46a624b7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libunwind-b1e93e67cfecf252.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libcfg_if-bd93b87847037323.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\liblibc-696191a4e9a3bc43.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\liballoc-865a6e17b8f2eff0.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\librustc_std_workspace_core-851f43160a9ce72a.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libcore-372d31482e278cd7.rlib" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\libcompiler_builtins-52671fef70583e56.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-o" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\deps\\esp32_playground-7d9086eaad0faf9f" "-Wl,--gc-sections" "-no-pie" "-nodefaultlibs" "--ldproxy-linker" "C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc.exe" "--ldproxy-cwd" "C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\build\\esp-idf-sys-d285e4edb12cb7fa\\out\\build" "@C:\\ws\\e3\\target\\xtensa-esp32s3-espidf\\debug\\build\\esp-idf-sys-d285e4edb12cb7fa\\out\\linker_args.txt"
= note: [ldproxy] Running ldproxy
Error: Linker C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc.exe failed: exit code: 1
STDERR OUTPUT:
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.proc_read10_cmd$constprop$0+0x8): undefined reference to `tud_msc_read10_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x2c): undefined reference to `tud_msc_scsi_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x30): undefined reference to `tud_msc_test_unit_ready_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x34): undefined reference to `tud_msc_capacity_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x38): undefined reference to `tud_msc_inquiry_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj):(.literal.mscd_xfer_cb+0x3c): undefined reference to `tud_msc_write10_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `proc_read10_cmd':␍
C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:768:(.text.proc_read10_cmd$constprop$0+0x4d): undefined reference to `tud_msc_read10_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `mscd_xfer_cb':␍
C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:414:(.text.mscd_xfer_cb+0x16e): undefined reference to `tud_msc_scsi_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `proc_builtin_scsi':␍
C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:604:(.text.mscd_xfer_cb+0x1f3): undefined reference to `tud_msc_test_unit_ready_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:587:(.text.mscd_xfer_cb+0x22f): undefined reference to `tud_msc_capacity_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:647:(.text.mscd_xfer_cb+0x2ab): undefined reference to `tud_msc_capacity_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:691:(.text.mscd_xfer_cb+0x346): undefined reference to `tud_msc_inquiry_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `rdwr10_get_lba':␍
C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:133:(.text.mscd_xfer_cb+0x422): undefined reference to `tud_msc_write10_cb'␍
C:/ws/e3/.embuild/espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf\espressif__tinyusb\libespressif__tinyusb.a(msc_device.c.obj): in function `is_data_in':␍
C:/ws/e3/target/xtensa-esp32s3-espidf/debug/build/esp-idf-sys-d285e4edb12cb7fa/out/managed_components/espressif__tinyusb/src/class/msc/msc_device.c:91:(.text.mscd_xfer_cb+0x4ae): undefined reference to `tud_msc_scsi_cb'␍
collect2.exe: error: ld returned 1 exit status
- Would you like to work on a fix? [y/n]
To Reproduce
Have esp_tinyusb in Cargo.toml extra components like this:
# ...
[dependencies]
esp-idf-sys = "0.35.0"
[[package.metadata.esp-idf-sys.extra_components]]
remote_component = { name = "espressif/esp_tinyusb", version = "1.5.0" }
bindings_header = "src/include/tinyusb_bindings.h"
bindings_module = "esp_tinyusb"
Have a binding header file like this
#if defined(ESP_IDF_COMP_ESPRESSIF__ESP_TINYUSB_ENABLED)
#include "tinyusb.h"
#endif
Add
CONFIG_TINYUSB_MSC_ENABLED=y
in sdkconfig.defaults
file
The repository for reproduction is here:
https://github.com/LaunchPlatform/esp-idf-sys-esp-tinyusb-build-erro-reproduce
Please note that to make the reproduction repo works, you need to downgrade espup to 11 with older clang runtime and also put the folder in a shorter path to avoid path too long problem under windows
Expected behavior
It should build
Environment
- Crate (
esp-idf-sys
) version: 0.35.0 - ESP-IDF branch or tag: release/v5.2
- Target device (MCU): esp32s3
- OS: Windows11
Metadata
Assignees
Labels
Type
Projects
Status
Done