Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

The build process fails with “relocation R_X86_64_32 against `a local symbol can not be used when making a shared object; recompile with -fPIC”. Whats wrong?

0
Posted

The build process fails with “relocation R_X86_64_32 against `a local symbol can not be used when making a shared object; recompile with -fPIC”. Whats wrong?

0

Many plugins have to be linked against libraries. A few of them (currently iptables, netlink and nut are known to be affected) link against libraries that are only available as “static libraries” in many distributions. Most distributions (e. g. Debian and SuSE GNU/Linux) do not compile static libraries with the “-fPIC” option. Thus they cannot be linked with shared objects compiled with “-fPIC”. Some architectures (among them i386) do not seem to care about that and handle it in some (probably magic) way. However, other architectures (mostly 64bit like amd64 or hppa) cannot handle that and thus the compiler aborts with the error message mentioned above. To fix this issue, you need a version of the static library compiled with “-fPIC” (or a shared library). Ask your distributor to provide a suitable version of the library or compile it yourself. For more detailed information please refer to: • the gentoo documentation, • Debian Bug #358637 • Debian Bug #419684 • Debian Bug #430933 • Sol

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123