ITADN

Shared library linking fails

#362Openjlheflin 创建于 2024-12-27
J
jlheflincommented
``` [ 80%] Linking CXX shared library libpluginplay.so /usr/bin/ld: _deps/utilities-build/libutilities.a(demangler.cpp.o): warning: relocation against `_ZTINSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0ELb0EEE' in read-only section `.text._ZNSt17_Function_handlerIFbcENSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0ELb0EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation[_ZNSt17_Function_handlerIFbcENSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0ELb0EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation]' /usr/bin/ld: _deps/utilities-build/libutilities.a(demangler.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNSt5ctypeIcE2idE@@GLIBCXX_3.4' 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/pluginplay.dir/build.make:427: libpluginplay.so.1.0.41] Error 1 make[1]: *** [CMakeFiles/Makefile2:294: CMakeFiles/pluginplay.dir/all] Error 2 make: *** [Makefile:156: all] Error 2 ``` I get this error when building with `cmake -S . -B build -DNWX_MODULE_DIRECTORY=/home/jacob/Projects/PluginPlay/install` when building with shared libraries. If the option is set to off, then the build is able to complete.
4 条评论