Closed EricR86 closed 1 month ago
It it worth noting that the shared object of libawfmindex.so
does end up linking to OpenMP:
$ ldd libawfmindex.so
linux-vdso.so.1 (0x00007fff16327000)
libfastavector.so => /home/ericr/work/umap-fmindex/AvxWindowFmIndex/lib/FastaVector/build/libfastavector.so (0x00007f8aa3a6a000)
libgomp.so.1 => /lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f8aa3a17000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8aa37ef000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8aa3a88000)
Hi Eric, can you please tell me what OS you are attempting to compile on? iOS's builtin "gcc" is actually an old version of clang, which doesn't support openmp, and it's been a bit of a thorn in our side for a while to work around.
also, just for sanity, if you are on iOS, did you install gcc with brew and give the path to the cmake?
cmake -DCMAKE_C_COMPILER=/path/to/gcc .
Using WSL (linux) currently.
FWIW I'm working around this by simply including -lgomp
in my builds though I assume one of the static libraries should linking to it through the cmake build.
Hi @EricR86 , I've added some changes that should fix your issues on WSL. I've tested it myself, but before I close this issue, I would appreciate it if you could check to make sure it's working for you.
After a fresh rebuild the GOMP
symbols are still undefined.
In retrospect I don't think this is a big deal, it just means that any binary using the static library has a runtime dependency on OpenMP which is not unreasonable and requires a -lgomp
flag.
This issue has been addressed a while ago but wasn't closed.
When building a simple example and attempting to statically link in the libraries using the instructions from the README, the following error occurs: