I recently built Monero from master on Manjaro, and there were no issues. I then built the same commit on an Ubuntu computer and received an error about fPIC
.
Like ... .rodata' can not be used when making a shared object; recompile with -fPIC
Note that the Ubuntu dependencies had previously been installed via apt
package manager. Similarly, the Manjaro dependencies had been installed via pacman
package manager. Also, Ubuntu (Lubuntu) is actually 16.04.3 LTS, and Manjaro is 17.1.5.
Also note: I successfully built by editing CMakeLists.txt
and commenting out set(PIC_FLAG "-fPIC")
and add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS)
(not 100% sure the second one was needed). I'd rather just recompile with fPIC
, but I don't quite understand what that entails.
Side question: what is it about Manjaro that prevented this fPIC
issue?
Real question: how do I go about fixing my dependencies to deal with fPIC
?