spoa: Unable to build shared library for v3.3.0 on Ubuntu 20.04 LTS with gcc v9.3.0
Thanks for putting out v3.3.0. There seems to be an issue with building a shared library.
Linking CXX shared library lib/libspoa.so
/usr/bin/ld: CMakeFiles/spoa_avx2.dir/src/simd_alignment_engine_dispatch.cpp.o: relocation R_X86_64_PC32 against symbol `_ZTVN
4spoa19SimdAlignmentEngineILNS_4ArchE0EEE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/spoa.dir/build.make:133: lib/libspoa.so.4.0.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:188: CMakeFiles/spoa.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
gcc v9.3.0 on Ubuntu 20.04 LTS.
I used the following cmake option while building.
-Dspoa_generate_dispatch=ON
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (26 by maintainers)
@mbrcic,
add_dependenciesworks fine, thanks. @bagashe, I have released a new version https://github.com/rvaser/spoa/releases/tag/3.4.0.@bagashe when you create dispatched version, try also
-Dspoa_use_simde_openmp=ON. It could improve performance in certain cases by several percentages.I’ll merge the PR as is, and sometime in the future I might remove the installation of
cpu_features.@bagashe , you found the mistake and pushed for the fix,so you can have the honor of putting the PR 😃
@mbrcic : That worked. Great!
Are you planning on putting up a PR soon? I’d like to start using the latest spoa code in our project. From what I have seen, using cpu dispatch gives us a 4-5X speed up in relevant parts of the Shasta assembler. So I’m looking forward to making this part of our next release.