While compiling for Arduino Mega the compilation happens file and no issues.
Although while compiling for ESP 32 I'm getting a linker error as below
c:/users/rakes/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\rakes\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0/tools/sdk/esp32/lib\libwpa_supplicant.a(crypto_mbedtls.c.obj): in function `aes_encrypt':
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/wpa_supplicant/src/crypto/crypto_mbedtls.c:326: multiple definition of `aes_encrypt'; C:\Users\rakes\AppData\Local\Temp\arduino_build_644450\sketch\src\ciphering.c.o:C:\Users\rakes\AppData\Local\Temp\arduino_build_644450\sketch\src/ciphering.c:343: first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board ESP32 Dev Module.
Any Idea on why this could be happening ? any suggestions ?
I see that there is a clash of same function aes_encrypt in the ESP32 stach and in the gurux libraries.
Thanks Mikko for the quick reply,
I solved this issue. In the cyphering.c I renamed the aes_encrypt function to aes_encrypt1 and replaced the same where the function is called. Now it's compiled.
Esp32 has its own aes_encrypt function for the wifi connects. This workaround has worked fine.
I'm using the esp32 dev board.
I'm using arduino ide and in that WIFI library has aes_encrypt function which is already defined.
Renaming that function in the cyphering.c has worked.
hope that helps to update the Library.
Hi,
Hi,
You have another aes_encrypt defined in your project. What compiler you are using? We can try to repeat this and find a way to remove it.
BR,
Mikko
Thanks Mikko for the quick
Thanks Mikko for the quick reply,
I solved this issue. In the cyphering.c I renamed the aes_encrypt function to aes_encrypt1 and replaced the same where the function is called. Now it's compiled.
Esp32 has its own aes_encrypt function for the wifi connects. This workaround has worked fine.
Hi,
Hi,
If you can share your board settings this can be handled in the framework. It's easier to use in the future.
BR,
Mikko
I'm using the esp32 dev board
I'm using the esp32 dev board.
I'm using arduino ide and in that WIFI library has aes_encrypt function which is already defined.
Renaming that function in the cyphering.c has worked.
hope that helps to update the Library.