Skip to content

collect2: error: ld returned 1 exit status ESP32-S3 #5

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

Open
DansDesigns opened this issue Mar 18, 2025 · 1 comment
Open

collect2: error: ld returned 1 exit status ESP32-S3 #5

DansDesigns opened this issue Mar 18, 2025 · 1 comment

Comments

@DansDesigns
Copy link

Hello,

After updating to version beta 5, I am unable to compile the example webserver..

WINDOWS 11 warnings

C:/Users/Dan/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Dan\Documents\Arduino\libraries\Husarnet_ESP32\src\esp32s3\libhusarnet.a(user_interface.cpp.obj):(.literal.startup._Z41__static_initialization_and_destruction_0v+0x20): undefined reference to `__dso_handle'

C:/Users/Dan/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Dan\Documents\Arduino\libraries\Husarnet_ESP32\src\esp32s3\libhusarnet.a(tun.cpp.obj):(.literal.startup._GLOBAL__sub_I_husarnet_netif_init+0x24): undefined reference to `__dso_handle'

C:/Users/Dan/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\Dan\AppData\Local\Temp\arduino_build_789/ComBadge_v0.2_S3_SR.ino.elf: hidden symbol `__dso_handle' isn't defined

C:/Users/Dan/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld.exe: final link failed: bad value

collect2.exe: error: ld returned 1 exit status

I tried it on Linux to make sure it wasn't my Windows 11 PC:

LINUX warnings

Library Husarnet_ESP32 has been declared precompiled:
Using precompiled library in /home/dan/Arduino/libraries/Husarnet_ESP32/src/esp32s3
/home/dan/.arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: /home/dan/Arduino/libraries/Husarnet_ESP32/src/esp32s3/libhusarnet.a(user_interface.cpp.obj):(.literal.startup._Z41__static_initialization_and_destruction_0v+0x20): undefined reference to `__dso_handle'
/home/dan/.arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: simple-webserver.ino.elf: hidden symbol `__dso_handle' isn't defined
/home/dan/.arduino15/packages/esp32/tools/esp-x32/2405/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
Multiple libraries were found for "WiFi.h"
 Used: /home/dan/.arduino15/packages/esp32/hardware/esp32/3.1.1/libraries/WiFi
 Not used: /home/dan/arduino-1.8.19/libraries/WiFi
 Not used: /home/dan/Arduino/libraries/WiFi
Multiple libraries were found for "WebServer.h"
 Used: /home/dan/.arduino15/packages/esp32/hardware/esp32/3.1.1/libraries/WebServer
 Not used: /home/dan/Arduino/libraries/WebServer-esp32-master
exit status 1
Error compiling for board ESP32S3 Dev Module.
@miloszlagan
Copy link
Collaborator

Hi,

I have just released Husarnet for Arduino IDE version6. It should fix build issues coming from changes in the underlying ESP-IDF framework build system.

Standard CMake compilation flags had not been applied correctly while compiling static libraries for use in Arduino and PlatformIO ports.

Please give the newest version a try as everything seems to build and work on my end. It should be visible soon under Arduino IDE library manager.

Milosz

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