kakao / n2

TOROS N2 - lightweight approximate Nearest Neighbor library which runs fast even with large datasets
Apache License 2.0
569 stars 70 forks source link

missing xmmintrin.h on ARM devices. #43

Open gahoo opened 3 years ago

gahoo commented 3 years ago

I'm trying to install n2 on Jetson AGX Xavier which is ARM based with pip install n2. But it seems xmmintrin.h is not avialable on arm. Are there any solutions for this? Is sse2neon one of the solution? Here's the error message.

Failed to build n2
Installing collected packages: n2
  Running setup.py install for n2 ... error
    Complete output from command /opt/venv/reticulate/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0hzakljx/n2/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-yghai153-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/venv/reticulate/include/site/python3.6/n2:
    running install
    running build
    running build_ext
    skipping './bindings/python/n2.cpp' Cython extension (up-to-date)
    building 'n2' extension
    creating build
    creating build/temp.linux-aarch64-3.6
    creating build/temp.linux-aarch64-3.6/src
    creating build/temp.linux-aarch64-3.6/bindings
    creating build/temp.linux-aarch64-3.6/bindings/python
    aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./include/ -I./third_party/spdlog/include/ -I./third_party/eigen -Ithird_party/boost/assert/include/ -Ithird_party/boost/bind/include/ -Ithird_party/boost/concept_check/include/ -Ithird_party/boost/config/include/ -Ithird_party/boost/core/include/ -Ithird_party/boost/detail/include/ -Ithird_party/boost/heap/include/ -Ithird_party/boost/iterator/include/ -Ithird_party/boost/mp11/include/ -Ithird_party/boost/mpl/include/ -Ithird_party/boost/parameter/include/ -Ithird_party/boost/preprocessor/include/ -Ithird_party/boost/static_assert/include/ -Ithird_party/boost/throw_exception/include/ -Ithird_party/boost/type_traits/include/ -Ithird_party/boost/utility/include/ -I/opt/venv/reticulate/include -I/usr/include/python3.6m -c ./src/heuristic.cc -o build/temp.linux-aarch64-3.6/./src/heuristic.o -std=c++14 -O3 -fPIC -march=native -DNDEBUG -DBOOST_DISABLE_ASSERTS -fopenmp
    ./src/heuristic.cc:17:10: fatal error: xmmintrin.h: No such file or directory
     #include <xmmintrin.h>
              ^~~~~~~~~~~~~
    compilation terminated.
    error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
evanbiederstedt commented 2 years ago

+1

This would be very useful functionality. I tried a few options here, but no luck: https://stackoverflow.com/questions/11228855/header-files-for-x86-simd-intrinsics

I believe this is what we need: https://github.com/oddconcepts/n2o/commit/fe6214dcc06a1b13be60733c53ac25bca3c2b4d0