pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/52878: pkgsrc/inputmethod/mozc-server: Build failed



>Number:         52878
>Category:       pkg
>Synopsis:       pkgsrc/inputmethod/mozc-server: Build failed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 30 03:25:00 +0000 2017
>Originator:     YAMASHIRO, Jun
>Release:        NetBSD-current / Ubuntu 16.04.3 LTS
>Organization:
Okinawa FreeBSD Users Group
>Environment:
NetBSD yamajun 8.99.9 NetBSD 8.99.9 (GENERIC) #16: Mon Dec 11 20:19:06 JST 2017  yamajun@yamajun:/usr/obj/sys/arch/amd64/compile/GENERIC amd64

Linux yamajun-ThinkPad-T410 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

>Description:
Build failed about scope bug of std::sort()

see also:
https://github.com/google/mozc/pull/424/commits/a62bb554024e5e36e93215ee7c5f8ac61e060e61
(Note: rejected this PR about non-technical reason)

>How-To-Repeat:

# cd /usr/pkgsrc/inputmethod/mozc-server
# make

(snip)
../../prediction/user_history_predictor.cc: In static member function 'static bool mozc::UserHistoryPredictor::RomanFuzzyPrefixMatch(const string&, const string&)':
../../prediction/user_history_predictor.cc:844:54: error: 'swap' was not declared in this scope
         swap(swapped_prefix[i], swapped_prefix[i + 1]);
                                                      ^
(snip)
build_tools.util.RunOrDieError:
==========
 ERROR: ninja -C out_bsd/Release mozc_server
==========
*** Error code 1

Stop.
make[1]: stopped in /usr/pkgsrc/inputmethod/mozc-server
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/inputmethod/mozc-server

>Fix:
Apply this patch to pkgsrc/inputmethod/mozc-server and rebuild

# cd /usr/pkgsrc/inputmethod/mozc-server
# patch -p0 < /path/to/this_patch.diff
# rm patches/patch-prediction-user__history__predictor.cc.orig
# make makepatchsum
# make


--- /dev/null	2017-12-30 11:54:46.703872431 +0900
+++ patches/patch-prediction-user__history__predictor.cc	2017-12-30 11:53:59.499766812 +0900
@@ -0,0 +1,20 @@
+$NetBSD$
+
+* Fix build problem
+
+see also:
+https://github.com/google/mozc/pull/424
+https://github.com/google/mozc/pull/424/commits/a62bb554024e5e36e93215ee7c5f8ac6
+1e060e61
+
+--- prediction/user_history_predictor.cc.orig	2017-12-30 11:45:53.876922748 +0900
++++ prediction/user_history_predictor.cc	2017-12-30 11:46:15.319414028 +0900
+@@ -841,7 +841,7 @@
+       // swap.
+       if (i + 1 < prefix.size()) {
+         string swapped_prefix = prefix;
+-        swap(swapped_prefix[i], swapped_prefix[i + 1]);
++	std::swap(swapped_prefix[i], swapped_prefix[i + 1]);
+         if (Util::StartsWith(str, swapped_prefix)) {
+           return true;
+         }



Home | Main Index | Thread Index | Old Index