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

Cannot statically link to libawfmindex_static.a #27

Closed EricR86 closed 8 months ago

EricR86 commented 9 months ago

The static library is missing definitions presumably from other submodules. For example here's the output when attempting to statically link on my simple example:

/usr/bin/ld: /usr/local/lib/libawfmindex_static.a(AwFmCreate.c.o): in function `awFmCreateIndex':
AwFmCreate.c:(.text+0x184): undefined reference to `divsufsort64'
/usr/bin/ld: /usr/local/lib/libawfmindex_static.a(AwFmCreate.c.o): in function `awFmCreateIndexFromFasta':
AwFmCreate.c:(.text+0x31a): undefined reference to `fastaVectorInit'
/usr/bin/ld: AwFmCreate.c:(.text+0x340): undefined reference to `fastaVectorReadFasta'
/usr/bin/ld: AwFmCreate.c:(.text+0x4a4): undefined reference to `divsufsort64'
/usr/bin/ld: AwFmCreate.c:(.text+0x5d2): undefined reference to `fastaVectorStringDealloc'

Let me know if you need any additional information

EricR86 commented 9 months ago

Notably the submodule divsufsort only produces a shared object so anything built with the static library cannot be used without installing the shared object elsewhere .

Sawwave commented 8 months ago

This has now been addressed in PR #31