nmslib / hnswlib

Header-only C++/python library for fast approximate nearest neighbors
https://github.com/nmslib/hnswlib
Apache License 2.0
4.32k stars 637 forks source link

hsslib build issue, cc1plus: error: bad value (‘tigerlake’) for ‘-march=’ switch #356

Open apiszcz opened 2 years ago

apiszcz commented 2 years ago

Built ok a few months ago, however now.. cc1plus: error: bad value (‘tigerlake’) for ‘-march=’ switch


  Building wheel for hnswlib (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmpqwkkn0eb build_wheel /tmp/tmpk0v45u9w
       cwd: /tmp/pip-install-_3iw86b9/hnswlib
  Complete output (15 lines):
  running bdist_wheel
  running build
  running build_ext
  creating tmp
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.8 -c /tmp/tmp38jua327.cpp -o tmp/tmp38jua327.o -std=c++14
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.8 -c /tmp/tmplg1rpo_3.cpp -o tmp/tmplg1rpo_3.o -fvisibility=hidden
  creating build
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/python_bindings
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-wrdisebs/overlay/lib/python3.8/site-packages/pybind11/include -I/tmp/pip-build-env-wrdisebs/overlay/lib/python3.8/site-packages/numpy/core/include -I./hnswlib/ -I/usr/include/python3.8 -c ./python_bindings/bindings.cpp -o build/temp.linux-x86_64-3.8/./python_bindings/bindings.o -O3 -march=native -fopenmp -DVERSION_INFO=\"0.5.2\" -std=c++14 -fvisibility=hidden
  cc1plus: error: bad value (‘tigerlake’) for ‘-march=’ switch
  cc1plus: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 native
  cc1plus: error: bad value (‘tigerlake’) for ‘-mtune=’ switch
  cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for hnswlib
yurymalkov commented 2 years ago

looks like a gcc issue https://stackoverflow.com/questions/64493692/cc1plus-error-bad-value-tigerlake-for-march-switch-compilation-error