From 03c01e418f915a026f387bd8c0778043e4c0ab52 Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Tue, 10 Sep 2019 21:54:41 +0000 Subject: [PATCH 1/2] fcitx-engines.mozc: use newer protobuf ibus-engines.mozc builds fine with the newer protobuf, this should as well. --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 37699f9310b5..83a24aef558b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3036,7 +3036,7 @@ in mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { python = python2; inherit (python2Packages) gyp; - protobuf = pkgs.protobuf3_6.overrideDerivation (oldAttrs: { stdenv = clangStdenv; }); + protobuf = pkgs.protobuf.overrideDerivation (oldAttrs: { stdenv = clangStdenv; }); }; table-extra = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-extra { }; From fdccd9cd9bf2724daf7a5637433994f2780a08af Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Tue, 10 Sep 2019 21:57:49 +0000 Subject: [PATCH 2/2] fctix-engines.mozc: fix build This fixes: FAILED: obj/engine/engine.engine.o clang++ -MMD -MF obj/engine/engine.engine.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV -DENABLE_GTK_RENDERER -DNDEBUG -DQT_NO_DEBUG -DNO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/build/source/src -Igen -Igen/proto_out -Wall -Wno-char-subscripts -Wno-sign-compare -Wno-deprecated-declarations -Wwrite-strings -fPIC -fno-exceptions -fmessage-length=0 -fno-strict-aliasing -funsigned-char -include base/namespace.h -pipe -pthread -fno-omit-frame-pointer -fstack-protector --param=ssp-buffer-size=4 -Wtype-limits -O2 -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 ../../engine/engine.cc:30: In file included from /build/source/src/engine/engine.h:33: In file included from /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/memory:62: In file included from /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algobase.h:66: /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_iterator_base_funcs.h:183:2: error: cannot decrement value of type 'mozc::ZeroQueryDict::iterator' --__i; ^ ~~~ /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_iterator_base_funcs.h:206:12: note: in instantiation of function template specialization 'std::__advance' requested here std::__advance(__i, __d, std::__iterator_category(__i)); ^ /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algo.h:2137:9: note: in instantiation of function template specialization 'std::advance' requested here std::advance(__middle, __half); ^ /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algo.h:2190:19: note: in instantiation of function template specialization 'std::__equal_range' requested here return std::__equal_range(__first, __last, __val, ^ /build/source/src/prediction/zero_query_dict.h:213:17: note: in instantiation of function template specialization 'std::equal_range' requested here return std::equal_range(begin(), end(), iter.index()); ^ 1 error generated. --- pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix index d74c7608bc90..9f062036438f 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix @@ -39,6 +39,11 @@ in clangStdenv.mkDerivation rec { url = "https://download.fcitx-im.org/fcitx-mozc/${name}"; sha256 = "1f9m4310kz09v5qvnv75ka2vq63m7by023qrkpddgq4dv7gxx3ca"; }) + # https://github.com/google/mozc/pull/444 - fix for gcc8 STL + (fetchpatch { + url = "https://github.com/google/mozc/commit/82d38f929882a9c62289b179c6fe41efed249987.patch"; + sha256 = "07cja1b7qfsd3i76nscf1zwiav74h7d6h2g9g2w4bs3h1mc9jwla"; + }) ]; postPatch = ''