When installing the netifaces
package with pip
, I get the following error while building its wheel (Ubuntu 22, Python 3.10):
building 'netifaces' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64-v3 -fPIC -fPIC -DNETIFACES_VERSION=0.11.0 -I/path/to/venv/include -I/install/include/python3.10 -c netifaces.c -o build/temp.linux-x86_64-cpython-310/netifaces.o
error: unknown target CPU 'x86-64-v3'
note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cannonlake, icelake-client, icelake-server, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, x86-64
error: command '/usr/bin/clang' failed with exit code 1
I see that -march=x86-64-v3
is on the clang
command line, and that the list of supported architectures includes x86-64
but not x86-64-v3
.
How can I either a) set -march=x86-64
during the pip
install, or b) add x86-64-v3
to the supported architecture list?
I am a little confused because I installed clang
with apt-get install clang
so my assumption is that it would come with support for the current architecture.
1