respeaker-feed icon indicating copy to clipboard operation
respeaker-feed copied to clipboard

Cannot compile PyAudio

Open whc2001 opened this issue 8 years ago • 5 comments

I tried to add the python-pyaudio folder to my openwrt source and compile it, then I received this error:

cp -fpR /home/vm/lede/build_dir/target-mips_24kc_musl/PyAudio-0.2.9/build/lib.linux2-2.7/* /home/vm/lede/build_dir/target-mips_24kc_musl/PyAudio-0.2.9/.pkgdir/python-pyaudio
cp: cannot stat '/home/vm/lede/build_dir/target-mips_24kc_musl/PyAudio-0.2.9/build/lib.linux2-2.7/*': No such file or directory
make[3]: *** [/home/vm/lede/build_dir/target-mips_24kc_musl/PyAudio-0.2.9/.pkgdir/python-pyaudio.installed] Error 1
make[3]: Leaving directory `/home/vm/lede/feeds/packages/sound/python-pyaudio'
make[2]: *** [package/feeds/packages/python-pyaudio/compile] Error 2
make[2]: Leaving directory `/home/vm/lede'
make[1]: *** [/home/vm/lede/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/vm/lede'
make: *** [world] Error 2

I checked /home/vm/lede/build_dir/target-mips_24kc_musl/PyAudio-0.2.9 and found that there isn't any folder named build. How to solve it? Thanks!

whc2001 avatar Apr 13 '18 03:04 whc2001

Maybe the name is changed on LEDE. You can go to /home/vm/lede/build_dir/target-mips_24kc_musl/PyAudio-0.2.9 and run find -name *.so to find where is the .so file, and alsa find where is pyaudio.py

xiongyihui avatar Apr 13 '18 07:04 xiongyihui

Thanks. I can't find any so file under /home/vm/lede/build_dir/target-mips_24kc_musl/PyAudio-0.2.9, but pyaudio.py is under src.

whc2001 avatar Apr 14 '18 01:04 whc2001

I tried to comment the last line in install function which caused the error:

define Package/python-pyaudio/install
	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
	$(CP) $(PKG_BUILD_DIR)/PKG-INFO $(1)$(PYTHON_PKG_DIR)/pyaudio.egg-info
#	$(CP) $(PKG_BUILD_DIR)/build/lib.linux2-2.7/* \
#	    $(1)$(PYTHON_PKG_DIR)
endef

After compiling, I checked the target-mips_24kc_musl/PyAudio-(PKG_VERSION) and only found one new dir named ipkg-mips_24kc. There seems nothing is about build, which is strange.

whc2001 avatar Apr 14 '18 03:04 whc2001

Are you able to compile the pyaudio package? Maybe it is built at somewhere else

xiongyihui avatar Apr 14 '18 09:04 xiongyihui

If I uncomment the last line in Makefile like above, it can compile, but obviously the generated ipk file is broken and after installation I still cannot import pyaudio.

whc2001 avatar Apr 15 '18 01:04 whc2001