ha-google-home: Version 1.9.6 fails to install glocaltokens==0.6.1 in home assistant official containers

Describe the bug

With the last release (v1.9.6) the integration is unable to start due to dependency install failure due to missing c++ in the container.

This is probably related to a dependency not having a wheel for the Python/OS version of the official Home Assistant containers.

Version of the integration

1.9.6

Logs

Unable to install package glocaltokens==0.6.1: ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mqsqsqz6/grpcio-tools/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mqsqsqz6/grpcio-tools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rczzd0sb cwd: /tmp/pip-install-mqsqsqz6/grpcio-tools/ Complete output (11 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-mqsqsqz6/grpcio-tools/setup.py", line 180, in <module> if check_linker_need_libatomic(): File "/tmp/pip-install-mqsqsqz6/grpcio-tools/setup.py", line 91, in check_linker_need_libatomic cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++11', '-'], File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'c++' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. WARNING: You are using pip version 20.2.4; however, version 22.0.3 is available. You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 18 (4 by maintainers)

Most upvoted comments

works for me! thanks for the great work @KapJI @leikoilja !

Installed component from master and it works again. I did some tests with the sruff I have set up with this component and looks normal.

My history with these are described here: https://github.com/home-assistant/core/issues/56669 https://github.com/grpc/grpc/issues/27512

I agree with what was said about about

  • yes this is about grpc tools and not grpcio and that difference matters for this wheel
  • agree it’s trying to compile from source and can’t find a compiler, as was said above rather than an musl vs libc link error. So yeah, because it can’t find a matching wheel for the specific version and architecture and python version combo.
  • don’t upgrade this dependency from what core is using if you don’t need to
  • remove the dep if you don’t need it at run time (are users machines really compiling protobufs or is this a development component?)
  • otherwise come up with a wheel building scheme for all the deps.

Home Assistant containers are:

  • OS: Alpine Linux 3.14
  • Python: Python 3.9.7

I can see the container has installed grpcio-tools==1.31.0. Probably wheels doesn’t work due to Alpine Linux using musl.

I don’t find manually installing gcc is a solution since these containers are shipped officially by Home Assistant and updates (and other actions) will recreate the container.

I’ve downgraded this component until there is a decision over this.

Trying to manually install grpcio-tools==1.43.0:

bash-5.1# pip3 install grpcio-tools==1.43.0
Collecting grpcio-tools==1.43.0
  Using cached grpcio-tools-1.43.0.tar.gz (2.2 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-erx9lsbe/grpcio-tools/setup.py'"'"'; __file__='"'"'/tmp/pip-install-erx9lsbe/grpcio-tools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-tv3325nl
         cwd: /tmp/pip-install-erx9lsbe/grpcio-tools/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-erx9lsbe/grpcio-tools/setup.py", line 180, in <module>
        if check_linker_need_libatomic():
      File "/tmp/pip-install-erx9lsbe/grpcio-tools/setup.py", line 91, in check_linker_need_libatomic
        cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++11', '-'],
      File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'c++'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Got the same error, thought I might be able to fix it by removing the integration and adding it again, but the I get: image