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

Compilation fails "multiple definition of ..." when "ESP Mail Client" and ArduinoIoTCloud libraries used in sketch #398

Open
RoboRoyal opened this issue Dec 19, 2023 · 0 comments · May be fixed by #465
Labels
type: imperfection Perceived defect in any part of project

Comments

@RoboRoyal
Copy link

RoboRoyal commented Dec 19, 2023

When including both the "ArduinoIoTCloud" and "ESP Mail Client" libraries in any sketch, compilation fails

ArduinoIoTCloud: 1.15.1
ESP Mail Client: 3.4.19

Code to reproduce error:

#include <ArduinoIoTCloud.h>
#include <ESP_Mail_Client.h>
void setup() {}
void loop() {}

Error:

c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(dec32be.c.o): in function `br_range_dec32be':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/dec32be.c:33: multiple definition of `br_range_dec32be'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(dec32be.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/dec32be.c:35: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(enc32be.c.o): in function `br_range_enc32be':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/enc32be.c:33: multiple definition of `br_range_enc32be'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(enc32be.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/enc32be.c:35: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o): in function `br_sha224_set_state':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:289: multiple definition of `br_sha224_set_state'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:291: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:311: multiple definition of `br_sha224_vtable'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:313: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:41: multiple definition of `br_sha224_IV'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:43: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o): in function `br_sha224_init':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:258: multiple definition of `br_sha224_init'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:260: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:329: multiple definition of `br_sha256_vtable'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:331: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:47: multiple definition of `br_sha256_IV'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:49: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o): in function `br_sha256_init':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:297: multiple definition of `br_sha256_init'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:299: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o): in function `br_sha224_state':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:281: multiple definition of `br_sha224_state'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:283: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o): in function `br_sha2small_round':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:74: multiple definition of `br_sha2small_round'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:76: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o): in function `br_sha224_update':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:267: multiple definition of `br_sha224_update'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:269: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o): in function `br_sha224_out':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:274: multiple definition of `br_sha224_out'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:276: first defined here
c:/users/dakota/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ESP_Mail_Client\SSLClient\bssl\objs.a(sha2small.c.o): in function `br_sha256_out':
c:\Users\Dakota\Documents\Arduino\libraries\ESP_Mail_Client\src\SSLClient\bssl/sha2small.c:306: multiple definition of `br_sha256_out'; C:\Users\Dakota\AppData\Local\Temp\arduino\sketches\F98D36AEE99FA0B786C99A5BED071753\libraries\ArduinoIoTCloud\tls\bearssl\objs.a(sha2small.c.o):c:\Users\Dakota\Documents\Arduino\libraries\ArduinoIoTCloud\src\tls\bearssl/sha2small.c:308: first defined here
collect2.exe: error: ld returned 1 exit status

Additional Context

Discussion on Arduino Forum:

https://forum.arduino.cc/t/compatibility-issue-using-arduino-cloud-and-esp-mail-client/1201979

Additional Reports

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Dec 20, 2023
@per1234 per1234 changed the title Compatibility issue using Arduino Cloud and ESP mail client Compilation fails "multiple definition of ..." when "ESP Mail Client" and ArduinoIoTCloud libraries used in sketch May 2, 2024
@pennam pennam linked a pull request May 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
2 participants