TravisWheelerLab / AvxWindowFmIndex

A fast, AVX2 and ARM Neon accelerated FM index library
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

Submodule divsufsort is not compiled with position independent code (-fPIC), cannot be used as a static library to generate a shared object #34

Closed EricR86 closed 2 months ago

EricR86 commented 8 months ago

When building the static libraries using:

cmake -DBUILD_SHARED_LIBS=OFF .
make

Trying to link them into my project produces the following error:

/home/ericr/mambaforge/compiler_compat/ld: /tmp/build-via-sdist-ym7t0ssw/umap-0.1.0/AvxWindowFmIndex/build/libdivsufsort64.a(divsufsort.o): warning: relocation against `.gomp_critical_user_sssort_lock' in read-only section `.te
xt'
/home/ericr/mambaforge/compiler_compat/ld: /tmp/build-via-sdist-ym7t0ssw/umap-0.1.0/AvxWindowFmIndex/build/libdivsufsort64.a(divsufsort.o): relocation R_X86_64_PC32 against symbol `.gomp_critical_user_sssort_lock' can not be us
ed when making a shared object; recompile with -fPIC
EricR86 commented 8 months ago

Worked around currently by using cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON .

Sawwave commented 2 months ago

This issue was addressed a while ago, but wasn't closed.