HASwitchPlate / openHASP

HomeAutomation Switchplate based on lvgl for ESP32
https://www.openhasp.com
MIT License
725 stars 185 forks source link

Can't compile 0.6.3 #405

Closed LuisThe0ne closed 1 year ago

LuisThe0ne commented 1 year ago

Perform all steps below and tick them with [x]

Describe the bug

When i try to build 0.6.3 using Gitpod(https://gitpod.io#https://github.com/HASwitchPlate/openHASP/tree/0.6.3) I get the following Error:

gitpod /workspace/openHASP $ platformio run
Processing az-touch-mod-esp32_ili9341_4MB (board: esp32dev; framework: arduino; platform: https://github.com/tasmota/platform-espressif32/releases/download/v.2.0.3/platform-espressif32-v.2.0.3.zip)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
/home/gitpod/.pyenv/versions/3.8.12/bin/python3 -m pip install dulwich --global-option="--pure"
Collecting dulwich
  Using cached dulwich-0.20.50.tar.gz (430 kB)
Requirement already satisfied: urllib3>=1.25 in /home/gitpod/.pyenv/versions/3.8.12/lib/python3.8/site-packages (from dulwich) (1.26.6)
Skipping wheel build for dulwich, due to binaries being disabled for it.
Installing collected packages: dulwich
    Running setup.py install for dulwich: started
    Running setup.py install for dulwich: finished with status 'error'
/home/gitpod/.pyenv/versions/3.8.12/lib/python3.8/site-packages/pip/_internal/commands/install.py:229: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
  cmdoptions.check_install_build_global(options)
    ERROR: Command errored out with exit status 1:
     command: /home/gitpod/.pyenv/versions/3.8.12/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-49eg3nyl/dulwich_b170436ee05e47b8890326aebe498cc1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-49eg3nyl/dulwich_b170436ee05e47b8890326aebe498cc1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --pure install --record /tmp/pip-record-misnkfgj/install-record.txt --single-version-externally-managed --compile --install-headers /home/gitpod/.pyenv/versions/3.8.12/include/python3.8/dulwich
         cwd: /tmp/pip-install-49eg3nyl/dulwich_b170436ee05e47b8890326aebe498cc1/
    Complete output (6 lines):
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help

    error: option --pure not recognized
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/gitpod/.pyenv/versions/3.8.12/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-49eg3nyl/dulwich_b170436ee05e47b8890326aebe498cc1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-49eg3nyl/dulwich_b170436ee05e47b8890326aebe498cc1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --pure install --record /tmp/pip-record-misnkfgj/install-record.txt --single-version-externally-managed --compile --install-headers /home/gitpod/.pyenv/versions/3.8.12/include/python3.8/dulwich Check the logs for full command output.
WARNING: You are using pip version 21.2.4; however, version 22.3.1 is available.
You should consider upgrading via the '/home/gitpod/.pyenv/versions/3.8.12/bin/python3 -m pip install --upgrade pip' command.
*** Error 1
ModuleNotFoundError: No module named 'dulwich':
  File "/home/gitpod/.pyenv/versions/3.8.12/lib/python3.8/site-packages/platformio/builder/main.py", line 186:
    env.SConscript(item, exports="env")
  File "/home/gitpod/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/home/gitpod/.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 "/workspace/openHASP/tools/auto_firmware_version.py", line 12:
    from dulwich import porcelain
========================================================================================================================================================================= [FAILED] Took 2.99 seconds =========================================================================================================================================================================

Environment                     Status    Duration
------------------------------  --------  ------------
az-touch-mod-esp32_ili9341_4MB  FAILED    00:00:02.990
=================================================================================================================================================================== 1 failed, 0 succeeded in 00:00:02.990 ===================================================================================================================================================================
gitpod /workspace/openHASP $ 

To Reproduce

Try to compile the Firmware for the following override file:

; USAGE: Copy this file and rename it to platformio_override.ini
;
; The platformio_override.ini file is not overwritten or monitored by git
; ONLY edit platformio_override.ini to make local changes to the parameters

[platformio]
extra_configs =
    ; Uncomment or edit the lines to show more User Setups in the PIO sidebar
    ; user_setups/darwin_sdl/*.ini
     user_setups/esp32/*.ini
    ; user_setups/esp32s2/*.ini
    ; user_setups/linux_sdl/*.ini
    ; user_setups/stm32f4xx/*.ini
    ; user_setups/win32/*.ini

[override]
; -- Hasp config options --------------------------------------
build_flags =
; -- Uncomment the next line to use the file include/user_config_override.h settings
;    -DUSE_CONFIG_OVERRIDE

;region -- Default Build Environments : Used when Build All ---
extra_default_envs =
    ; Uncomment specific environments or create extra:
     az-touch-mod-esp32_ili9341_4MB
    ; d1-mini-esp32_ili9341
    ; d1-r32-unoshield
    ; esp32-9341-unoshield-analog
    ; esp12e-st7735
    ; esp32-one_st7796
    ; esp32dev-mrb3511
    ; esp32dev-ili9488
    ; lanbon_l8
    ; lolin-d32-pro_ili9341
    ; my_custom_build
    ; nodemcu32s-raspi
    ; ttgo_esp32_poe-ili9341
    ; ttgo-lilygo-pi_ili9481
    ; wt32-sc01
;endregion

;region -- Define your local COM ports for each environment ---
[env:d1-mini-esp32_ili9341]
monitor_port = COM6       ; Change to the correct port
upload_port = ${env:d1-mini-esp32_ili9341.monitor_port}

[env:esp32dev-mrb3511]
monitor_port = COM3       ; Change to the correct port
upload_port = ${env:esp32dev-mrb3511.monitor_port}

[env:az-touch-mod-esp32_ili9341_4MB]
upload_port = COM16 
monitor_port = COM16

[env:az-touch-mod-esp32_ili9341_8MB]
upload_port = COM16 
monitor_port = COM16

[env:d1-r32-unoshield_ili9486_adc]
monitor_port = COM5 
upload_port = COM5  

[env:d1-r32-unoshield_ili9341_adc]
;upload_protocol = espota  ; Use ArduinoOTA after flashing over serial
;upload_port = 192.168.0.4 ; IP of the ESP
;upload_flags = --port=3232 ; --auth=haspadmin   ; OTA password
monitor_port = COM5 
upload_port = COM5

[env:esp32-one_st7796]
upload_port = COM6      ; Change to the correct port
monitor_port = COM6     ; Change to the correct port

[env:lolin-d32-pro_ili9341]
monitor_port = COM5       ; Change to the correct port
upload_port = ${env:lolin-d32-pro_ili9341.monitor_port}
;endregion

[env:ttgo_esp32_poe-ili9341]
monitor_port = COM9       ; Change to the correct port
;upload_port = ${env:ttgo_esp32_poe-ili9341.monitor_port}
;upload_port = 192.168.4.5 ; IP of the ESP
;upload_protocol = espota  ; Use ArduinoOTA after flashing over serial
upload_flags = --port=3232 ; --auth=haspadmin   ; OTA password

[env:ttgo-lilygo-pi_ili9481]
monitor_port = COM9       ; Change to the correct port
;upload_port = ${env:ttgo_esp32_poe-ili9341.monitor_port}
;upload_port = 192.168.4.5 ; IP of the ESP
;upload_protocol = espota  ; Use ArduinoOTA after flashing over serial
upload_flags = --port=3232 ; --auth=haspadmin   ; OTA password

;region -- Custom Environment configuration example -----------------
[env:my_custom_build]
extends = esp32
board = nodemcu-32s

upload_port = COM12     ; To change the port, use platform_override.ini
monitor_port = COM12    ; To change the port, use platform_override.ini

board_build.partitions = user_setups/esp32/partitions_4MB.csv ; default.csv

debug_tool = esp-prog
debug_init_break = tbreak setup
build_flags =
    ${env.build_flags}
    ${esp32.build_flags}
;region -- TFT_eSPI build options -----------------------------------
    ${lcd.lolin24}
    ${esp32.vspi}        ; Use VSPI hardware SPI bus
    -D TFT_DC=5
    -D TFT_CS=26 
    -D TFT_RST=-1        ; RST
    -D TFT_BCKL=22       ; None, configurable via web UI (e.g. 21)
    -D TOUCH_CS=17       ; (can also be 22 or 16)
; -- Options ----------------------------------------
    -D HASP_USE_TELNET=1
;endregion

;endregion

Expected behavior

The firmware compiling flawless like 0.6.2 did.

Screenshots or video

grafik

fvanroie commented 1 year ago

The error indicates an issue when installing a python package: error: option --pure not recognized Try installing the dulwich package first without that option, before running platformio run:

python3 -m pip install dulwich
platformio run
LuisThe0ne commented 1 year ago

Now it spits out the same error a few times

In file included from lib/freetype/include/freetype/config/ftconfig.h:42,
                 from lib/freetype/include/freetype/internal/ftdebug.h:29,
                 from lib/freetype/src/base/ftadvanc.c:19,
                 from lib/freetype/src/base/ftbase.c:21:
lib/freetype/devel/ftstdlib.h:37:10: fatal error: lv_fs_if.h: No such file or directory
fvanroie commented 1 year ago

I think it's best to use the latest dev version instead: https://gitpod.io/#https://github.com/HASwitchPlate/openHASP/tree/master

LuisThe0ne commented 1 year ago

Yeah, i thought about that too but is it stable / ready to use? Or do you know when the next release is published, maybe I will wait.

fvanroie commented 1 year ago

Both are quite stable, but there will sure be bugs. The limited time I can spend seems better suited towards the next release instead of troubleshooting older builds and packages...

LuisThe0ne commented 1 year ago

That sounds logical. Nevertheless Thanks, the firmware works really good.

darkman7hr commented 1 year ago

I just cant compile this Master version.

`Processing az-touch-mod-esp32_ili9341_4MB (board: esp32dev; framework: arduino; platform: https://github.com/tasmota/platform-espressif32/releases/download/2023.08.01/platform-espressif32.zip)

Verbose mode can be enabled via -v, --verbose option NotGitRepository: No git repository was found at .: File "/root/.platformio/penv/lib64/python3.9/site-packages/platformio/builder/main.py", line 167: env.SConscript(env.GetExtraScripts("pre"), exports="env") File "/root/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598: return _SConscript(self.fs, *files, **subst_kw) File "/root/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285: exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) File "/tmp/openHASP-master/openHASP-master/tools/auto_firmware_version.py", line 35: BUILD_FLAGS=[get_firmware_commit_hash(),get_flash_size()] File "/tmp/openHASP-master/openHASP-master/tools/auto_firmware_version.py", line 22: r = Repo('.') File "/root/.platformio/penv/lib64/python3.9/site-packages/dulwich/repo.py", line 1141: raise NotGitRepository( ========================================== [FAILED] Took 0.94 seconds ==========================================`