NorthernMan54 / homebridge-cmd-television

20 stars 1 forks source link

Unable to install pyatv on Synology #16

Closed cristian5th closed 2 years ago

cristian5th commented 2 years ago

Hello.

I know that you are not responsible of pyatv but you are the only one that I found that have make it work in a Synology NAS and I have already made my question into all the other repositories.

I have a DS418 without Docker capabilities. Homebridge is installed natively on DSM 7.0.1 and Entware is providing the gcc building tools as per Oznu's instructions. But when I try to install the pyatv package, I get the error log that you can see below. It seems that the builder cannot be executed.

Do you have any ideas or suggestions about what can I try?

Error log

Building wheels for collected packages: miniaudio
  Building wheel for miniaudio (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-3.8
      copying miniaudio.py -> build/lib.linux-aarch64-3.8
      running build_ext
      generating cffi module 'build/temp.linux-aarch64-3.8/_miniaudio.c'
      creating build/temp.linux-aarch64-3.8
      building '_miniaudio' extension
      creating build/temp.linux-aarch64-3.8/build
      creating build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8
      /usr/local/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-wrap-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -DSYNOPLAT_F_ARMV8 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSYNO_RUNNING_DSM_BUILD_SYSTEM -g -pipe -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -DMA_NO_GENERATION=1 -DMA_NO_ENCODING=1 -I/tmp/pip-install-a38odory/miniaudio_f4e6959e99c84a52a5ac33fba9cd1869 -I/tmp/pip-install-a38odory/miniaudio_f4e6959e99c84a52a5ac33fba9cd1869 -I/usr/include/python3.8 -c build/temp.linux-aarch64-3.8/_miniaudio.c -o build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8/_miniaudio.o -g1 -O3 -ffast-math
      unable to execute '/usr/local/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-wrap-gcc': No such file or directory
      error: command '/usr/local/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-wrap-gcc' failed with exit status 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for miniaudio
  Running setup.py clean for miniaudio
Failed to build miniaudio
Installing collected packages: miniaudio, cryptography, aiohttp, pyatv
  Running setup.py install for miniaudio ... error
  error: subprocess-exited-with-error

  × Running setup.py install for miniaudio did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      running install
      /usr/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-3.8
      copying miniaudio.py -> build/lib.linux-aarch64-3.8
      running build_ext
      generating cffi module 'build/temp.linux-aarch64-3.8/_miniaudio.c'
      creating build/temp.linux-aarch64-3.8
      building '_miniaudio' extension
      creating build/temp.linux-aarch64-3.8/build
      creating build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8
      /usr/local/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-wrap-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -DSYNOPLAT_F_ARMV8 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSYNO_RUNNING_DSM_BUILD_SYSTEM -g -pipe -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -DMA_NO_GENERATION=1 -DMA_NO_ENCODING=1 -I/tmp/pip-install-a38odory/miniaudio_f4e6959e99c84a52a5ac33fba9cd1869 -I/tmp/pip-install-a38odory/miniaudio_f4e6959e99c84a52a5ac33fba9cd1869 -I/usr/include/python3.8 -c build/temp.linux-aarch64-3.8/_miniaudio.c -o build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8/_miniaudio.o -g1 -O3 -ffast-math
      unable to execute '/usr/local/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-wrap-gcc': No such file or directory
      error: command '/usr/local/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-wrap-gcc' failed with exit status 1
      [end of output]

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

× Encountered error while trying to install package.
╰─> miniaudio

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
NorthernMan54 commented 2 years ago

Unfortunately this out of my area of expertise, hopefully another user can chime in and provide some guidance.

cristian5th commented 2 years ago

Oznu solved it for me. These two lines need to be executed before installing pyatv:

opkg update
opkg install python3 python3-pip python3-cffi python3-dev

Regretfully, atvremote is not working due to what seems to be a missing dependency ModuleNotFoundError: No module named 'bitarray._bitarray', but I have confirmed that bitarray is correctly installed.

I'm stuck now.

cristian5th commented 2 years ago

Now Postlund solved the bitarray issue. A downgrade did the trick.

pip install --upgrade bitarray==2.3.7

All is working now.