始めにダウンロードして解凍。解凍してできたディレクトリに移動して、内容を確認。
$ wget 'http://www.weechat.net/files/src/weechat-0.3.1.1.tar.bz2' $ tar jxf weechat-0.3.1.1.tar.bz2 $ cd weechat-0.3.1.1/ $ ls ABOUT-NLS config.h.cmake depcomp Makefile.in weechat_icon_32.png aclocal.m4 config.h.in doc missing weechat.pc.in AUTHORS config.rpath INSTALL NEWS weechat.spec ChangeLog config.sub install-sh po cmake configure intl README CMakeLists.txt configure.in ltmain.sh src config.guess COPYING Makefile.am UPGRADE_0.3
INSTALLファイルを読んでビルドの手順をチェックする。
$ cat INSTALL WeeChat Installation instructions ================================= You can build WeeChat with cmake (recommended way) or autotools. With cmake ---------- ------------------------------------------------------------------ mkdir build cd build cmake .. -DPREFIX=/where/you/want/install -DCMAKE_BUILD_TYPE=Debug make make install (as root for installation in system directories) ------------------------------------------------------------------ With autotools -------------- ---------------------------------------------------------------------- ./autogen.sh (for cloned git repository only, not .tar.XX package) ./configure --prefix=/where/you/want/install make make install (as root for installation in system directories) ---------------------------------------------------------------------- If you want to report bugs/crashs to developers, please: - compile with debug info (type "Debug" for cmake build, default for autotools), - enable core files (for bash shell, add "ulimit -c unlimited" to your ~/.bashrc). See AUTHORS for support, feel free to contact us for any problem.
gitリポジトリからダウンロードしたわけではないので、cmakeの手順でビルドする。前のバージョンをコンパイルしたときにcmakeは導入済み。野良ビルドしたプログラムのインストール先は/usr/local。それ以外の手順はINSTALLの内容を踏襲。ICONV_2ARG_IS_CONSTのテストに失敗したといわれるけど、先に進む。前のバージョンでもこのエラーが出た。関連あるか解らないけれど、いくつかの日本語が化けることがあった。iconvだしなんとなく関連ありそう。
$ mkdir build $ cd build $ cmake .. -DPREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug cmake .. -DPREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug -- The C compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Looking for include files HAVE_ARPA_INET_H -- Looking for include files HAVE_ARPA_INET_H - found -- Looking for include files HAVE_LIMITS_H -- Looking for include files HAVE_LIMITS_H - found -- Looking for include files HAVE_LOCALE_H -- Looking for include files HAVE_LOCALE_H - found -- Looking for include files HAVE_NETDB_H -- Looking for include files HAVE_NETDB_H - found -- Looking for include files HAVE_NETINET_IN_H -- Looking for include files HAVE_NETINET_IN_H - found -- Looking for include files HAVE_STDLIB_H -- Looking for include files HAVE_STDLIB_H - found -- Looking for include files HAVE_STRING_H -- Looking for include files HAVE_STRING_H - found -- Looking for include files HAVE_SYS_SOCKET_H -- Looking for include files HAVE_SYS_SOCKET_H - found -- Looking for include files HAVE_SYS_TIME_H -- Looking for include files HAVE_SYS_TIME_H - found -- Looking for include files HAVE_SYS_TYPES_H -- Looking for include files HAVE_SYS_TYPES_H - found -- Looking for include files HAVE_UNISTD_H -- Looking for include files HAVE_UNISTD_H - found -- Looking for include files HAVE_PWD_H -- Looking for include files HAVE_PWD_H - found -- Looking for include files HAVE_ERRNO_H -- Looking for include files HAVE_ERRNO_H - found -- Looking for include files HAVE_WCHAR_H -- Looking for include files HAVE_WCHAR_H - found -- Looking for include files HAVE_LANGINFO_CODESET -- Looking for include files HAVE_LANGINFO_CODESET - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for gethostname -- Looking for gethostname - found -- Looking for getsockname -- Looking for getsockname - found -- Looking for gettimeofday -- Looking for gettimeofday - found -- Looking for inet_ntoa -- Looking for inet_ntoa - found -- Looking for memset -- Looking for memset - found -- Looking for mkdir -- Looking for mkdir - found -- Looking for select -- Looking for select - found -- Looking for setlocale -- Looking for setlocale - found -- Looking for socket -- Looking for socket - found -- Looking for strcasecmp -- Looking for strcasecmp - found -- Looking for strchr -- Looking for strchr - found -- Looking for strdup -- Looking for strdup - found -- Looking for strndup -- Looking for strndup - found -- Looking for strncasecmp -- Looking for strncasecmp - found -- Looking for strpbrk -- Looking for strpbrk - found -- Looking for strrchr -- Looking for strrchr - found -- Looking for strstr -- Looking for strstr - found -- Looking for include files HAVE_LIBINTL_H -- Looking for include files HAVE_LIBINTL_H - found -- Looking for dgettext -- Looking for dgettext - found -- Looking for iconv_open -- Looking for iconv_open - found -- Performing Test ICONV_2ARG_IS_CONST -- Performing Test ICONV_2ARG_IS_CONST - Failed -- Looking for include files HAVE_SYS_FILE_H -- Looking for include files HAVE_SYS_FILE_H - found -- Looking for flock -- Looking for flock - found -- Looking for backtrace -- Looking for backtrace - found -- Looking for include files HAVE_REGEX_H -- Looking for include files HAVE_REGEX_H - found -- Looking for regexec -- Looking for regexec - found -- Found Tclsh: /usr/bin/tclsh -- Looking for include files NCURSESW_HEADERS -- Looking for include files NCURSESW_HEADERS - found -- Configuring done -- Generating done -- Build files have been written to: /***********/weechat-0.3.1.1/build
エラー出ているけど、前のバージョンでも同じエラーが出て、大きな問題は無かったから、先に進む。カラフルなメッセージとプログレスが表示されてmakeは終了。
$ make Scanning dependencies of target translations [ 0%] Generating PO template file [ 0%] Compiling locales (fr) [ 0%] Compiling locales (es) [ 0%] Compiling locales (cs) [ 0%] Compiling locales (hu) [ 0%] Compiling locales (de) [ 0%] Compiling locales (ru) [ 0%] Compiling locales (pl) [ 0%] Compiling locales (it) [ 8%] Built target translations Scanning dependencies of target weechat_core [ 9%] Building C object src/core/CMakeFiles/weechat_core.dir/weechat.o [ 10%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-backtrace.o [ 11%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-command.o [ 12%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-config.o [ 12%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-config-file.o [ 13%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-debug.o [ 14%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-hook.o [ 15%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-infolist.o [ 16%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-input.o [ 17%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-list.o [ 18%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-log.o [ 19%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-network.o [ 20%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-proxy.o [ 21%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-string.o [ 22%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-upgrade.o [ 23%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-upgrade-file.o [ 24%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-utf8.o [ 25%] Building C object src/core/CMakeFiles/weechat_core.dir/wee-util.o Linking C static library libweechat_core.a [ 25%] Built target weechat_core Scanning dependencies of target weechat_plugins [ 25%] Building C object src/plugins/CMakeFiles/weechat_plugins.dir/plugin.o [ 26%] Building C object src/plugins/CMakeFiles/weechat_plugins.dir/plugin-api.o [ 27%] Building C object src/plugins/CMakeFiles/weechat_plugins.dir/plugin-config.o Linking C static library libweechat_plugins.a [ 27%] Built target weechat_plugins Scanning dependencies of target alias [ 28%] Building C object src/plugins/alias/CMakeFiles/alias.dir/alias.o [ 29%] Building C object src/plugins/alias/CMakeFiles/alias.dir/alias-info.o Linking C shared module alias.so [ 29%] Built target alias Scanning dependencies of target aspell [ 30%] Building C object src/plugins/aspell/CMakeFiles/aspell.dir/weechat-aspell.o [ 31%] Building C object src/plugins/aspell/CMakeFiles/aspell.dir/weechat-aspell-config.o [ 32%] Building C object src/plugins/aspell/CMakeFiles/aspell.dir/weechat-aspell-speller.o Linking C shared module aspell.so [ 32%] Built target aspell Scanning dependencies of target charset [ 33%] Building C object src/plugins/charset/CMakeFiles/charset.dir/charset.o Linking C shared module charset.so [ 33%] Built target charset Scanning dependencies of target fifo [ 34%] Building C object src/plugins/fifo/CMakeFiles/fifo.dir/fifo.o [ 35%] Building C object src/plugins/fifo/CMakeFiles/fifo.dir/fifo-info.o Linking C shared module fifo.so [ 35%] Built target fifo Scanning dependencies of target irc [ 36%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc.o [ 37%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-bar-item.o [ 37%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-buffer.o [ 38%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-channel.o [ 39%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-color.o [ 40%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-command.o [ 41%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-completion.o [ 42%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-config.o [ 43%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-ctcp.o [ 44%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-debug.o [ 45%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-display.o [ 46%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-ignore.o [ 47%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-info.o [ 48%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-input.o [ 49%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-mode.o [ 50%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-msgbuffer.o [ 50%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-nick.o [ 51%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-protocol.o [ 52%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-raw.o [ 53%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-server.o [ 54%] Building C object src/plugins/irc/CMakeFiles/irc.dir/irc-upgrade.o Linking C shared module irc.so [ 54%] Built target irc Scanning dependencies of target logger [ 55%] Building C object src/plugins/logger/CMakeFiles/logger.dir/logger.o [ 56%] Building C object src/plugins/logger/CMakeFiles/logger.dir/logger-buffer.o [ 57%] Building C object src/plugins/logger/CMakeFiles/logger.dir/logger-config.o [ 58%] Building C object src/plugins/logger/CMakeFiles/logger.dir/logger-info.o [ 59%] Building C object src/plugins/logger/CMakeFiles/logger.dir/logger-tail.o Linking C shared module logger.so [ 59%] Built target logger Scanning dependencies of target weechat_scripts [ 60%] Building C object src/plugins/scripts/CMakeFiles/weechat_scripts.dir/script.o [ 61%] Building C object src/plugins/scripts/CMakeFiles/weechat_scripts.dir/script-callback.o [ 62%] Building C object src/plugins/scripts/CMakeFiles/weechat_scripts.dir/script-api.o Linking C static library libweechat_scripts.a [ 62%] Built target weechat_scripts Scanning dependencies of target perl [ 62%] Building C object src/plugins/scripts/perl/CMakeFiles/perl.dir/weechat-perl.o [ 63%] Building C object src/plugins/scripts/perl/CMakeFiles/perl.dir/weechat-perl-api.o Linking C shared module perl.so [ 63%] Built target perl Scanning dependencies of target python [ 64%] Building C object src/plugins/scripts/python/CMakeFiles/python.dir/weechat-python.o [ 65%] Building C object src/plugins/scripts/python/CMakeFiles/python.dir/weechat-python-api.o Linking C shared module python.so [ 65%] Built target python Scanning dependencies of target ruby [ 66%] Building C object src/plugins/scripts/ruby/CMakeFiles/ruby.dir/weechat-ruby.o [ 67%] Building C object src/plugins/scripts/ruby/CMakeFiles/ruby.dir/weechat-ruby-api.o Linking C shared module ruby.so [ 67%] Built target ruby Scanning dependencies of target lua [ 68%] Building C object src/plugins/scripts/lua/CMakeFiles/lua.dir/weechat-lua.o [ 69%] Building C object src/plugins/scripts/lua/CMakeFiles/lua.dir/weechat-lua-api.o Linking C shared module lua.so [ 69%] Built target lua Scanning dependencies of target xfer [ 70%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer.o [ 71%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-buffer.o [ 72%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-chat.o [ 73%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-command.o [ 74%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-completion.o [ 75%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-config.o [ 75%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-dcc.o [ 76%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-file.o [ 77%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-info.o [ 78%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-network.o [ 79%] Building C object src/plugins/xfer/CMakeFiles/xfer.dir/xfer-upgrade.o Linking C shared module xfer.so [ 79%] Built target xfer Scanning dependencies of target weechat_gui_common [ 80%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-bar.o [ 81%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-bar-item.o [ 82%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-bar-window.o [ 83%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-buffer.o [ 84%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-chat.o [ 85%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-color.o [ 86%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-filter.o [ 87%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-completion.o [ 87%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-history.o [ 88%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-hotlist.o [ 89%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-input.o [ 90%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-keyboard.o [ 91%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-layout.o [ 92%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-line.o [ 93%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-nicklist.o [ 94%] Building C object src/gui/CMakeFiles/weechat_gui_common.dir/gui-window.o Linking C static library libweechat_gui_common.a [ 94%] Built target weechat_gui_common Scanning dependencies of target weechat-curses [ 95%] Building C object src/gui/curses/CMakeFiles/weechat-curses.dir/gui-curses-bar-window.o [ 96%] Building C object src/gui/curses/CMakeFiles/weechat-curses.dir/gui-curses-chat.o [ 97%] Building C object src/gui/curses/CMakeFiles/weechat-curses.dir/gui-curses-color.o [ 98%] Building C object src/gui/curses/CMakeFiles/weechat-curses.dir/gui-curses-keyboard.o [ 99%] Building C object src/gui/curses/CMakeFiles/weechat-curses.dir/gui-curses-main.o [100%] Building C object src/gui/curses/CMakeFiles/weechat-curses.dir/gui-curses-window.o Linking C executable weechat-curses [100%] Built target weechat-curses
rootになって、インストール作業を行う。
$ su Password: # make install [ 8%] Built target translations [ 25%] Built target weechat_core [ 27%] Built target weechat_plugins [ 29%] Built target alias [ 32%] Built target aspell [ 33%] Built target charset [ 35%] Built target fifo [ 54%] Built target irc [ 59%] Built target logger [ 62%] Built target weechat_scripts [ 63%] Built target perl [ 65%] Built target python [ 67%] Built target ruby [ 69%] Built target lua [ 79%] Built target xfer [ 94%] Built target weechat_gui_common [100%] Built target weechat-curses Install the project... -- Install configuration: "Debug" -- Installing: /usr/local/lib/weechat/../pkgconfig/weechat.pc -- Installing: /usr/local/share/locale/fr/LC_MESSAGES/weechat.mo -- Installing: /usr/local/share/locale/es/LC_MESSAGES/weechat.mo -- Installing: /usr/local/share/locale/cs/LC_MESSAGES/weechat.mo -- Installing: /usr/local/share/locale/hu/LC_MESSAGES/weechat.mo -- Installing: /usr/local/share/locale/de/LC_MESSAGES/weechat.mo -- Installing: /usr/local/share/locale/ru/LC_MESSAGES/weechat.mo -- Installing: /usr/local/share/locale/pl/LC_MESSAGES/weechat.mo -- Installing: /usr/local/share/locale/it/LC_MESSAGES/weechat.mo -- Installing: /usr/local/include/weechat/weechat-plugin.h -- Installing: /usr/local/lib/weechat/plugins/alias.so -- Installing: /usr/local/lib/weechat/plugins/aspell.so -- Installing: /usr/local/lib/weechat/plugins/charset.so -- Installing: /usr/local/lib/weechat/plugins/fifo.so -- Installing: /usr/local/lib/weechat/plugins/irc.so -- Installing: /usr/local/lib/weechat/plugins/logger.so -- Installing: /usr/local/lib/weechat/plugins/perl.so -- Installing: /usr/local/lib/weechat/plugins/python.so -- Installing: /usr/local/lib/weechat/plugins/ruby.so -- Installing: /usr/local/lib/weechat/plugins/lua.so -- Installing: /usr/local/lib/weechat/plugins/xfer.so -- Installing: /usr/local/bin/weechat-curses -- Installing: /usr/local/share/man/man1/weechat-curses.1 # exit
これでバイナリファイルのアップグレードは終了。次は起動中のweechat(古いバージョン)を終了させないでアップデートする。まずは起動中のweechatのバージョンチェックと、upgradeコマンドのhelpを確認。
/version WeeChat 0.3.1 [compiled on Jan 23 2010 23:37:47] /help upgrade [core] /upgrade [path_to_binary] upgrade WeeChat without disconnecting from servers path_to_binary: path to WeeChat binary (default is current binary) This command run again a WeeChat binary, so it should have been compiled or installed with a package manager before running this command.
どうやら起動したいバイナリのパスが必要らしいのでチェックする。2つある。上は今アップデートしたもの、下はaptitudeで導入されたもの。ダブルチェックのために更新日時を確認。
$ which -a weechat-curses /usr/local/bin/weechat-curses /usr/bin/weechat-curses $ ls -la /usr/local/bin/weechat-curses -rwxr-xr-x 1 root staff 1225310 2010-03-27 19:32 /usr/local/bin/weechat-curses
アップデートされたweechatのパスがわかったところで、/upgradeコマンドを叩く。確かに接続を切らずにアップグレードされた。アップグレード前に読み込んでいたスクリプトは全てunloadされるようなので、再度読み込みが必要。
/upgrade /usr/local/bin/weechat-curses Upgrading WeeChat with binary file: "/usr/local/bin/weechat-curses"... ___ __ ______________ _____ __ | / /___________ ____/__ /_______ __ /_ __ | /| / /_ _ \ _ \ / __ __ \ __ `/ __/ __ |/ |/ / / __/ __/ /___ _ / / / /_/ // /_ ____/|__/ \___/\___/\____/ /_/ /_/\__,_/ \__/ Welcome to WeeChat, the geekiest chat client! WeeChat 0.3.1.1 [compiled on Mar 27 2010 19:29:20] Upgraded 1 time, first start: Thu Mar 25 23:46:57 2010 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Plugins loaded: alias, aspell, charset, fifo, irc, logger, lua, perl, python, ruby, xfer