Fail to compile git master fcitx5-gtk on Ubuntu 20.04.

8 views
Skip to first unread message

Hongyi Zhao

unread,
Jan 27, 2021, 11:05:22 PM1/27/21
to fcitx-dev
See the following steps and errors for detailed info:

$ sudo apt-get -y build-dep fcitx5-frontend-gtk3
$ git clone https://github.com/fcitx/fcitx5-gtk.git fcitx5-gtk.git
$ cd fcitx5-gtk.git
$ mkdir buid && cd $_
$ cmake -DENABLE_GTK2_IM_MODULE=OFF -DENABLE_GTK4_IM_MODULE=OFF -DGTK3_IM_MODULEDIR=/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules ..
$ make
[...]
/home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/fcitxtheme.cpp:388:60: error: no matching function for call to ‘min(<brace-enclosed initializer list>)’
  388 |              cfg.margin.marginTop, cfg.margin.marginBottom});
      |                                                            ^
In file included from /usr/include/c++/9/memory:62,
                 from /home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/utils.h:12,
                 from /home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/fcitxtheme.h:10,
                 from /home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/fcitxtheme.cpp:7:
/usr/include/c++/9/bits/stl_algobase.h:198:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
  198 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/9/bits/stl_algobase.h:198:5: note:   template argument deduction/substitution failed:
/home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/fcitxtheme.cpp:388:60: note:   candidate expects 2 arguments, 1 provided
  388 |              cfg.margin.marginTop, cfg.margin.marginBottom});
      |                                                            ^
In file included from /usr/include/c++/9/memory:62,
                 from /home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/utils.h:12,
                 from /home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/fcitxtheme.h:10,
                 from /home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/fcitxtheme.cpp:7:
/usr/include/c++/9/bits/stl_algobase.h:246:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
  246 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/9/bits/stl_algobase.h:246:5: note:   template argument deduction/substitution failed:
/home/werner/Public/repo/github.com/fcitx/fcitx5-gtk.git/gtk3/fcitxtheme.cpp:388:60: note:   candidate expects 3 arguments, 1 provided
  388 |              cfg.margin.marginTop, cfg.margin.marginBottom});
      |                                                            ^
make[2]: *** [gtk3/CMakeFiles/im-fcitx5-gtk3.dir/build.make:89: gtk3/CMakeFiles/im-fcitx5-gtk3.dir/fcitxtheme.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:199: gtk3/CMakeFiles/im-fcitx5-gtk3.dir/all] Error 2
make: *** [Makefile:130: all] Error 2


The commit hash for fcitx5-gtk:
$ git log -1
commit 505fa0828fe562cfea74c6fc3781165fa95c643e (HEAD -> master, origin/master, origin/HEAD)
Author: Weng Xuetian <wen...@gmail.com>
Date:   Wed Jan 27 10:21:05 2021 -0800

    Set default fallback border with value

Regards,
HY
Reply all
Reply to author
Forward
0 new messages