Created attachment 577966 [details] build.log [...] /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.3.0/../../../../lib64/libglog.a(libglog_la-logging.o): in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)': (.text._ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x3c): call to `google::base::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)' lacks nop, can't restore toc; recompile with -fPIC (.text._ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x7c): call to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()' lacks nop, can't restore toc; recompile with -fPIC /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.3.0/../../../../powerpc64-unknown-linux-gnu/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: *** [src/CMakeFiles/rime.dir/build.make:2314: lib/librime.so.1.2.9] Error 1 make[2]: Leaving directory '/var/tmp/portage/app-i18n/librime-1.2.9/work/librime-1.2.9_build' make[1]: *** [CMakeFiles/Makefile2:118: src/CMakeFiles/rime.dir/all] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-i18n/librime-1.2.9/work/librime-1.2.9_build' make: *** [Makefile:141: all] Error 2 * ERROR: app-i18n/librime-1.2.9::gentoo failed (compile phase): * emake failed
Created attachment 577968 [details] emerge --info
Turns out the build only fails with USE='static-libs'.
app-i18n/librime ebuilds pass -DBUILD_STATIC=$(usex static-libs) to cmake. The purpose of "static-libs" USE flag is to control building of static libraries in package which has this USE flag. Build system of librime seems to use BUILD_STATIC option for a different purpose: for using static libraries of other packages. In rare cases (not here) where it makes sense, using static libraries of other packages should be controlled by "static" USE flag, not "static-libs" USE flag. Content of src/CMakeLists.txt suggests that building of librime.a static library is probably possible by passing -DBUILD_SHARED_LIBS=OFF to cmake. But it would be necessary to perform configuration/building/installation actions twice, with -DBUILD_SHARED_LIBS=OFF and with -DBUILD_SHARED_LIBS=ON, which is probably overcomplication. Probably nobody actually needs librime.a static library, and "static-libs" USE flag could be dropped.
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #3) > The purpose of "static-libs" USE flag is to control building of static > libraries in package which has this USE flag. > Build system of librime seems to use BUILD_STATIC option for a different > purpose: for using static libraries of other packages. > > Probably nobody actually needs librime.a static library, and "static-libs" > USE flag could be dropped. I agree. A reasonable argument to drop the flag if it does something different than expected (besides not working).
Build failure for me occurs even earlier, in src_configure() phase.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=916bbc9b47aed145c0d0edfcbe1d82e50e02ff74 commit 916bbc9b47aed145c0d0edfcbe1d82e50e02ff74 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2019-06-28 17:13:00 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2019-06-28 18:09:23 +0000 app-i18n/librime: Delete broken "static-libs" USE flag. Fixes: https://bugs.gentoo.org/686924 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Mike Gilbert <floppym@gentoo.org> app-i18n/librime/librime-1.2.9.ebuild | 5 ++--- app-i18n/librime/librime-1.3.1.ebuild | 5 ++--- app-i18n/librime/librime-1.4.0.ebuild | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-)