0

I am trying to build the following project. https://github.com/alshai/r-index

The instructions seem easy but I still didn't succeed in building.

Step 1: git clone --recursive https://github.com/alshai/r-index . Runs and terminates without any visible error.

Step 2:

apt-get update -qq && \
apt-get install -y zlib1g-dev git cmake build-essential python3

Also works but needs a sudo still ok.

Step 3:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=<installation dir> ..
make
make install

In this step is where I face issues. Lets suppose we are currenty on /r-index. A folder name build is made and we navigate inside it (/r-index/build). What should I substitute the with. Is it just . or ..? Or none?

At this moment make fails. I suppose the cmake command should create the make in my current folder (build), cause otherwise I would have to do, cd .. and then make.

In file included from /home/frans/r-index/build/sdsl-lite/include/sdsl/int_vector.hpp:24:0,
                 from /home/frans/r-index/build/sdsl-lite/include/sdsl/bit_vectors.hpp:8,
                 from /home/frans/r-index/build/sdsl-lite/include/sdsl/wt_pc.hpp:25,
                 from /home/frans/r-index/build/sdsl-lite/include/sdsl/wavelet_trees.hpp:32,
                 from /home/frans/r-index/internal/huff_string.hpp:13,
                 from /home/frans/r-index/internal/rle_string.hpp:26,
                 from /home/frans/r-index/internal/r_index.hpp:15,
                 from /home/frans/r-index/ri-buildfasta.cpp:9:
/home/frans/r-index/build/sdsl-lite/include/sdsl/bits.hpp: In static member function ‘static uint32_t sdsl::bits::sel(uint64_t, uint32_t)’:
/home/frans/r-index/build/sdsl-lite/include/sdsl/bits.hpp:331:54: error: ‘_pdep_u64’ was not declared in this scope
     return __builtin_ctzll(_pdep_u64(1ull << (i-1), x));

The error is in sdsl/int_vector.hpp it seems. I can not continue in an obvious way from there. I tried to 'make' the sdsl-lite package with success, but still this didn't correct anything, as expected. Looks like a type is missing?

What part am I missing?

Paramar
  • 287
  • 1
  • 5
  • 22
  • 1
    It's an issue coming from SIMD intrinsics used in a submodule of `r-index`: `sdsl-lite`. For some reason `_pdep_u64` is not declared in `immintrin.h` even though `__BMI2__` is defined. You can try to update preprocessor check in this file `bits.hpp` to not rely on `_pdep_u64`. – SpacePotatoes May 11 '22 at 09:03
  • I think your answer is a bit above my level of understanding about cmake and make. Could you make like a separate answer that I can try out , so that then I can also accept your answer? I remember though something related in another repo I have build in the past https://stackoverflow.com/questions/67637112/emmintrin-h313-error-error-sse2-instruction-set-not-enabled-error-sse2?noredirect=1#comment119559019_67637112 – Paramar May 11 '22 at 09:26

0 Answers0