Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686924 - app-i18n/librime[static-libs] fails to build
Summary: app-i18n/librime[static-libs] fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-28 23:41 UTC by ernsteiswuerfel
Modified: 2019-06-28 18:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (librime-1.2.9:20190528-214619.log,63.68 KB, text/plain)
2019-05-28 23:41 UTC, ernsteiswuerfel
Details
emerge --info (file_686924.txt,6.07 KB, text/plain)
2019-05-28 23:41 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2019-05-28 23:41:18 UTC
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
Comment 1 ernsteiswuerfel archtester 2019-05-28 23:41:49 UTC
Created attachment 577968 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2019-05-28 23:45:56 UTC
Turns out the build only fails with USE='static-libs'.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2019-05-29 03:10:34 UTC
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.
Comment 4 ernsteiswuerfel archtester 2019-05-29 15:27:05 UTC
(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).
Comment 5 Arfrever Frehtes Taifersar Arahesis 2019-06-28 17:11:04 UTC
Build failure for me occurs even earlier, in src_configure() phase.
Comment 6 Larry the Git Cow gentoo-dev 2019-06-28 18:10:28 UTC
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(-)