-
Notifications
You must be signed in to change notification settings - Fork 69
Building uim from sources
If your distribution has uim packages, you can install uim with the packages. But you need to install uim from sources when your distribution doesn't have uim packages, uim packages in your distribution are outdated or you want to use latest development version of uim. We explain how to install uim from sources here.
Before installing uim, you need to install required packages and compile uim.
If you encounter troubles during compilation and installation, see the Troubleshooting section.
First of all, you need to install packages required to compile and install uim. The required packages change depending on the version (i.e. release version or development version) of uim which you want to install, and the features of uim which you want to enable.
You need to install the following required software and libraries before compiling and installing uim:
- gcc
- GNU make
- iconv
- gettext
- intltool
The package names of the software and libraries above, and default installed packages differ from distribution to distribution. We take 2 distribution, Ubuntu and Fedora, as examples for commands.
Ubuntu:
$ sudo apt-get install intltool
Fedora:
$ sudo yum install gcc intltool
If you want to install development version (non-release version), additional requirements are as follows:
- automake
- ed
- librsvg
- libtool
- pkg-config
- ruby
- git
If you want to install a release version, you don't need to install these software above.
The actual commands for Ubuntu and Fedora are as follows.
Ubuntu:
$ sudo apt-get install librsvg2-bin libtool ruby git
Fedora:
$ sudo yum install libtool ruby
You also need to install additional software and libraries to enable features which uim supports.
Let us assume that we want to enable Anthy, GTK+2, GTK+3 and Qt4 features. In this case, issue the following commands for Ubuntu and Fedora respectively.
Ubuntu:
$ sudo apt-get install libanthy-dev libgtk2.0-dev libgtk-3-dev libqt4-dev
Fedora:
$ sudo yum install anthy-devel gtk2-devel gtk3-devel qt-devel gcc-c++
As for Fedora, you need to install gcc-c++ to install g++ in order to compile Qt4 source codes.
See the table below for all features:
| Feature | Description | Build Requirements | Configure Option |
|---|---|---|---|
| Anthy | Japanese Anthy module | anthy | --with-anthy |
| Anthy (UTF-8) | UTF-8 version of Japanese Anthy module | anthy >= 8622 | --with-anthy-utf8 |
| Canna | Canna module | canna if uim < 1.6 | --with-canna |
| cURL | cURL plugin | libcurl >= 7.16.4 | --with-curl |
| DICT | Japanese dictionary tool (uim-dict) | gtk+-2.0 >= 2.4.0 anthy or canna |
--enable-dict |
| EB | EB plugin for the annotation system | eb | --with-eb |
| Emacs Uim-El | uim.el | - | --enable-emacs |
| expat | expat plugin | expat | --with-expat |
| FEP Uim-FEP | uim-fep | curses or ncurses | --enable-fep |
| ffi | libffi plugin | libffi >= 3.0.0 | --with-ffi |
| Gnome Applet | GNOME2 applet indicator | libpanelapplet-2.0 libgnomeui-2.0 if uim < 1.7 |
--enable-gnome-applet |
| Gnome3 Applet | GNOME3 applet indicator | libpanelapplet-4.0 | --enable-gnome3-applet |
| GTK+ | GTK+2 tools and GTK+2 immodule | gtk+-2.0 >= 2.2.0 gdk-x11-2.0 |
--with-gtk2 |
| GTK+3 | GTK+3 tools and GTK+3 immodule | gtk+-3.0 | --with-gtk3 |
| KDE3 Applet | KDE3 Kicker applet | kdelibs < 4.0 | --enable-kde-applet |
| KDE4 Applet | KDE4 Plasma widget | kdelibs >= 4.2 and CMake | --enable-kde4-applet |
| knotify3 (notify) | notification by knotify3 | kdelibs < 4.0 | --enable-notify=knotify3 |
| knotify4 (notify) | notification by knotify4 | kdelibs >= 4.0 | --enable-notify=knotify4 |
| libedit | uim-editline for uim-sh | libedit | --with-libedit |
| libnotify (notify) | notification by libnotify | libnotify >= 0.4 | --enable-notify=libnotify |
| m17n-lib | uim-m17nlib bridge | m17n >= 1.3.1 | --with-m17nlib |
| Mana | Mana module | Mana | --with-mana |
| OpenSSL | OpenSSL module | OpenSSL | --enable-openssl |
| Pref | preference editor (uim-pref) | gtk+2.0 >= 2.4.0 Qt3 >= 3.2 or Qt4 >= 4.2 |
--enable-pref |
| PRIME | PRIME module | prime >= 0.8.5.2 | --with-prime |
| Qt3 | Qt3 tools | Qt3 >= 3.2 | --with-qt |
| Qt3 immodule | Qt3 immodule | Qt3 >= 3.3.2 (with immodule patch) |
--with-qt-immodule |
| Qt4 | Qt4 tools | Qt4 Gui >= 4.2 | --with-qt4 |
| Qt4 immodule | Qt4 immodule | Qt4 Gui >= 4.2 | --with-qt4-immodule |
| Qt4 !Qt3Support | !Q3TextEdit support for Qt4 immodule | Qt4 !Qt3Support >= 4.2 | --enable-qt4-qt3support |
| SCIM | SCIM module ([broken]) | scim >= 1.3.0 | --with-scim |
| SJ3 | Sj3 module | sj3lib >= 2.0.1.21 if uim < 1.6 | --with-sj3 |
| SKK | SKK module | - | --with-skk |
| SQLite3 | SQLite3 plugin for the completion input | sqlite3 >= 3.0.0 | --with-sqlite3 |
| Wnn | Wnn module | wnn | --with-wnn |
| Uim-xim | uim-xim | X11 and libXext | --with-x |
broken: https://github.com/uim/uim/issues/14
Note:
- GTK+2 tools include uim-dict-gtk, uim-im-switcher-gtk, uim-input-pad-ja, uim-toolbar-gtk, and uim-toolbar-gtk-systray.
- Qt3 tools include uim-chardict-qt, uim-im-switcher-qt, and uim-toolbar-qt.
- Qt4 tools include uim-chardict-qt4, uim-im-switcher-qt4, and uim-toolbar-qt4.
After installing required packages, you need to compile uim.
You have two options on which version of uim you will use.
- If you want to a use stable uim, select a release version.
- If you want to use an unstable but more newer version, select the development version.
If you want to use a release version, first, go to Download Page and download a tar ball and extract source files from the tar ball.
$ tar xvzf uim-x.x.x.tar.gz
Secondly, move to the extracted directory and run configure.
$ cd uim-x.x.x
$ ./configure
Following configure options are disabled by default.
| Option | Description |
|---|---|
--enable-anthy-static |
build static library for Anthy |
--enable-anthy-utf8-static |
build static library for UTF-8 version of Anthy |
--enable-backtrace |
build internal scheme interpreter to show backtrace |
--enable-debug |
build uim with debug information |
--enable-dict |
enable Japanese dictionary tool |
--enable-kde4-applet |
enable KDE4 Plasma widget |
--enable-notify |
enable notification (libnotify and/or knotify3 and/or knotify4) |
--enable-openssl |
enable OpenSSL |
--with-anthy-utf8 |
build UTF-8 version of Anthy |
--with-canna |
use Canna |
--with-curl |
build cURL plugin |
--with-eb |
build EB plugin for the annotation system |
└ --with-eb-conf
|
eb.conf (ex. /etc/eb.conf) |
--with-expat |
build expat plugin (used for uim-yahoo-jp, ex. /usr/lib/x86_64-linux-gnu) |
--with-ffi |
build libffi plugin |
--with-qt |
build qt3 tools |
--with-qt-immodule |
build qt3 immodule. you need the qt3 with the qt-immodule patch |
--with-qt4 |
build qt4 tools |
--with-qt4-immodule |
build qt4 immodule |
--with-scim |
use SCIM (broken) |
--with-sj3 |
use Sj3 |
--with-sqlite3 |
build SQLite3 plugin for the completion input |
--with-wnn |
build Wnn module |
├ --with-wnn-libraries
|
wnn library (ex. /usr/lib) |
└ --with-wnn-includes
|
wnn header files (ex. /usr/include/wnn) |
For example, you want Qt4 tools and immodule, issue the command below:
$ ./configure --with-qt4 --with-qt4-immodule
Thirdly, run make.
$ make
Go to the Installing uim section to install uim.
If you want to install development version (non-release version), first, obtain development version from the Git repository.
$ git clone https://github.com/uim/uim.git
Secondly, move to the extracted directory and run make-wc.sh.
This shell script checks out SigScheme and libgcroots, and runs configure.
See also comments in make-wc.sh.
$ cd uim
$ ./make-wc.sh
You can pass arguments to ./make-wc.sh as ./configure:
$ ./make-wc.sh --with-qt4 --with-qt4-immodule
The detail options of ./configure, which are same as ./make-wc.sh, are described in the section Compiling release version.
Thirdly, run make.
$ make
Go to the Installing uim section to install uim.
You have already installed required packages and compiled uim. Now, install uim.
$ sudo make install
By default, uim is installed under /usr/local, but this directory may not be on the system search path.
Should that be the case, add the line /usr/local/lib to /etc/ld.conf and then, run ldconfig.
In this section, we describe troubles you may encounter and how to address the troubles. In most cases, the cause of a trouble is that required packages are missing.
Q. When I ran configure, the following error occurred:
configure: error: no acceptable C compiler found in $PATH
A. You may forget to install gcc. If so, install it. gcc includes a C compiler.
Q. When I ran configure, the following error occurred:
configure: error: GNU make is currently required to run ax_feature_configurator.m4
A. You may forget to install GNU make. If so, install it.
Q. When I ran configure, the following error occurred:
configure: error: Your intltool is too old. You need intltool 0.36.3 or later.
A. You may forget to install intltool. If so, install it.
A. When build requirements for the xxx feature are missing in your environment, the feature will be automatically disabled.
See the table above and config.log in your build directory, and check if build requirements are installed in your environment.
Q. When I ran "make install", the following error occurred:
/usr/bin/ld: cannot find -lgcroots
collect2: ld returned 1 exit status
libtool: install: error: relink `libuim-scm.la' with the above command before installing it
A. Set the environment variable LIBRARY_PATH:
LIBRARY_PATH=<prefix>/lib/ make install
where the prefix is /usr/local or what you set with --prefix in running configure.
Q. When I ran make-wc.sh to install development version, the following error occurred:
./autogen.sh: 16: automake-1.11: not found
./autogen.sh: 16: automake-1.10: not found
./autogen.sh: 16: automake-1.7: not found
./autogen.sh: 16: automake-1.9: not found
./autogen.sh: 16: automake-1.8: not found
A. You may forget to install automake. If so, install it.
Q. When I ran make-wc.sh to install development version, the following error occurred:
./autogen.sh: line 27: libtoolize: command not found
A. You may forget to install libtool. If so, install it.
Q. When I ran make-wc.sh to install development version, the following error occurred:
./autogen.sh: 57: intltoolize: not found
A. You may forget to install intltool. If so, install it.
Q. When I ran make-wc.sh to install development version, the following error occurred:
configure.in:300: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
A. You may forget to install pkg-config. If so, install it.
Q. When I ran make-wc.sh to install development version, the following error occurred:
./autogen.sh: line 27: ed: command not found
A. You may forget to install ed. If so, install it.
Q. When I ran make to install development version, the following error occurred:
../sigscheme/src/syntax.c:96:35: fatal error: functable-r5rs-syntax.c: No such file or directory
and/or:
In file included from ../sigscheme/src/sigscheme-combined.c:53,
from uim-scm-sigscheme.c:41:
../sigscheme/src/module-srfi60.c: In function ‘scm_initialize_srfi60’:
../sigscheme/src/module-srfi60.c:86: error: ‘scm_functable_srfi60’ undeclared (first use in this function)
A. You may forget to install ruby. If so, install it. Some source files such as functable-r5rs-syntax.c are generated with ruby.
Q. When I ran "make install" to install development version, the following error occurred:
make[1]: *** No rule to make target `unknown.png', needed by `all-am'. Stop.
A. You may forget to install librsvg. If so, install it and run make-wc.sh again.
The rsvg command (since uim 1.8.0, rsvg-convert) in librsvg is used to generate PNG files from SVG files.