I'm using Devtoolset-7 on CentOS 7 and have built Boost 1.65.1 w/ it. But when I link my application, I've got the following:
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: /opt/rh/devtoolset-7/root/usr/lib64/libboost_unit_test_framework.a(compiler_log_formatter.o)(.text._ZN5boost9unit_test5utils11string_castINS0_13basic_cstringIKcEEEESsRKT_[_ZN5boost9unit_test5utils11string_castINS0_13basic_cstringIKcEEEESsRKT_]+0x3c): unresolvable R_X86_64_NONE relocation against symbol `_ZTVSt9basic_iosIcSt11char_traitsIcEE@@GLIBCXX_3.4'
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Searching more info about R_X86_64_NONE
doesn't give any valuable results: mostly similar questions w/o any answer or precise explanation what is this and how to solve it.
So my questions are:
- what is this error really means?
- what is
R_X86_64_NONE
and why "nothing to relocate" (according to bintils sources) type of symbol ever exists in ELF headers?
Addendum:
- The error happened on linking unit tests executable which is linked against my static library and Boosts' static libraries (unit tests framework)
- All static libraries (Boost and mine one) has built with
-fPIC
option
PS. I really want this question to be resolved once and forever (already hit it few times, but this time update to latest binutils doesn't help). (will start a bounty on any activity on this question)