Description of problem: Trying to link boost program options static library to a shared library, I get the following error: /usr/bin/ld: /usr/lib64/libboost_program_options.a(value_semantic.o): warning: relocation against `_ZTIN5boost10wrapexceptINS_15program_options18invalid_bool_valueEEE' in read-only section `.text._ZNK5boost10wrapexceptINS_15program_options18invalid_bool_valueEE7rethrowEv[_ZNK5boost10wrapexceptINS_15program_options18invalid_bool_valueEE7rethrowEv]' /usr/bin/ld: /usr/lib64/libboost_program_options.a(options_description.o): relocation R_X86_64_PC32 against symbol `_ZTVNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE@@GLIBCXX_3.4.21' can not be used when making a shared object; recompile with -fPIC Version-Release number of selected component (if applicable): boost-static-1.78.0-9.fc37.x86_64 How reproducible: 100%
I don't think Boost's build system actually supports this: https://github.com/boostorg/build/issues/366 It might need to be done by patching the build in Fedora to force it to always use -fPIC.
Then again, maybe it just needs something like: ./b2 cxxflags=-fPIC cflags=-fPIC https://lists.boost.org/boost-build/2016/08/28769.php