krzmaz / LinakDeskEsp32Controller

Standalone ESP32 controller for Linak standing desks (e.g. Ikea Idasen) with HTTP API and Alexa integration
MIT License
33 stars 2 forks source link

Help needed compiling. / Please provide bianry. [wemos_d1_mini32] #16

Closed 10bn closed 2 years ago

10bn commented 2 years ago

Hi, thanks for you work on this. I installed vs code and platform io but unfortunately I'm unable to compile your latest realease.

Here is my console ouptput. I would apprechiate if you could have a look and let me know why it suddenlty want's the ESPAsyncDNSServer?

*  Executing task: C:\Users\Max\.platformio\penv\Scripts\platformio.exe run --environment esp32dev 

Warning! `test_build_project_src` configuration option in section [env:googletest_esp32] is deprecated and will be removed in the next release! Please use `test_build_src` insteadWarning! `src_filter` configuration option in section [env:googletest_esp32] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:native] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Processing esp32dev (platform: https://github.com/platformio/platform-espressif32.git; board: esp32dev; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (5.2.0+sha.03254d4) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduino-esp32 @ 2.0.5+sha.a5f03a8 
 - framework-arduinoespressif32 @ 3.20005.220925 (2.0.5) 
 - tool-esptoolpy @ 1.40201.0 (4.2.1) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 41 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ArduinoJson @ 6.19.4
|-- ESP Async WebServer @ 1.2.3+sha.f71e3d4
|   |-- AsyncTCP @ 1.1.1
|   |-- FS @ 2.0.0
|   |-- WiFi @ 2.0.0
|-- ESPAsync_WiFiManager @ 1.15.0
|   |-- AsyncTCP @ 1.1.1
|   |-- ESP Async WebServer @ 1.2.3+sha.f71e3d4
|   |   |-- AsyncTCP @ 1.1.1
|   |   |-- FS @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |-- ESP_DoubleResetDetector @ 1.3.2
|   |   |-- SPIFFS @ 2.0.0
|   |   |   |-- FS @ 2.0.0
|   |   |-- EEPROM @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |   |-- LittleFS @ 2.0.0
|   |   |   |-- FS @ 2.0.0
|   |-- WiFi @ 2.0.0
|-- NimBLE-Arduino @ 1.4.0
|-- FauxmoESP @ 3.4.0
|   |-- AsyncTCP @ 1.1.1
|   |-- WiFi @ 2.0.0
|-- LinakDeskEmbedded
|   |-- LinakDeskCore
|   |-- NimBLE-Arduino @ 1.4.0
|-- ESPmDNS @ 2.0.0
|   |-- WiFi @ 2.0.0
|-- ESP_DoubleResetDetector @ 1.3.2
|   |-- SPIFFS @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |-- EEPROM @ 2.0.0
|   |-- FS @ 2.0.0
|   |-- LittleFS @ 2.0.0
|   |   |-- FS @ 2.0.0
|-- FS @ 2.0.0
|-- LittleFS @ 2.0.0
|   |-- FS @ 2.0.0
|-- LinakDeskCore
Building in release mode
Compiling .pio\build\esp32dev\src\main.cpp.o
Archiving .pio\build\esp32dev\libf5d\libAsyncTCP.a
Archiving .pio\build\esp32dev\lib4ed\libFS.a
In file included from .pio/libdeps/esp32dev/ESPAsync_WiFiManager/src/ESPAsync_WiFiManager.h:40,
                 from src/main.cpp:13:
.pio/libdeps/esp32dev/ESPAsync_WiFiManager/src/ESPAsync_WiFiManager.hpp:221:10: fatal error: ESPAsyncDNSServer.h: No such file or directory

***************************************************************************
* Looking for ESPAsyncDNSServer.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:ESPAsyncDNSServer.h"
* Web  > https://registry.platformio.org/search?q=header:ESPAsyncDNSServer.h
*
***************************************************************************

 #include <ESPAsyncDNSServer.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio\build\esp32dev\lib586\WiFi\WiFiScan.cpp.o
Compiling .pio\build\esp32dev\lib586\WiFi\WiFiServer.cpp.o
Compiling .pio\build\esp32dev\lib586\WiFi\WiFiUdp.cpp.o
Compiling .pio\build\esp32dev\libdc2\ESP Async WebServer@src-e4ae2ab88c47a569bbf518658033926f\AsyncEventSource.cpp.o
Compiling .pio\build\esp32dev\libdc2\ESP Async WebServer@src-e4ae2ab88c47a569bbf518658033926f\AsyncWebSocket.cpp.o
Compiling .pio\build\esp32dev\libdc2\ESP Async WebServer@src-e4ae2ab88c47a569bbf518658033926f\SPIFFSEditor.cpp.o
Compiling .pio\build\esp32dev\libdc2\ESP Async WebServer@src-e4ae2ab88c47a569bbf518658033926f\WebAuthentication.cpp.o
Compiling .pio\build\esp32dev\libdc2\ESP Async WebServer@src-e4ae2ab88c47a569bbf518658033926f\WebHandlers.cpp.o
Compiling .pio\build\esp32dev\libdc2\ESP Async WebServer@src-e4ae2ab88c47a569bbf518658033926f\WebRequest.cpp.o
*** [.pio\build\esp32dev\src\main.cpp.o] Error 1
=========================================================================== [FAILED] Took 18.82 seconds ===========================================================================

Environment    Status    Duration
-------------  --------  ------------
esp32dev       FAILED    00:00:18.825
====================================================================== 1 failed, 0 succeeded in 00:00:18.825 ======================================================================

 *  The terminal process "C:\Users\Max\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'esp32dev'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 
krzmaz commented 2 years ago

Hi, thanks for your interest in the project! This is unexpected, I have set up the CI explicitly to catch any such issues, the latest run finished today successfully on all platforms: https://github.com/krzmaz/LinakDeskEsp32Controller/actions/runs/3264545031

What is even more unexpected is that from the logs it seems that your build is using different versions of the dependencies than explicitly specified in platformio.ini. For example

ESPAsync_WiFiManager @ 1.15.0

is different than https://github.com/krzmaz/LinakDeskEsp32Controller/blob/main/platformio.ini#L78:

khoih-prog/ESPAsync_WiFiManager @ 1.9.8

Did you change your platformio.ini file, or ran any automatic dependencies upgrades?

10bn commented 2 years ago

Hi, thank's for you fast response. I'm sorry, I was already fiddeling to long with this yesterday and forgot that I had changed something, because it wouldn't compile straight from the beginning.

Here are my steps with a fresh setup:

  1. Downloading your latest release: Screenshot 2022-10-18 084523

  2. Opening it with VS Code --> search for PlatfomIO --> Enable (Workspace): image

  3. Click Build: image

  4. Console Output:

    
    *  Executing task: C:\Users\Max\.platformio\penv\Scripts\platformio.exe run --environment esp32dev 

Warning! test_build_project_src configuration option in section [env:googletest_esp32] is deprecated and will be removed in the next release! Please use test_build_src instead Warning! src_filter configuration option in section [env:googletest_esp32] is deprecated and will be removed in the next release! Please use build_src_filter instead Warning! src_filter configuration option in section [env:native] is deprecated and will be removed in the next release! Please use build_src_filter instead Processing esp32dev (platform: https://github.com/platformio/platform-espressif32.git#feature/idf-v4.0; board: esp32dev; framework: arduino)

Platform Manager: Installing git+https://github.com/platformio/platform-espressif32.git#feature/idf-v4.0 git version 2.37.2.windows.2 Cloning into 'C:\Users\Max.platformio.cache\tmp\pkg-installing-6vixnn_o'... warning: Could not find remote branch feature/idf-v4.0 to clone. fatal: Remote branch feature/idf-v4.0 not found in upstream origin Error: VCS: Could not process command ['git', 'clone', '--recursive', '--depth', '1', '--branch', 'feature/idf-v4.0', 'https://github.com/platformio/platform-espressif32.git', 'C:\Users\Max\.platformio\.cache\tmp\pkg-installing-6vixnn_o']



Thanks for checking on this! :)
krzmaz commented 2 years ago

Sorry for that, this is a problem with upstream deleting needed branches.

fatal: Remote branch feature/idf-v4.0 not found in upstream origin

Please try using the mainline code: image

I will try to keep in mind to create another tag

10bn commented 2 years ago

I cloned the main branch but it won't compile either.

 *  Executing task: C:\Users\Max\.platformio\penv\Scripts\platformio.exe run 

Warning! `test_build_project_src` configuration option in section [env:googletest_esp32] is deprecated and will be removed in the next release! Please use `test_build_src` insteadWarning! `src_filter` configuration option in section [env:googletest_esp32] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Warning! `src_filter` configuration option in section [env:native] is deprecated and will be removed in the next release! Please use `build_src_filter` instead
Processing esp32dev (platform: https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master; board: esp32dev; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
patch C:\Users\Max\.platformio\platforms\espressif32@src-ba2d3999402da5eaf2c9d5863ef113c7\builder\main.py patches\gcc-ar-ranlib.patch
'patch' is not recognized as an internal or external command,
operable program or batch file.
*** Error 1
Exception: Problem while applying platform patches!

See scripts/apply_patches.py for more details!
:
  File "C:\Users\Max\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 186:
    env.SConscript(item, exports="env")
  File "C:\Users\Max\.platformio\packages\tool-scons\scons-local-4.4.0\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\Max\.platformio\packages\tool-scons\scons-local-4.4.0\SCons\Script\SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "C:\Users\Max\dev\github\LinakDeskEsp32Controller\scripts\apply_patches.py", line 21:
    raise Exception("Problem while applying platform patches!\n\n"
=========================================================================== [FAILED] Took 14.11 seconds ===========================================================================

Environment    Status    Duration
-------------  --------  ------------
esp32dev       FAILED    00:00:14.108
====================================================================== 1 failed, 0 succeeded in 00:00:14.108 ======================================================================

 *  The terminal process "C:\Users\Max\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 
10bn commented 2 years ago

I got it working by installing patch and adding it to my env path. Then I had to log in and out from my windows session to make it work. My first try was pip install patch which wasn't working.

This is the patch executable I downloaded and used: https://sourceforge.net/projects/gnuwin32/

Thankyou for your help. If their is any more help from my side needed to get everything more streamlined please let me know.

krzmaz commented 2 years ago

Great to see that it worked eventually. And this is a good datapoint that the log

See scripts/apply_patches.py for more details!

doesn't work 😄 There is an instruction about manually patching the needed files there: https://github.com/krzmaz/LinakDeskEsp32Controller/blob/main/scripts/apply_patches.py#L17-L19

I will think about fixing this in the python script maybe.

10bn commented 2 years ago

Yeah, that was good help. :)

Thanks a lot. Unfortuanteley the esp reboot's a lot and I opened a seperate issue for that. https://github.com/krzmaz/LinakDeskEsp32Controller/issues/17