AvxWindowFmIndex icon indicating copy to clipboard operation
AvxWindowFmIndex copied to clipboard

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

Open EricR86 opened this issue 1 year ago • 1 comments

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 avatar Feb 20 '24 15:02 EricR86

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

EricR86 avatar Feb 20 '24 19:02 EricR86

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

Sawwave avatar Aug 09 '24 19:08 Sawwave