Skip to content

Commit

Permalink
fix some integrations
Browse files Browse the repository at this point in the history
- add cross/libstdc++ to fix grpcio for DSM < 7
- add cross/opus to fix voice over ip integration
- fix Google Generative AI Conversation integration (requires grpcio fix and google_generativeai)
  • Loading branch information
hgy59 committed Jul 30, 2023
1 parent 0bf4235 commit fd19840
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
18 changes: 17 additions & 1 deletion spk/homeassistant/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ PYTHON_PACKAGE = python311
SPK_DEPENDS = "$(PYTHON_PACKAGE)>=3.11.4-7"

BUILD_DEPENDS = cross/$(PYTHON_PACKAGE)
OPTIONAL_DEPENDS = cross/libstdc++

# [numpy] > 1.22.4
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS) $(ARMv7L_ARCHS)

MAINTAINER = hgy59
DESCRIPTION = "Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control."
DISPLAY_NAME = Home Assistant Core
CHANGELOG = "1. Update homeassistant to 2023.7.3. and depend on Python 3.11 and OpenSSL 3.1.<br/>2. Update HACS integration to v1.32.1.<br/><br/>REMARKS: Only arch specific python modules are included in the package. Other modules are downloaded at installation time."
CHANGELOG = "1. Update homeassistant to 2023.7.3. and depend on Python 3.11 and OpenSSL 3.1.<br/>2. Update HACS integration to v1.32.1.<br/>3. Add libstdc++ for DSM 6 to fix grpcio dependency.<br/><br/>REMARKS: Only arch specific python modules are included in the package. Other modules are downloaded at installation time."
STARTABLE = yes

HOMEPAGE = https://www.home-assistant.io/
Expand All @@ -38,6 +39,21 @@ POST_STRIP_TARGET = homeassistant_extra_install
# Include cross compiled wheels only, the package installer downloads pure python wheels at installation time.
WHEELS = src/requirements-abi3.txt src/requirements-crossenv.txt src/requirements-pure.txt

include ../../mk/spksrc.common.mk

# [grpcio]
# for DSM < 7 with too old libstdc++
# avoid error: undefined symbol: _ZTVNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE
# this is a fix for integrations depending on grpcio (google nest, google generativeai and starlink)
# the fix requires to additionally set the LD_LIBRARY_PATH to homeassistant/target/lib
ifeq ($(call version_lt, ${TCVERSION}, 7.0),1)
DEPENDS += cross/libstdc++
endif

# [voip_utils]
# for voice over ip integration
DEPENDS += cross/opus

# definitions and libraries
# to build wheels of src/requirements-crossenv.txt and src/requirements-abi3.txt
# ------------------------
Expand Down
4 changes: 4 additions & 0 deletions spk/homeassistant/src/postinst_components_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ fritzconnection==1.12.0
gassist_text==0.0.10
geopy==2.3.0
getmac==0.8.2
google_generativeai==0.1.0
google_nest_sdm==2.2.5
greeclimate==1.4.1
# grpcio is not a pure python package, but is available on pypi for all supported archs (except qoriq)
# grpcio==1.51.1 is not available for python311 for supported archs, but 1.56.x is
# but packages depending on grpcio==1.51.1 do not work with 1.56.x:
# Error occurred loading flow for integration nest: /volume1/@appstore/homeassistant/env/lib/python3.11/site-packages/grpc/_cython/cygrpc.cpython-311-aarch64-linux-gnu.so: undefined symbol: _ZTVNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE
# this is an issue with aarch64 and too old libstdc++ (https://github.com/grpc/grpc/issues/33734)
grpcio>=1.51.1
ha_ffmpeg==3.1.0
pyairvisual==2022.12.1
Expand Down
3 changes: 2 additions & 1 deletion spk/homeassistant/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ SVC_WRITE_PID=y
SVC_BACKGROUND=y
SVC_CWD="${SYNOPKG_PKGVAR}"
HOME="${SYNOPKG_PKGVAR}"

# workaround for python modules depending on newer libstdc++ (i.e. grpcio>=1.56.x)
export LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib

# save and restore the pip-cache on package update
# ------------------------------------------------
Expand Down

0 comments on commit fd19840

Please sign in to comment.