Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 828527 - app-i18n/mozc-2.23.2815.102 fails to compile with >=dev-libs/protobuf-3.18.0
Summary: app-i18n/mozc-2.23.2815.102 fails to compile with >=dev-libs/protobuf-3.18.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Arfrever Frehtes Taifersar Arahesis
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-07 18:54 UTC by David Roman
Modified: 2022-01-29 15:20 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Roman 2021-12-07 18:54:43 UTC
mozc dos not compile against dev-libs/protobuf-3.19.1-1

This is the error message: 

FAILED: obj/dictionary/user_dictionary.user_dictionary_storage.o
/usr/bin/x86_64-pc-linux-gnu-g++ -MMD -MF obj/dictionary/user_dictionary.user_dictionary_storage.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV -DNDEBUG -DQT_NO_DEBUG -DNO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/tmp/portage/app-i18n/mozc-2.23.2815.102/work/mozc-2.23.2815.102/src -Igen -Igen/proto_out -Wall -Wno-char-subscripts -Wno-sign-compare -Wno-deprecated-declarations -Wwrite-strings -Wno-unknown-warning-option -Wno-inconsistent-missing-override -fPIC -fno-exceptions -fmessage-length=0 -fno-strict-aliasing -funsigned-char -pipe -pthread -fno-omit-frame-pointer -fstack-protector --param=ssp-buffer-size=4 -Wtype-limits -O2 -O2 -pipe -march=native -mtune=native -w -flto -Wno-deprecated -Wno-covered-switch-default -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=gnu++0x -std=gnu++0x  -c ../../dictionary/user_dictionary_storage.cc -o obj/dictionary/user_dictionary.user_dictionary_storage.o
../../dictionary/user_dictionary_storage.cc: In member function ‘bool mozc::UserDictionaryStorage::LoadInternal()’:
../../dictionary/user_dictionary_storage.cc:111:29: error: no matching function for call to ‘google::protobuf::io::CodedInputStream::SetTotalBytesLimit(const size_t&, int)’
  111 |   decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit, -1);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gen/proto_out/protocol/user_dictionary_storage.pb.h:23,
                 from /tmp/portage/app-i18n/mozc-2.23.2815.102/work/mozc-2.23.2815.102/src/dictionary/user_dictionary_storage.h:68,
                 from ../../dictionary/user_dictionary_storage.cc:30:
/usr/include/google/protobuf/io/coded_stream.h:406:8: note: candidate: ‘void google::protobuf::io::CodedInputStream::SetTotalBytesLimit(int)’
  406 |   void SetTotalBytesLimit(int total_bytes_limit);
      |        ^~~~~~~~~~~~~~~~~~
/usr/include/google/protobuf/io/coded_stream.h:406:8: note:   candidate expects 1 argument, 2 provided

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-07 18:57:15 UTC
Please include the full build.log and emerge --info.
Comment 2 Larry the Git Cow gentoo-dev 2021-12-10 00:29:36 UTC
The bug has been referenced in the following commit(s):

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

commit c4c3366c68e5d9313db9c41b76c8641c52bd10aa
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-10 00:29:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-10 00:29:21 +0000

    app-i18n/mozc: depend on older protobuf
    
    Bug: https://bugs.gentoo.org/828527
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{mozc-2.23.2815.102.ebuild => mozc-2.23.2815.102-r1.ebuild}     | 6 +++---
 ...ild => mozc-2.26.4220_p20201212102434_p20201219202429-r1.ebuild} | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
Comment 3 Arfrever Frehtes Taifersar Arahesis 2022-01-07 09:31:00 UTC
In >=dev-libs/protobuf-3.18.0:
https://github.com/protocolbuffers/protobuf/pull/8794
https://github.com/protocolbuffers/protobuf/commit/cda795437d00a15f375d3d5e2659adac715459c6


In >=app-i18n/mozc-2.25.0 (versioning corrected to 2.25.4000 in later commit a223fdc4c6d790b6f5633d752ff3827747066cd8):
https://github.com/google/mozc/commit/a1dcadabd3a1c604e8beff1e45830c1d9adfce84:
...
--- src/dictionary/user_dictionary_storage.cc
+++ src/dictionary/user_dictionary_storage.cc
...
@@ -108,16 +100,14 @@ bool UserDictionaryStorage::LoadInternal() {
   // wants to use more than 512MB.
   mozc::protobuf::io::IstreamInputStream zero_copy_input(&ifs);
   mozc::protobuf::io::CodedInputStream decoder(&zero_copy_input);
-  decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit, -1);
+  decoder.SetTotalBytesLimit(kDefaultTotalBytesLimit);
...
Comment 4 Larry the Git Cow gentoo-dev 2022-01-29 15:20:08 UTC
The bug has been closed via the following commit(s):

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

commit da6212a99d181d54f22c73fb2a9b8a9a5df2d21b
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2022-01-12 00:00:00 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2022-01-29 15:18:35 +0000

    app-i18n/mozc: Fix building with >=dev-libs/protobuf-3.18.0
    
    Closes: https://bugs.gentoo.org/828527
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 app-i18n/mozc/files/mozc-2.23.2815.102-protobuf-3.18.patch  | 13 +++++++++++++
 ...zc-2.23.2815.102-r1.ebuild => mozc-2.23.2815.102.ebuild} |  7 ++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

Additionally, it has been referenced in the following commit(s):

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

commit a4e5964286e02cf8fbf28b0b12e38a857d46b7e3
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2022-01-10 08:00:00 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2022-01-29 15:18:18 +0000

    app-i18n/mozc: Partially revert "depend on older protobuf".
    
    2.26.4220 is not affected by compilation failure.
    
    Bug: https://bugs.gentoo.org/828527
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 ...ebuild => mozc-2.26.4220_p20201212102434_p20201219202429.ebuild} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)