Building a project

Hi, I really hope someone can help me with this… ive been trying to figure out how to build this project for some time now using PIO but cant seem to get my head around it.
its a repo here https://github.com/husain3/Automatic-Garage-Door-Public.git
iam just not sure where iam going wrong. obviously im new to PIO/VScode and programming in general but i have written, Well… Mainly Modified some projects using arduino with success but vscode is quite overwhelming.
anyway heres some of the error from trying to build. sorry if i havent put the info in the right format and if you want me to change something please let me know?
ive tried to get help with this on other forums but ended up just trying to work it out my self but never get a reply. i know its probably something stupid im missing.
I followed the authors instructions as per config.h and config_gen.py using python3 etc.
Do the .ino files need to be converted to .cpp before building?
I would love the opportunity for someone to share their wisdom and shed some light on this for me…some error messages below: (theres more but its of the same like first defined here etc :face_with_diagonal_mouth:…??)

c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::AsyncWebServer(unsigned short)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:48: multiple definition of `AsyncWebServer::AsyncWebServer(unsigned short)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:33: first defined here        
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::AsyncWebServer(unsigned short)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:48: multiple definition of `AsyncWebServer::AsyncWebServer(unsigned short)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:33: first defined here        
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::onFileUpload(std::function<void (AsyncWebServerRequest*, String const&, unsigned int, unsigned char*, unsigned int, bool)>)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:182: multiple definition of `AsyncWebServer::onFileUpload(std::function<void (AsyncWebServerRequest*, String const&, unsigned int, unsigned char*, unsigned int, bool)>)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:175: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::onRequestBody(std::function<void (AsyncWebServerRequest*, unsigned char*, unsigned int, unsigned int, unsigned int)>)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:186: multiple definition of `AsyncWebServer::onRequestBody(std::function<void (AsyncWebServerRequest*, unsigned char*, unsigned int, unsigned int, unsigned int)>)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:179: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::onNotFound(std::function<void (AsyncWebServerRequest*)>)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:178: multiple definition of `AsyncWebServer::onNotFound(std::function<void (AsyncWebServerRequest*)>)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:171: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::reset()':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:190: multiple definition of `AsyncWebServer::reset()'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:183: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::~AsyncWebServer()':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:67: multiple definition of `AsyncWebServer::~AsyncWebServer()'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:54: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::~AsyncWebServer()':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:67: multiple definition of `AsyncWebServer::~AsyncWebServer()'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:54: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebServer.cpp.o): in function `AsyncWebServer::on(char const*, unsigned char, std::function<void (AsyncWebServerRequest*)>, std::function<void (AsyncWebServerRequest*, String const&, unsigned int, unsigned char*, unsigned int, bool)>, std::function<void (AsyncWebServerRequest*, unsigned char*, unsigned int, unsigned int, unsigned int)>)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebServer.cpp:161: multiple definition of `AsyncWebServer::on(char const*, unsigned char, std::function<void 
(AsyncWebServerRequest*)>, std::function<void (AsyncWebServerRequest*, String const&, unsigned int, unsigned char*, unsigned int, bool)>, std::function<void (AsyncWebServerRequest*, unsigned char*, unsigned int, 
unsigned int, unsigned int)>)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebServer.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebServer.cpp:127: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebAuthentication.cpp.o): in function `checkBasicAuthentication(char const*, char const*, char const*)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebAuthentication.cpp:34: multiple definition of `checkBasicAuthentication(char const*, char const*, char const*)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebAuthentication.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebAuthentication.cpp:32: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebAuthentication.cpp.o): in function `generateDigestHash(char const*, char const*, char const*)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebAuthentication.cpp:118: multiple definition of `generateDigestHash(char const*, char const*, char const*)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebAuthentication.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebAuthentication.cpp:112: first defined here
c:/users/gamming pc/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\libfb5\libESPAsyncWebServer.a(WebAuthentication.cpp.o): in function `checkDigestAuthentication(char const*, char const*, char const*, char const*, char const*, bool, char const*, char const*, char const*)':
E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer/src/WebAuthentication.cpp:145: multiple definition of `checkDigestAuthentication(char const*, char const*, char const*, char const*, char const*, bool, char const*, char const*, char const*)'; .pio\build\esp32dev\lib956\libESPAsyncWebServer-esphome.a(WebAuthentication.cpp.o):E:\vscode\Automatic-Garage-Door-Public\Garage-Base-Station/.pio/libdeps/esp32dev/ESPAsyncWebServer-esphome/src/WebAuthentication.cpp:144: first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1
=========================================================================================== [FAILED] Took 29.77 seconds =====

BTW I have noticed that my python environment is .VENV ?? not sure if this is right? i have had little experience with python :grimacing:

this is in my PIO.ini file :

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
board_build.partitions = min_spiffs.csv
monitor_speed = 115200
lib_deps = 
	plapointe6/EspMQTTClient@^1.13.3
	jlusprivat/SimpleHOTP@^1.0.1
	me-no-dev/AsyncTCP@^1.1.1
	ottowinter/ESPAsyncWebServer-esphome@^3.0.0
	h2zero/NimBLE-Arduino@^1.4.1
	ayushsharma82/ElegantOTA@^3.1.5
build_flags = -DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_compat_mode = strict

With regards to the original project’s libraries

The only problematic one here ayushsharma82/AsyncElegantOTA@^2.2.7, which doesn’t exist in the PIO registry anymore. However, the repository https://github.com/ayushsharma82/AsyncElegantOTA/tree/v2.2.7 still exists, so you can tell PlatformIO to pull the library from there.

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
board_build.partitions = min_spiffs.csv
monitor_speed = 115200
lib_deps = 
	plapointe6/EspMQTTClient@^1.13.3
	jlusprivat/SimpleHOTP@^1.0.1
	me-no-dev/AsyncTCP@^1.1.1
	ottowinter/ESPAsyncWebServer-esphome@^3.0.0
	https://github.com/ayushsharma82/AsyncElegantOTA/archive/refs/tags/v2.2.7.zip
	h2zero/NimBLE-Arduino@^1.4.1

Results in a good firmware build for me.

Linking .pio\build\esp32dev\firmware.elf
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  18.6% (used 60816 bytes from 327680 bytes)
Flash: [======    ]  61.7% (used 1213257 bytes from 1966080 bytes)
Building .pio\build\esp32dev\firmware.bin
esptool.py v4.5.1
Creating esp32 image...
Merged 27 ELF sections
Successfully created esp32 image.
===========[SUCCESS] Took 52.53 ===========

I’m sure that with some rewriting, you can also get the project to build with ayushsharma82/ElegantOTA@^3.1.5. The linking errors you’re getting there seem to indicate that two different libraries are trying to define the WebServer class – obviously conflicting. That could mean that two libraries in there are fundamentally incompatible, or one library has to be modified to not provide that class.

Thank you so much for your reply. :+1: i will update the library and see how it goes. so how do i fish out the conflicting library/s ??

thanks again

Is it normal to have duplicate files as highlighted?

i’m getting closer… just not sure what to do with this "esp_task_wdt_reset(); issue. see screenshot. any ideas??

Seems like you just need

#include "esp_task_wdt.h"

at the top for this.