Subscribed unsubscribe Subscribe Subscribe

目の前に僕らの道がある

勉強会とか、技術的にはまったことのメモ

Debian Lennyにtmuxをインストールする。

過去に似たような記事書いたけど、はまったので、もう一度。

今更lennyかよとか石投げないで、大人の事情があるの。。。

lennyのlibeventは古いので自前でビルドします。一応32bitです。イマドキ32bitかよと石投げないで(ry

# libeventのビルド
mkdir -p ~/tmp
cd ~/tmp
# バージョンはそのときどきで
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar xvfz libevent-2.0.21-stable.tar.gz 
cd libevent-2.0.21-stable
./configure 
make
make verify
sudo make install 
sudo ldconfig

# ncuresesが必要なの
sudo aptitude install libncurses5-dev

# tmuxのビルド
cd ~/tmp
wget "http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.7/tmux-1.7.tar.gz"
tar xvfz tmux-1.7.tar.gz
cd tmux-1.7/
./configure
make
sudo make install

はまりどころ

libncurses5-devが入ってないとtmuxのconfigureがこける

configure: error: "curses not found"

lenny標準パッケージのlibevent-devを入れているとtmuxのビルドがこける

cc -L/usr/local/lib -o tmux attributes.o cfg.o client.o clock.o cmd-attach-session.o cmd-bind-key.o cmd-break-pane.o cmd-capture-pane.o cmd-choose-buffer.o cmd-choose-client.o cmd-choose-session.o cmd-choose-window.o cmd-clear-history.o cmd-clock-mode.o cmd-command-prompt.o cmd-confirm-before.o cmd-copy-buffer.o cmd-copy-mode.o cmd-delete-buffer.o cmd-detach-client.o cmd-display-message.o cmd-display-panes.o cmd-find-window.o cmd-generic.o cmd-has-session.o cmd-if-shell.o cmd-join-pane.o cmd-kill-pane.o cmd-kill-server.o cmd-kill-session.o cmd-kill-window.o cmd-last-pane.o cmd-last-window.o cmd-link-window.o cmd-list-buffers.o cmd-list-clients.o cmd-list-commands.o cmd-list-keys.o cmd-list-panes.o cmd-list-sessions.o cmd-list-windows.o cmd-list.o cmd-load-buffer.o cmd-lock-client.o cmd-lock-server.o cmd-lock-session.o cmd-move-window.o cmd-new-session.o cmd-new-window.o cmd-next-layout.o cmd-next-window.o cmd-paste-buffer.o cmd-pipe-pane.o cmd-previous-layout.o cmd-previous-window.o cmd-refresh-client.o cmd-rename-session.o cmd-rename-window.o cmd-resize-pane.o cmd-respawn-window.o cmd-rotate-window.o cmd-run-shell.o cmd-save-buffer.o cmd-select-layout.o cmd-select-pane.o cmd-select-window.o cmd-send-keys.o cmd-send-prefix.o cmd-server-info.o cmd-set-buffer.o cmd-set-environment.o cmd-set-option.o cmd-set-window-option.o cmd-show-buffer.o cmd-show-environment.o cmd-show-messages.o cmd-show-options.o cmd-show-window-options.o cmd-source-file.o cmd-split-window.o cmd-start-server.o cmd-string.o cmd-suspend-client.o cmd-swap-pane.o cmd-swap-window.o cmd-switch-client.o cmd-unbind-key.o cmd-unlink-window.o cmd.o colour.o environ.o grid-utf8.o grid-view.o grid.o input-keys.o input.o job.o key-bindings.o key-string.o layout-custom.o layout-set.o layout-string.o layout.o log.o mode-key.o names.o options.o paste.o resize.o screen-redraw.o screen-write.o screen.o server-client.o server-fn.o server-window.o server.o session.o signal.o status.o tmux.o tty-acs.o tty-keys.o tty-term.o tty.o utf8.o window-choose.o window-clock.o window-copy.o window.o xmalloc.o xterm-keys.o osdep-linux.o compat/closefrom.o compat/fgetln.o compat/strlcat.o compat/strlcpy.o compat/strtonum.o compat/getopt.o compat/vis.o compat/unvis.o compat/imsg-buffer.o compat/imsg.o  -lncurses -lutil -levent -lrt
server.o: In function `server_start':
server.c:(.text+0x2b9): undefined reference to `event_reinit'
collect2: ld returned 1 exit status
make: *** [tmux] エラー 1

libeventをビルドした後にmake clean; ./configureしてMakefileを更新しないとtmuxのビルドがこける

gcc  -D_GNU_SOURCE -std=c99      -o tmux arguments.o attributes.o cfg.o client.o clock.o cmd-attach-session.o cmd-bind-key.o cmd-break-pane.o cmd-capture-pane.o cmd-choose-buffer.o cmd-choose-client.o cmd-choose-list.o cmd-choose-tree.o cmd-clear-history.o cmd-clock-mode.o cmd-command-prompt.o cmd-confirm-before.o cmd-copy-mode.o cmd-delete-buffer.o cmd-detach-client.o cmd-display-message.o cmd-display-panes.o cmd-find-window.o cmd-has-session.o cmd-if-shell.o cmd-join-pane.o cmd-kill-pane.o cmd-kill-server.o cmd-kill-session.o cmd-kill-window.o cmd-link-window.o cmd-list-buffers.o cmd-list-clients.o cmd-list-commands.o cmd-list-keys.o cmd-list-panes.o cmd-list-sessions.o cmd-list-windows.o cmd-list.o cmd-load-buffer.o cmd-lock-server.o cmd-move-window.o cmd-new-session.o cmd-new-window.o cmd-paste-buffer.o cmd-pipe-pane.o cmd-refresh-client.o cmd-rename-session.o cmd-rename-window.o cmd-resize-pane.o cmd-respawn-pane.o cmd-respawn-window.o cmd-rotate-window.o cmd-run-shell.o cmd-save-buffer.o cmd-select-layout.o cmd-select-pane.o cmd-select-window.o cmd-send-keys.o cmd-send-prefix.o cmd-server-info.o cmd-set-buffer.o cmd-set-environment.o cmd-set-option.o cmd-show-buffer.o cmd-show-environment.o cmd-show-messages.o cmd-show-options.o cmd-source-file.o cmd-split-window.o cmd-start-server.o cmd-string.o cmd-suspend-client.o cmd-swap-pane.o cmd-swap-window.o cmd-switch-client.o cmd-unbind-key.o cmd-unlink-window.o cmd.o colour.o control.o control-notify.o environ.o format.o grid-utf8.o grid-view.o grid.o input-keys.o input.o job.o key-bindings.o key-string.o layout-custom.o layout-set.o layout.o log.o mode-key.o names.o notify.o options-table.o options.o paste.o resize.o screen-redraw.o screen-write.o screen.o server-client.o server-fn.o server-window.o server.o session.o signal.o status.o tmux.o tty-acs.o tty-keys.o tty-term.o tty.o utf8.o window-choose.o window-clock.o window-copy.o window.o xmalloc.o xterm-keys.o osdep-linux.o  imsg.o imsg-buffer.o closefrom.o   strlcat.o strlcpy.o  fgetln.o getopt.o   vis.o unvis.o strtonum.o   -lutil -lcurses -levent -lrt
tty.o: In function `tty_cmd_setselection':
tty.c:(.text+0x28fb): undefined reference to `__b64_ntop'
collect2: ld returned 1 exit status
make: *** [tmux] エラー 1





squeezeに上げたい。。