Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 655570 - app-i18n/mozc fails to build with GCC 8
Summary: app-i18n/mozc fails to build with GCC 8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Arfrever Frehtes Taifersar Arahesis
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-12 09:13 UTC by Meoberto Whagbossa
Modified: 2019-02-23 17:21 UTC (History)
1 user (show)

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


Attachments
Fixes build on GCC8 (mozc-2.23.2815.102-gcc8.patch,589 bytes, patch)
2018-05-12 09:13 UTC, Meoberto Whagbossa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Meoberto Whagbossa 2018-05-12 09:13:22 UTC
Created attachment 531028 [details, diff]
Fixes build on GCC8

The problem has already been reported to upstream, but given Google's policy on pull requests, I doubt it will be addressed in a timely manner.

The build logs are as follows:

[597/747] /usr/bin/x86_64-pc-linux-gnu-g++ -MMD -MF obj/engine/engine.engine.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV -DNDEBUG -DQT_NO_DEBUG -DNO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/var/tmp/portage/app-i18n/mozc-9999/work/mozc-9999/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-point
er -fstack-protector --param=ssp-buffer-size=4 -Wtype-limits -march=native -O2 -pipe -Wno-deprecated -Wno-covered-switch-default -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=gnu++0x -std=gnu++0x  -c ../../engine/engine.cc -o obj/engine/engine.engine.o
FAILED: obj/engine/engine.engine.o                                                      
/usr/bin/x86_64-pc-linux-gnu-g++ -MMD -MF obj/engine/engine.engine.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV -DNDEBUG -DQT_NO_DEBUG -DNO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/var/tmp/portage/app-i18n/mozc-9999/work/mozc-9999/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 -march=native -O2 -pipe -Wno-deprecated -Wno-covered-switch-default -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=gnu++0x -std=gnu++0x  -c ../../engine/engine.cc -o obj/engine/engine.engine.o
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/g++-v8/bits/stl_algobase.h:66,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/g++-v8/memory:62,
                 from /var/tmp/portage/app-i18n/mozc-9999/work/mozc-9999/src/engine/engine.h:33,
                 from ../../engine/engine.cc:30:
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/g++-v8/bits/stl_iterator_base_funcs.h: In instantiation of ‘void std::__advance(_RandomAccessIterator&, _Distance, std::random_access_iterator_tag) [with _RandomAccessIterator = mozc::ZeroQueryDict::iterator; _Distance = lon
g int]’:
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/g++-v8/bits/stl_iterator_base_funcs.h:206:21:   required from ‘void std::advance(_InputIterator&, _Distance) [with _InputIterator = mozc::ZeroQueryDict::iterator; _Distance = long int]’
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/g++-v8/bits/stl_algo.h:2137:16:   required from ‘std::pair<_FIter, _FIter> std::__equal_range(_ForwardIterator, _ForwardIterator, const _Tp&, _CompareItTp, _CompareTpIt) [with _ForwardIterator = mozc::ZeroQueryDict::iterator
; _Tp = long unsigned int; _CompareItTp = __gnu_cxx::__ops::_Iter_less_val; _CompareTpIt = __gnu_cxx::__ops::_Val_less_iter]’
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/g++-v8/bits/stl_algo.h:2190:32:   required from ‘std::pair<_FIter, _FIter> std::equal_range(_FIter, _FIter, const _Tp&) [with _FIter = mozc::ZeroQueryDict::iterator; _Tp = long unsigned int]’
/var/tmp/portage/app-i18n/mozc-9999/work/mozc-9999/src/prediction/zero_query_dict.h:213:57:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/include/g++-v8/bits/stl_iterator_base_funcs.h:183:2: error: no match for ‘operator--’ (operand type is ‘mozc::ZeroQueryDict::iterator’)
  --__i;                                       
  ^~~~~


There is a patch for this in the upstream issue report: https://github.com/google/mozc/issues/441

Applyying this patch, the build succeeds using gcc 8.1 and mozc works without any issues whatsoever. With all due credit to farseerfc, the patch is attached to this report.
Comment 1 Larry the Git Cow gentoo-dev 2018-06-13 14:36:44 UTC
The bug has been closed via the following commit(s):

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

commit a917a8214bb56d2486898553788d9764a2b26cdc
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2018-06-01 03:02:06 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-06-13 14:36:21 +0000

    app-i18n/mozc: Fix building with GCC 8.
    
    Closes: https://bugs.gentoo.org/655570

 app-i18n/mozc/files/mozc-2.23.2815.102-gcc-8.patch | 22 ++++++++++++++++++++++
 app-i18n/mozc/mozc-2.23.2815.102.ebuild            |  1 +
 app-i18n/mozc/mozc-9999.ebuild                     |  1 +
 3 files changed, 24 insertions(+)