Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.37k stars 253 forks source link

nspanel.yaml install errore #2263

Open mcgnai opened 1 week ago

mcgnai commented 1 week ago

TFT Version

No response

Firmware Version

2024.8.3

Blueprint Version

4.3.11

Panel Model

US (Landscape)

What is the bug?

istall report

IINFO ESPHome 2024.8.1 INFO Reading configuration /config/esphome/nspanel.yaml... INFO Detected timezone 'Europe/Rome' INFO Generating C++ source... INFO Compiling app... Processing nspanel (board: esp32dev; framework: espidf; platform: platformio/espressif32@5.4.0) HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

framework-espidf @ 3.40407.240606 (4.4.7) tool-cmake @ 3.16.9 tool-ninja @ 1.10.2 toolchain-esp32ulp @ 2.35.0-20220830 toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5 Reading CMake configuration... -- The C compiler identification is GNU 8.4.0 -- The CXX compiler identification is GNU 8.4.0 -- The ASM compiler identification is GNU -- Found assembler: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc -- Check for working C compiler: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc -- Check for working C compiler: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc -- broken -- Configuring incomplete, errors occurred! See also "/data/build/nspanel/.pioenvs/nspanel/CMakeFiles/CMakeOutput.log". See also "/data/build/nspanel/.pioenvs/nspanel/CMakeFiles/CMakeError.log". fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). CMake Error at /data/cache/platformio/packages/tool-cmake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler

"/data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /data/build/nspanel/.pioenvs/nspanel/CMakeFiles/CMakeTmp

Run Build Command(s):/data/cache/platformio/packages/tool-ninja/ninja cmTC_03776 && [1/2] Building C object CMakeFiles/cmTC_03776.dir/testCCompiler.c.obj [2/2] Linking C executable cmTC_03776 FAILED: cmTC_03776 : && /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address CMakeFiles/cmTC_03776.dir/testCCompiler.c.obj -o cmTC_03776 && : /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: error loading plugin: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/liblto_plugin.so: cannot open shared object file: No such file or directory collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): /data/cache/platformio/packages/framework-espidf/tools/cmake/project.cmake:381 (__project) CMakeLists.txt:3 (project)

========================== [FAILED] Took 7.49 seconds ==========================

Steps to Reproduce

No response

Your Panel's YAML

substitutions:
  # Settings - Editable values
  device_name: nspanel
  friendly_name: NSPanel
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  nextion_update_url: "https://homeassistant.local:8123/local/nspanel_us_land.tft"  # Optional
  # Add-on configuration (if needed)
  # heater_relay: "1"  # Possible values: "1" or "2"

# Customization area
##### My customization - Start #####
##### My customization - End #####

# Core and optional configurations
packages:
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    refresh: 300s
    files:
      - nspanel_esphome.yaml # Basic package
      # Optional advanced and add-on configurations
      # - esphome/nspanel_esphome_advanced.yaml
      # - esphome/nspanel_esphome_addon_ble_tracker.yaml
      # - esphome/nspanel_esphome_addon_bluetooth_proxy.yaml
      # - esphome/nspanel_esphome_addon_climate_cool.yaml
      - esphome/nspanel_esphome_addon_climate_heat.yaml
      # - esphome/nspanel_esphome_addon_climate_dual.yaml
      # - esphome/nspanel_esphome_addon_cover.yaml

ESPHome Logs

No response

Home Assistant Logs

No response

edwardtfn commented 1 week ago

Have you tried cleaning the build files?

https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/error_compiling.md#clean-up-build-files

mcgnai commented 1 week ago

yes, I tried but it didn't solve the problem

mcgnai commented 1 week ago

help me

edwardtfn commented 1 week ago

I would suggest you to update your ESPHome to the latest version (2024.8.3) as they have fixed some issues from their side. Also, please restart your host machine (not only Home Assistant) to clean up some memory...

windischb commented 1 week ago

I have a similar issue... but not sure if the problem is the same...

When adding: esp32: board: esp32dev framework: type: arduino

i can at least build it.

with: esp32: board: esp32dev framework: type: esp-idf

i get following:

`

Removing unused dependencies... HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. *** Error 1 Reading CMake configuration... -- Found Git: /usr/bin/git (found version "2.39.2") -- The C compiler identification is GNU 8.4.0 -- The CXX compiler identification is GNU 8.4.0 -- The ASM compiler identification is GNU -- Found assembler: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc -- Check for working C compiler: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc -- Check for working C compiler: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++ -- Check for working CXX compiler: /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Building ESP-IDF components for target esp32 -- Configuring incomplete, errors occurred! See also "/data/build/nspanel-vorzimmer/.pioenvs/nspanel-vorzimmer/CMakeFiles/CMakeOutput.log".

fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). CMake Error at /data/cache/platformio/packages/framework-espidf/tools/cmake/build.cmake:463 (message): /root/.platformio/penv/.espidf-4.4.7/bin/python: Error while finding module specification for 'idf_component_manager.prepare_components' (ModuleNotFoundError: No module named 'idf_component_manager')

Call Stack (most recent call first): /data/cache/platformio/packages/framework-espidf/tools/cmake/project.cmake:476 (idf_build_process) CMakeLists.txt:3 (project)

========================== [FAILED] Took 4.11 seconds ========================== `

mcgnai commented 1 week ago

Ti suggerirei di aggiornare il tuo ESPHome all'ultima versione (2024.8.3) poiché hanno risolto alcuni problemi da parte loro. Inoltre, riavvia la tua macchina host (non solo Home Assistant) per ripulire un po' di memoria...

Grazie per la risposta e per il suggerimento ma ho giò aggiornato ESPHome alla 2024.8.3 e provato ad riavviare Home assistant come suggerito ma purtroppo continua a dare quell'errore. Che altre prove possi fare? potrebbe dipendere dal framework esp-idf e provare a rimettere arduino ?

edwardtfn commented 1 week ago

Yeah, you can try switching to arduino, but in this case, please don't try using Bluetooth components or you shall get out of memory.

Just add this to your yaml:

esp32:
  framework:
    type: arduino
edwardtfn commented 1 week ago

What is the CPU where you are running the ESPHome compiler? Is it running as a Home Assistant add-on?

windischb commented 1 week ago

In may case its a Home Assistant add-on, running in a VM on a Synology NAS wit AMD Ryzen R1600 CPU...

edwardtfn commented 1 week ago

In may case its a Home Assistant add-on, running in a VM on a Synology NAS wit AMD Ryzen R1600 CPU...

How much RAM assigned to this VM?

windischb commented 1 week ago

8GB

windischb commented 1 week ago

should i try to increase? Could that help?

edwardtfn commented 1 week ago

No. 8Gb should be enough.

mcgnai commented 1 week ago

Yeah, you can try switching to arduino, but in this case, please don't try using Bluetooth components or you shall get out of memory.

Just add this to your yaml:

esp32:
  framework:
    type: arduino

it works... during compilation some yellow messages are displayed but in the end the flash is ok. can I leave the Arduino framework? But what changes or is missing compared to esp-idf ?

edwardtfn commented 1 week ago

Yeah, you can live with Arduino for now. It requires more memory, which prevents the use of some Add-ons (specially Bluetooth), but if you don't need those, your are probably fine for a while. But I have to say I don't test arduino when developing. Have some automated tests, but that covers only building process. But of course, I will do my best to fix any issue people finds with Arduino.

mcgnai commented 1 week ago

Sì, puoi convivere con Arduino per ora. Richiede più memoria, il che impedisce l'uso di alcuni componenti aggiuntivi (specialmente Bluetooth), ma se non ne hai bisogno, probabilmente per un po' va bene. Ma devo dire che non testo Arduino durante lo sviluppo. Ho alcuni test automatizzati, ma questo riguarda solo il processo di creazione. Ma ovviamente farò del mio meglio per risolvere qualsiasi problema che le persone trovino con Arduino.

Ok, per il momento grazie. Se poi trovi una soluzione per risolvere il mio problema e far funzionare il mio snpanel con il framework esp-idf fammelo sapere. Se vuoi poi posso fare dei test per vedere se funziona. A presto