If you try to compile neovim with unibilium then you will see that it is missing -fPIC compilation flag, even though it seems to be defined in ebuild. Note: this is about compiling neovim *test library* by hand, *not* using neovim ebuild and *not* compiling nvim executable. Reproducible: Always Steps to Reproduce: 1. Emerge unibilium. 2. Try to build neovim test library using git clone git://github.com/neovim/neovim cd neovim mkdir build cd build CC=clang CFLAGS=' -O0 -g ' cmake .. -DCMAKE_BUILD_TYPE=Debug make nvim-test Actual Results: Errors out with Linking C shared module ../../lib/libnvim-test.so /usr/bin/x86_64-pc-linux-gnu-ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../lib64/libunibilium.a(unibilium.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../lib64/libunibilium.a: error adding symbols: Bad value x86_64-pc-linux-gnu-clang-3.5.0: error: linker command failed with exit code 1 (use -v to see invocation) Expected Results: Builds fine.
To fix this issue ebuild must supply -fPIC in CFLAGS argument to emake (it does not matter whether -fPIC will (not) be in global variable). But ebuild must *not* supply -fPIE argument. --- /usr/portage/dev-libs/unibilium/unibilium-1.1.2.ebuild 2015-02-26 08:54:55.000000000 +0300 +++ portage-overlay/dev-libs/unibilium/unibilium-1.1.2.ebuild 2015-02-28 20:17:34.288389735 +0300 @@ -19,8 +19,8 @@ RDEPEND="" src_compile() { - append-flags -fPIC -fPIE - emake PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" all + append-flags -fPIC + emake PREFIX="${EPREFIX}/usr" LIBDIR="${EPREFIX}/usr/$(get_libdir)" CFLAGS="$CFLAGS" all } src_install() {
I think this is fixed in the tree now.