Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 912776

Summary: app-i18n/mozc-2.28.5029.102: error: undefined reference to symbol '_ZNK4absl12lts_2023080211string_view4findES1_m
Product: Gentoo Linux Reporter: yongxiang <tanekliang>
Component: Current packagesAssignee: Arfrever Frehtes Taifersar Arahesis <arfrever.fta>
Status: RESOLVED FIXED    
Severity: normal CC: ao, carlphilippreh, cjk, julien.papasian, ncaq, sam, sarnex, zohran.londais
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=913243
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 912819    
Attachments: build.log
emerge --info
build-after-patch.log
mozc_user_patch.patch

Description yongxiang 2023-08-21 19:57:16 UTC
[90/534] /usr/bin/x86_64-pc-linux-gnu-g++ -MMD -MF obj/base/base_core.logging.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV '-DMOZC_SERVER_DIR="/usr/libexec/mozc"' '-DMOZC_DOCUMENT_DIR="/usr/libexec/mozc/documents"' -DNDEBUG -DQT_NO_DEBUG -DMOZC_NO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/tmp/portage/app-i18n/mozc-2.28.5029.102/work/mozc-2.28.5029.102/src -Igen -fmessage-length=0 -fno-strict-aliasing -funsigned-char -pipe -pthread -fno-omit-frame-pointer -fstack-protector --param=ssp-buffer-size=4 -Wall -Wno-char-subscripts -Wno-sign-compare -Wno-deprecated-declarations -Wwrite-strings -Wno-unknown-warning-option -Wno-inconsistent-missing-override -fPIC -fno-exceptions -Wtype-limits -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -Wno-deprecated -Wno-covered-switch-default -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=c++17  -c ../../base/logging.cc -o obj/base/base_core.logging.o
[91/534] /usr/bin/x86_64-pc-linux-gnu-g++ -MMD -MF obj/base/base_core.init_mozc.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV '-DMOZC_SERVER_DIR="/usr/libexec/mozc"' '-DMOZC_DOCUMENT_DIR="/usr/libexec/mozc/documents"' -DNDEBUG -DQT_NO_DEBUG -DMOZC_NO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/tmp/portage/app-i18n/mozc-2.28.5029.102/work/mozc-2.28.5029.102/src -Igen -fmessage-length=0 -fno-strict-aliasing -funsigned-char -pipe -pthread -fno-omit-frame-pointer -fstack-protector --param=ssp-buffer-size=4 -Wall -Wno-char-subscripts -Wno-sign-compare -Wno-deprecated-declarations -Wwrite-strings -Wno-unknown-warning-option -Wno-inconsistent-missing-override -fPIC -fno-exceptions -Wtype-limits -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -Wno-deprecated -Wno-covered-switch-default -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=c++17  -c ../../base/init_mozc.cc -o obj/base/base_core.init_mozc.o
FAILED: obj/base/base_core.init_mozc.o
/usr/bin/x86_64-pc-linux-gnu-g++ -MMD -MF obj/base/base_core.init_mozc.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV '-DMOZC_SERVER_DIR="/usr/libexec/mozc"' '-DMOZC_DOCUMENT_DIR="/usr/libexec/mozc/documents"' -DNDEBUG -DQT_NO_DEBUG -DMOZC_NO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/tmp/portage/app-i18n/mozc-2.28.5029.102/work/mozc-2.28.5029.102/src -Igen -fmessage-length=0 -fno-strict-aliasing -funsigned-char -pipe -pthread -fno-omit-frame-pointer -fstack-protector --param=ssp-buffer-size=4 -Wall -Wno-char-subscripts -Wno-sign-compare -Wno-deprecated-declarations -Wwrite-strings -Wno-unknown-warning-option -Wno-inconsistent-missing-override -fPIC -fno-exceptions -Wtype-limits -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -Wno-deprecated -Wno-covered-switch-default -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=c++17  -c ../../base/init_mozc.cc -o obj/base/base_core.init_mozc.o
../../base/init_mozc.cc: In function ‘void mozc::{anonymous}::ParseCommandLineFlags(int, char**)’:
../../base/init_mozc.cc:90:29: error: ‘absl::lts_20230802::flags_internal::ArgvListAction’ has not been declared
   90 |       absl::flags_internal::ArgvListAction::kRemoveParsedArgs,
      |                             ^~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-c++11-narrowing’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-unnamed-type-template-args’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-covered-switch-default’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-inconsistent-missing-override’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics

Reproducible: Always
Comment 1 yongxiang 2023-08-21 19:57:33 UTC
Created attachment 868387 [details]
build.log
Comment 2 yongxiang 2023-08-21 19:57:52 UTC
Created attachment 868389 [details]
emerge --info
Comment 3 Larry the Git Cow gentoo-dev 2023-08-21 20:15:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ef7e506b561a041e9ae1a66cb0a0a4ba6e009cd

commit 7ef7e506b561a041e9ae1a66cb0a0a4ba6e009cd
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-21 20:14:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-21 20:15:02 +0000

    app-i18n/mozc: fix build w/ new abseil
    
    Closes: https://bugs.gentoo.org/912776
    Signed-off-by: Sam James <sam@gentoo.org>

 app-i18n/mozc/files/mozc-2.28.5029.102-abseil.patch | 15 +++++++++++++++
 app-i18n/mozc/mozc-2.28.5029.102.ebuild             |  1 +
 2 files changed, 16 insertions(+)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-21 20:15:48 UTC
Please test the fix I've just pushed - it may need a tweak to the version macro.
Comment 5 yongxiang 2023-08-21 21:19:11 UTC
Created attachment 868433 [details]
build-after-patch.log
Comment 6 yongxiang 2023-08-21 21:20:25 UTC
current error:
[394/534] /usr/bin/x86_64-pc-linux-gnu-g++ -pthread -o gen_single_kanji_noun_prefix_data_main -Wl,--start-group obj.host/rewriter/gen_single_kanji_noun_prefix_data_main.gen_single_kanji_noun_
prefix_data.o obj.host/base/libbase.a obj.host/data_manager/libserialized_dictionary.a obj.host/base/libbase_core.a obj.host/base/libclock.a obj.host/base/libsingleton.a obj.host/base/libhash
.a obj.host/base/libnumber_util.a obj.host/base/libjapanese_util.a obj.host/base/libserialized_string_array.a -Wl,--end-group  -labsl_base -labsl_city -labsl_hash -labsl_malloc_internal -labs
l_raw_hash_set -labsl_raw_logging_internal -labsl_spinlock_wait -labsl_status -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_debugging_internal -labsl_synchronization -la
bsl_time -labsl_civil_time -labsl_synchronization -labsl_time -labsl_time_zone -labsl_flags -labsl_flags_internal -labsl_synchronization -labsl_flags_reflection -labsl_flags_marshalling -labs
l_str_format_internal -labsl_strings -labsl_strings_internal -labsl_flags_internal -labsl_status -labsl_flags_commandlineflag_internal -labsl_flags_usage -labsl_flags_usage_internal -labsl_fl
ags_internal -labsl_flags -labsl_flags_private_handle_accessor -labsl_flags_program_name -labsl_flags_parse -labsl_random_distributions -labsl_random_internal_pool_urbg -labsl_random_internal
_randen -labsl_random_internal_randen_hwaes -labsl_random_internal_randen_hwaes_impl -labsl_random_internal_randen_slow -labsl_random_internal_seed_material -labsl_random_seed_gen_exception -
labsl_random_seed_sequences -labsl_status -labsl_statusor -labsl_synchronization -labsl_flags -labsl_graphcycles_internal
FAILED: gen_single_kanji_noun_prefix_data_main
/usr/bin/x86_64-pc-linux-gnu-g++ -pthread -o gen_single_kanji_noun_prefix_data_main -Wl,--start-group obj.host/rewriter/gen_single_kanji_noun_prefix_data_main.gen_single_kanji_noun_prefix_dat
a.o obj.host/base/libbase.a obj.host/data_manager/libserialized_dictionary.a obj.host/base/libbase_core.a obj.host/base/libclock.a obj.host/base/libsingleton.a obj.host/base/libhash.a obj.hos
t/base/libnumber_util.a obj.host/base/libjapanese_util.a obj.host/base/libserialized_string_array.a -Wl,--end-group  -labsl_base -labsl_city -labsl_hash -labsl_malloc_internal -labsl_raw_hash
_set -labsl_raw_logging_internal -labsl_spinlock_wait -labsl_status -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_debugging_internal -labsl_synchronization -labsl_time -
labsl_civil_time -labsl_synchronization -labsl_time -labsl_time_zone -labsl_flags -labsl_flags_internal -labsl_synchronization -labsl_flags_reflection -labsl_flags_marshalling -labsl_str_form
at_internal -labsl_strings -labsl_strings_internal -labsl_flags_internal -labsl_status -labsl_flags_commandlineflag_internal -labsl_flags_usage -labsl_flags_usage_internal -labsl_flags_intern
al -labsl_flags -labsl_flags_private_handle_accessor -labsl_flags_program_name -labsl_flags_parse -labsl_random_distributions -labsl_random_internal_pool_urbg -labsl_random_internal_randen -l
absl_random_internal_randen_hwaes -labsl_random_internal_randen_hwaes_impl -labsl_random_internal_randen_slow -labsl_random_internal_seed_material -labsl_random_seed_gen_exception -labsl_rand
om_seed_sequences -labsl_status -labsl_statusor -labsl_synchronization -labsl_flags -labsl_graphcycles_internal
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: obj.host/base/base_core.util.o: undefined reference to symbol '_ZNK4absl12lts_2023080211string_view4findES1_m'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libabsl_string_view.so.2308.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Comment 7 Holger Hoffstätte 2023-08-22 11:20:06 UTC
The relnotes for abseil-230802 (https://github.com/abseil/abseil-cpp/releases/tag/20230802.0) mention that there is a new string_view module.
However the note also _sounds_ as if linking to that module is optional, and that using the old absl_strings lib should still work (which seems to happen, according to the log). Apparently that is not the case and the missing -labsl_string_view is required?
Comment 8 Holger Hoffstätte 2023-08-22 11:56:28 UTC
Indeed a dry-run install of abseil-230802 yields:

$ldd /tmp/portage/dev-cpp/abseil-cpp-20230802.0/image/usr/lib64/libabsl_strings.so.2308.0.0 
	linux-vdso.so.1 (0x00007fffc5de7000)
	libabsl_string_view.so.2308.0.0 => not found

(not found because it's not really installed) - however it shows that the string_view lib is not just an additonal lib, as the release notes might make one think, and now has to be added to the list of libs to be linked as well even when only strings is used.

Thanks to "backwards compatibility" the strings module now still includes string_view, which now leads to the link failure.

Where the hell did these people learn to build software?
Comment 9 ncaq 2023-08-25 15:32:24 UTC
At any rate, I found that this version can be built.
I suggest that you fix the ebuild dependencies and this version will be selected.

```
sudo emerge -1 '=dev-cpp/abseil-cpp-20230125.3-r1' '=app-i18n/mozc-2.28.5029.102'
```
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-25 17:56:40 UTC
The ebuild dependencies aren't broken, it's more complicated than that, as discussed above.

Sharing a workaround is fine though.
Comment 11 ncaq 2023-08-26 03:52:39 UTC
Of course I know from GitHub issues that mozc and protobuf are strange, but I am suggesting that it would be useful to add such dependency bindings as a work-around on the Gentoo side.
I know that the Kana-Kanji conversion system like mozc is a very important application for Japanese people.
Comment 12 Julien Papasian 2023-09-17 08:01:40 UTC
Did you try to bump to mozc 2.29.5160.102 to see if it helps with any of the two issues?
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-17 08:07:05 UTC
The patches need rebasing so someone will need to do that.
Comment 14 Fulgurance 2023-09-22 08:50:52 UTC
Hi, I just would like to know if somebody found how to fix this ebuild, because I need mozc, and actually, there is no way to emerge it on gentoo.
Comment 15 Nick Sarnie gentoo-dev 2023-09-24 20:28:02 UTC
Created attachment 871261 [details, diff]
mozc_user_patch.patch

I attached a patch that fixes it for me. Just use it as a userpatch and it should fix. If someone else confirms it fixes it for them I'll look into using this as the real fix.
Comment 16 Fulgurance 2023-09-25 07:46:07 UTC
The patch work for me ! Thanks a lot
Comment 17 Larry the Git Cow gentoo-dev 2023-09-25 17:22:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b7b4ffeec3bf8f7badb711a05a44865e9c7a341

commit 7b7b4ffeec3bf8f7badb711a05a44865e9c7a341
Author:     Nick Sarnie <sarnex@gentoo.org>
AuthorDate: 2023-09-25 17:19:41 +0000
Commit:     Nick Sarnie <sarnex@gentoo.org>
CommitDate: 2023-09-25 17:22:20 +0000

    app-i18n/mozc: Fix build with new abseil
    
    Closes: https://bugs.gentoo.org/912776
    Closes: https://bugs.gentoo.org/913243
    
    Signed-off-by: Nick Sarnie <sarnex@gentoo.org>

 .../mozc-2.28.5029.102-abseil-20230802.0.patch     |  42 +++
 app-i18n/mozc/mozc-2.28.5029.102-r1.ebuild         | 399 +++++++++++++++++++++
 2 files changed, 441 insertions(+)