Good day,
So I’m trying to install pyaudio the old fashioned way. I compiled and installed portaudio without much difficulty, but sudo pip3 install pyaudio ends with:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries -fPIC -fPIC -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT -ftree-loop-distribute-patterns -Wl,-z -Wl,now -Wl,-z -Wl,relro -fno-semantic-interposition -ffat-lto-objects -fno-trapping-math -Wl,-sort-common -Wl,--enable-new-dtags -mtune=skylake -Wa,-mbranches-within-32B-boundaries -fPIC -fPIC -fPIC -I/usr/include/python3.8 -c -march=skylake-avx512 -O3 -fno-semantic-interposition -ffat-lto-objects -flto=4 -mprefer-vector-width=512 src/_portaudiomodule.c -o build/temp.linux-x86_64-3.8/src/_portaudiomodule.o.avx512
<stdin>:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
/usr/bin/ld: cannot find -lportaudio-avx2
collect2: error: ld returned 1 exit status
<stdin>:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
/usr/bin/ld: cannot find -lportaudio-avx512
collect2: error: ld returned 1 exit status
gcc -pthread -shared -Wa,-mbranches-within-32B-boundaries -Wl,--build-id=sha1 -Wl,--build-id=sha1 build/temp.linux-x86_64-3.8/src/_portaudiomodule.o -lportaudio -o build/lib.linux-x86_64-3.8/_portaudio.cpython-38-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lportaudio
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3fako3k6/pyaudio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3fako3k6/pyaudio/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-l4e9upg9/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/pyaudio Check the logs for full command output.
I notice that it’s building something with --march=skylake-avx2 (and this machine is no Xeon). I’ve unset CFLAGS and tried setting lesser CFLAGS but it seems to end up here. I was just hoping to build a non-avx2 version of this (or figure out the incantation to build a avx2 version of portaudio to get this up and running).