(This article is a work in progress)
While fcitx5 is provided as a package in many GNU/Linux distributions, some of them (such as Gentoo) don't officially provide it as of May 2020. This article aims to give general instructions on how to compile and install fcitx5 in your GNU/Linux system.
- C Compiler
- C++ Compiler
- ECM (Extra CMake Modules)
- GNU Make
- libxcb (X protocol C-language Binding)
Note that most of these packages are usually provided by many distributions. cldr-emoji-annotation is a special case and will be covered in the next section.
After installing all the dependencies, the first thing to do is install xcb-imdkit, an implementation of the X Input Method in XCB. Clone the GitHub repository:
git clone https://github.com/fcitx/xcb-imdkit.git
cd into the Git directory and run cmake:
To install it to a custom directory, set the
cmake -DCMAKE_INSTALL_PREFIX=/your/install/path .
Then simply run
Please note that installing to a non-standard path is not recommended.
fcitx5 uses these for its emoji module. Some distributions (such as Void Linux) provide this package. Gentoo, on the other hand, does not, but there are user-maintained Portage overlays that provide it such as gentoo-zh. If you want to build it, clone the repository and run
make install. To install it to a custom prefix, run
PKG_CONFIG_PATH=$PWD ./configure --prefix=/your/install/path instead.
You should now be able to build fcitx5. Clone the repository. Some cmake options to keep in mind before building are:
- ENABLE_WAYLAND: Wayland support. Defaults to On and should be fine for desktop environments such as KDE and GNOME. Users running X11-based window managers will need to turn it off.
- ENABLE_ENCHANT: Enchant support. Defaults to On. Used for word prediction (hinting). Depends on libenchant, which is provided by most distributions.
The user is encouraged to check the contents of CMakeLists.txt for an exhaustive list of options.
For example, an i3 user who wishes to install it to /opt would run:
cmake -DENABLE_WAYLAND=Off -DCMAKE_INSTALL_PREFIX=/opt . make make install
TODO: IM_MODULE envvars