miracle2k / onkyo-eiscp

Control Onkyo A/V receivers over the network; usuable as a script, or as a Python library.
MIT License
472 stars 110 forks source link

Make netifaces optional, since it can be hard to install? #41

Open mcwieger opened 8 years ago

mcwieger commented 8 years ago

When trying to install onkyo using pip, I run into this error:

`Requirement already satisfied (use --upgrade to upgrade): onkyo-eiscp in /usr/lib/python2.7/site-packages/onkyo_eiscp-1.0-py2.7.egg Requirement already satisfied (use --upgrade to upgrade): docopt>=0.4.1 in /usr/local/lib/python2.7/site-packages/docopt-0.6.2-py2.7.egg (from onkyo-eiscp) Collecting netifaces (from onkyo-eiscp) Using cached netifaces-0.10.5.tar.gz Building wheels for collected packages: netifaces Running setup.py bdist_wheel for netifaces ... error Complete output from command /bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-AqwnDa/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmpyPufjJpip-wheel- --python-tag cp27: running bdist_wheel running build running build_ext checking for getifaddrs...not found. checking for getnameinfo...not found. checking for socket IOCTLs...not found. checking for optional header files...none found. checking whether struct sockaddr has a length field...no. checking which sockaddr_xxx structs are defined...none! checking for routing socket support...no. checking for sysctl(CTL_NET...) support...no. checking for netlink support...no. building 'netifaces' extension /usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc -fno-strict-aliasing -mhard-float -mfpu=vfpv3-d16 -DSYNO_MARVELL_ARMADAXP -DSYNOPLAT_F_ARMV7 -O2 -mhard-float -mfpu=vfpv3 -march=armv7-a -mcpu=marvell-pj4 -mtune=marvell-pj4 -fno-diagnostics-show-caret -Wno-unused-local-typedefs -DBUILD_ARCH=32 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSYNO_PLATFORM=MARVELL_ARMADAXP -DSYNO_RUNNING_DSM_BUILD_SYSTEM -g -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -DOPENSSL_NO_SSL3 -I/usr/local/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/lib/libffi-3.2.1/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNETIFACES_VERSION=0.10.5 -I/usr/include/python2.7 -c netifaces.c -o build/temp.linux-armv7l-2.7/netifaces.o unable to execute '/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc': No such file or directory error: command '/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1


Failed building wheel for netifaces Running setup.py clean for netifaces Failed to build netifaces Installing collected packages: netifaces Running setup.py install for netifaces ... error Complete output from command /bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-AqwnDa/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-VNW9Cp-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_ext checking for getifaddrs...not found. checking for getnameinfo...not found. checking for socket IOCTLs...not found. checking for optional header files...none found. checking whether struct sockaddr has a length field...no. checking which sockaddr_xxx structs are defined...none! checking for routing socket support...no. checking for sysctl(CTL_NET...) support...no. checking for netlink support...no. building 'netifaces' extension /usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc -fno-strict-aliasing -mhard-float -mfpu=vfpv3-d16 -DSYNO_MARVELL_ARMADAXP -DSYNOPLAT_F_ARMV7 -O2 -mhard-float -mfpu=vfpv3 -march=armv7-a -mcpu=marvell-pj4 -mtune=marvell-pj4 -fno-diagnostics-show-caret -Wno-unused-local-typedefs -DBUILD_ARCH=32 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DSYNO_PLATFORM=MARVELL_ARMADAXP -DSYNO_RUNNING_DSM_BUILD_SYSTEM -g -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -DOPENSSL_NO_SSL3 -I/usr/local/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/lib/libffi-3.2.1/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNETIFACES_VERSION=0.10.5 -I/usr/include/python2.7 -c netifaces.c -o build/temp.linux-armv7l-2.7/netifaces.o unable to execute '/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc': No such file or directory error: command '/usr/local/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1

----------------------------------------

Command "/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-AqwnDa/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-VNW9Cp-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-AqwnDa/netifaces/ `

It appears netifaces can't be installed. Is there any experience with this issue?

miracle2k commented 8 years ago

You can try to report this to https://bitbucket.org/al45tair/netifaces/issues?status=new&status=open and see if they can help.

Possibly you are just lacking an installed version of "gcc". Use ipkg or whatever package manager people use these days on Synology to install gcc.

Still, it might be worth considering if we can implement a fallback, so the lib will work without netifaces. It is currently only used during the discovery process.

Carl-Horst commented 7 years ago

I am having the same issue on my qnap. Updating / installing gcc did not succeed.

miracle2k commented 7 years ago

As a temporary solution, you could try to use an old version before netifaces was added.

Carl-Horst commented 7 years ago

Finally worked with manually installing Netifaces 0.10.4 (instead of the included 0.10.5) beforehand.