Failed upgrade from 0.75.3 to 0.77.2 (HassOS 1.10)

I’m having trouble upgrading 0.75.3 to 0.77.2 on HassOS 1.10. Check Home Assistant configuration is showing a compile error. Note that I’m getting the same error for 0.76.2.

Log
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.6
  creating build/lib.linux-armv7l-3.6/cffi
  copying cffi/lock.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/verifier.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/__init__.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/api.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/commontypes.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/recompiler.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/error.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/model.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/cparser.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/_embedding.h -> build/lib.linux-armv7l-3.6/cffi
  copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.6/cffi
  running build_ext
  building '_cffi_backend' extension
  creating build/temp.linux-armv7l-3.6
  creating build/temp.linux-armv7l-3.6/c
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -I/usr/local/include/python3.6m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.6/c/_cffi_backend.o
  In file included from c/_cffi_backend.c:2:0:
  /usr/local/include/python3.6m/Python.h:11:20: fatal error: limits.h: No such file or directory
   #include <limits.h>
                      ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  
  ----------------------------------------
  Running setup.py clean for cffi
  Running setup.py bdist_wheel for multidict: started
  Running setup.py bdist_wheel for multidict: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/97/06/92/091e8e6546ccaa08c78527058a6662e8bf5e0db9aeff0392bb
  Running setup.py bdist_wheel for yarl: started
  Running setup.py bdist_wheel for yarl: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/fd/1c/e7/9df9bfc03a2f55c2201b52db3545b1314eb807148563a6521b
  Running setup.py bdist_wheel for idna-ssl: started
  Running setup.py bdist_wheel for idna-ssl: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/d3/00/b3/32d613e19e08a739751dd6bf998cfed277728f8b2127ad4eb7
  Running setup.py bdist_wheel for pycparser: started
  Running setup.py bdist_wheel for pycparser: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/c0/a1/27/5ba234bd77ea5a290cbf6d675259ec52293193467a12ef1f46
Successfully built pyyaml MarkupSafe multidict yarl idna-ssl pycparser
Failed to build cryptography bcrypt aiohttp cffi
Installing collected packages: chardet, idna, certifi, urllib3, requests, pytz, astral, PyJWT, voluptuous, MarkupSafe, jinja2, async-timeout, asn1crypto, six, pycparser, cffi, cryptography, bcrypt, pyyaml, attrs, multidict, yarl, idna-ssl, aiohttp, homeassistant
  Running setup.py install for cffi: started
    Running setup.py install for cffi: finished with status 'error'
    Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-t76vnwk3/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-8x6swfhn/install-record.txt --single-version-externally-managed --compile:
    /usr/lib/gcc/armv6-alpine-linux-musleabihf/6.4.0/../../../../armv6-alpine-linux-musleabihf/bin/ld: cannot find Scrt1.o: No such file or directory
    /usr/lib/gcc/armv6-alpine-linux-musleabihf/6.4.0/../../../../armv6-alpine-linux-musleabihf/bin/ld: cannot find crti.o: No such file or directory
    /usr/lib/gcc/armv6-alpine-linux-musleabihf/6.4.0/../../../../armv6-alpine-linux-musleabihf/bin/ld: cannot find -lssp_nonshared
    collect2: error: ld returned 1 exit status
    Note: will not use '__sync_synchronize()' in the C code
    ***** The above error message can be safely ignored.
    
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.6
    creating build/lib.linux-armv7l-3.6/cffi
    copying cffi/lock.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/verifier.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/__init__.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/api.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/commontypes.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/recompiler.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/error.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/model.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/cparser.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/_embedding.h -> build/lib.linux-armv7l-3.6/cffi
    copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.6/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.linux-armv7l-3.6
    creating build/temp.linux-armv7l-3.6/c
    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -I/usr/local/include/python3.6m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.6/c/_cffi_backend.o
    In file included from c/_cffi_backend.c:2:0:
    /usr/local/include/python3.6m/Python.h:11:20: fatal error: limits.h: No such file or directory
     #include <limits.h>
                        ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------

I gave up and just did a fresh install then restored my configuration from a snapshot.

I’m too lazy to confirm where the problem was, but I suspect it was my config. I found this in the 0.76 release notes:

  • HTTP: Make sure use_x_forward_for and trusted_proxies must be configured together (@awarecan - #15804) (http docs) (breaking change)

The fresh install had 0.77.2 working correctly until i restored my snapshot. I had use_x_forward_for set to False. Removing it let 0.77.2 start up with my restored config.

I don’t know why Check Home Assistant configuration was giving me compilation errors, but it was probably a red herring.