Control: tags -1 patch

On Fri, 17 May 2024 14:06:37 +0900 Kentaro HAYASHI <ken...@xdump.org>

> This issue was already fixed in upstream.
> 
>   Non-public Abseil API is used for CLI parsing 
>   https://github.com/google/mozc/issues/790
> 
> Above ftbfs error was fixed with the following commit:
> 
>   
> https://github.com/google/mozc/commit/cad4064c8884eb711e0e19b4b79d2ff5610823dc

Attached patch will solve the reported compile error in this bugreport,
 but even though it was fixed, another abseil linkage error occurs.

  /usr/bin/ld: obj/base/base_core.file_util.o: undefined reference to
  symbol '_ZN4absl7debian5lsERSoNS0_11string_viewE'
  /usr/bin/ld:
  /lib/x86_64-linux-gnu/libabsl_string_view.so.20230802: error adding
  symbols: DSO missing from command line

I'm not sure how to link it correctly in appropriate way.

Regards,
From: Kentaro Hayashi <ken...@gmail.com>
Date: Fri, 17 May 2024 18:21:29 +0900
Subject: Fix the compile error of ParseCommandLineFlags with Abseil LTS
 20230802.

Origin: https://github.com/google/mozc/commit/cad4064c8884eb711e0e19b4b79d2ff5610823dc
Description: Fix the compile error of ParseCommandLineFlags with Abseil LTS 20230802.
  * Added the check of the Abseil version to the arguments of ParseCommandLineImpl.
  * https://github.com/google/mozc/issues/790
  #codehealth
  PiperOrigin-RevId: 561867167
Author: Hiroyuki Komatsu <koma...@google.com>

Released in 2.29.5374.102

Signed-off-by: Kentaro Hayashi <ken...@gmail.com>
---
 src/base/init_mozc.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/base/init_mozc.cc b/src/base/init_mozc.cc
index eee8b62..5e5b558 100644
--- a/src/base/init_mozc.cc
+++ b/src/base/init_mozc.cc
@@ -87,7 +87,9 @@ std::string GetLogFilePathFromProgramName(const std::string &program_name) {
 void ParseCommandLineFlags(int argc, char **argv) {
   absl::flags_internal::ParseCommandLineImpl(
       argc, argv,
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20230802
       absl::flags_internal::ArgvListAction::kRemoveParsedArgs,
+#endif  // ABSL_LTS_RELEASE_VERSION < 20230802
       // Suppress help messages invoked by --help and others.
       // Use UsageFlagsAction::kHandleUsage to enable it.
       absl::flags_internal::UsageFlagsAction::kIgnoreUsage,

Reply via email to