MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.81k stars 494 forks source link

Homeassistant ha-av build failed on 8.16.2 armv6l #6321

Closed steals closed 1 year ago

steals commented 1 year ago

Creating a bug report/issue

After fixing the issue with Homeassistant update https://github.com/MichaIng/DietPi/issues/6320 home assistant is not fully started. In the logs I see that the build of the related module ha-av is failing.

Required Information

Additional Information (if applicable)

Steps to reproduce

  1. sudo systemctl start home-assistant OR pip3 install ha-av==10.0.0

Extra details

Apr 18 10:57:58 DietPi systemd[1]: Started Home Assistant (DietPi).
Apr 18 10:58:28 DietPi Home Assistant[13851]: 2023-04-18 10:58:28.583 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Apr 18 10:58:28 DietPi Home Assistant[13851]: 2023-04-18 10:58:28.601 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Apr 18 10:58:28 DietPi Home Assistant[13851]: 2023-04-18 10:58:28.614 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Apr 18 10:58:28 DietPi Home Assistant[13851]: 2023-04-18 10:58:28.627 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration ble_monitor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Apr 18 10:58:28 DietPi Home Assistant[13851]: 2023-04-18 10:58:28.642 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration gismeteo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Apr 18 10:58:28 DietPi Home Assistant[13851]: 2023-04-18 10:58:28.656 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration yandex_weather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Apr 18 10:59:13 DietPi Home Assistant[13851]: 2023-04-18 10:59:13.568 WARNING (MainThread) [homeassistant.setup] Setup of ssdp is taking over 10 seconds.
Apr 18 10:59:15 DietPi Home Assistant[13851]: 2023-04-18 10:59:15.597 WARNING (MainThread) [homeassistant.setup] Setup of bluetooth is taking over 10 seconds.
Apr 18 10:59:15 DietPi Home Assistant[13851]: 2023-04-18 10:59:15.817 WARNING (MainThread) [homeassistant.config_entries] Config entry '00:E0:4C:23:99:87' for bluetooth integration not ready yet: Bluetooth adapter None with address 00:E0:4C:23:99:87 not found; Retrying in background
Apr 18 11:03:01 DietPi Home Assistant[13851]: 2023-04-18 11:03:01.506 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package ha-av==10.0.0: error: subprocess-exited-with-error
Apr 18 11:03:01 DietPi Home Assistant[13851]:
Apr 18 11:03:01 DietPi Home Assistant[13851]:   × Getting requirements to build wheel did not run successfully.
Apr 18 11:03:01 DietPi Home Assistant[13851]:   │ exit code: 1
Apr 18 11:03:01 DietPi Home Assistant[13851]:   ╰─> [29 lines of output]
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Package libavformat was not found in the pkg-config search path.
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Perhaps you should add the directory containing `libavformat.pc'
Apr 18 11:03:01 DietPi Home Assistant[13851]:       to the PKG_CONFIG_PATH environment variable
Apr 18 11:03:01 DietPi Home Assistant[13851]:       No package 'libavformat' found
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Package libavcodec was not found in the pkg-config search path.
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Perhaps you should add the directory containing `libavcodec.pc'
Apr 18 11:03:01 DietPi Home Assistant[13851]:       to the PKG_CONFIG_PATH environment variable
Apr 18 11:03:01 DietPi Home Assistant[13851]:       No package 'libavcodec' found
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Package libavdevice was not found in the pkg-config search path.
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Perhaps you should add the directory containing `libavdevice.pc'
Apr 18 11:03:01 DietPi Home Assistant[13851]:       to the PKG_CONFIG_PATH environment variable
Apr 18 11:03:01 DietPi Home Assistant[13851]:       No package 'libavdevice' found
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Package libavutil was not found in the pkg-config search path.
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Perhaps you should add the directory containing `libavutil.pc'
Apr 18 11:03:01 DietPi Home Assistant[13851]:       to the PKG_CONFIG_PATH environment variable
Apr 18 11:03:01 DietPi Home Assistant[13851]:       No package 'libavutil' found
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Package libavfilter was not found in the pkg-config search path.
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Perhaps you should add the directory containing `libavfilter.pc'
Apr 18 11:03:01 DietPi Home Assistant[13851]:       to the PKG_CONFIG_PATH environment variable
Apr 18 11:03:01 DietPi Home Assistant[13851]:       No package 'libavfilter' found
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Package libswscale was not found in the pkg-config search path.
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Perhaps you should add the directory containing `libswscale.pc'
Apr 18 11:03:01 DietPi Home Assistant[13851]:       to the PKG_CONFIG_PATH environment variable
Apr 18 11:03:01 DietPi Home Assistant[13851]:       No package 'libswscale' found
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Package libswresample was not found in the pkg-config search path.
Apr 18 11:03:01 DietPi Home Assistant[13851]:       Perhaps you should add the directory containing `libswresample.pc'
Apr 18 11:03:01 DietPi Home Assistant[13851]:       to the PKG_CONFIG_PATH environment variable
Apr 18 11:03:01 DietPi Home Assistant[13851]:       No package 'libswresample' found
Apr 18 11:03:01 DietPi Home Assistant[13851]:       pkg-config could not find libraries ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample']
Apr 18 11:03:01 DietPi Home Assistant[13851]:       [end of output]
Apr 18 11:03:01 DietPi Home Assistant[13851]:
Apr 18 11:03:01 DietPi Home Assistant[13851]:   note: This error originates from a subprocess, and is likely not a problem with pip.
Apr 18 11:03:01 DietPi Home Assistant[13851]: error: subprocess-exited-with-error
Apr 18 11:03:01 DietPi Home Assistant[13851]: × Getting requirements to build wheel did not run successfully.
Apr 18 11:03:01 DietPi Home Assistant[13851]: │ exit code: 1
Apr 18 11:03:01 DietPi Home Assistant[13851]: ╰─> See above for output.
Apr 18 11:03:01 DietPi Home Assistant[13851]: note: This error originates from a subprocess, and is likely not a problem with pip.
Apr 18 11:03:01 DietPi Home Assistant[13851]: [notice] A new release of pip is available: 23.0.1 -> 23.1
Apr 18 11:03:01 DietPi Home Assistant[13851]: [notice] To update, run: pip install --upgrade pip
Apr 18 11:05:15 DietPi Home Assistant[13851]: 2023-04-18 11:05:15.954 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 - moving forward
Apr 18 11:05:17 DietPi Home Assistant[13851]: 2023-04-18 11:05:17.124 ERROR (MainThread) [homeassistant.components.homeassistant_alerts] Error requesting homeassistant_alerts data: Cannot connect to host alerts.home-assistant.io:443 ssl:default [Network is unreachable]

After installing libavformat-dev the number of errors is decreased to

homeassistant@DietPi:~$ pip3 install ha-av==10.0.0
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
Collecting ha-av==10.0.0
  Downloading ha-av-10.0.0.tar.gz (2.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 1.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      Package libavdevice was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libavdevice.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libavdevice' found
      Package libavfilter was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libavfilter.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libavfilter' found
      Package libswscale was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libswscale.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libswscale' found
      pkg-config could not find libraries ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample']
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
MichaIng commented 1 year ago

Looks like you have some video related integration enabled? This package should pull all others as dependencies:

apt install libavdevice-dev
steals commented 1 year ago

installing libavdevice-dev solved the issue. thank you again.