Skip to content

Instantly share code, notes, and snippets.

@zeroxia
Created April 30, 2022 14:43
Show Gist options
  • Save zeroxia/93b8c89d68afc40c0cf3a9969a631190 to your computer and use it in GitHub Desktop.
Save zeroxia/93b8c89d68afc40c0cf3a9969a631190 to your computer and use it in GitHub Desktop.
Build tmux with static linking

Build tmux with static linking

Documentation: https://github.com/tmux/tmux/wiki/Installing#building-dependencies

  1. Debian 11 (Bullseye), install:
apt install build-essential bison pkg-config libssl-dev
  1. libevent

Extract and cd into it.

#!/bin/sh
set -e
TARGETDIR=$HOME/.local \
    ./configure --prefix $TARGETDIR
make
make install
  1. ncurses

Extract and cd into it.

#!/bin/sh
set -e
TARGETDIR=$HOME/.local
./configure --prefix=$TARGETDIR --with-termlib --enable-pc-files \
            --with-pkg-config-libdir=$TARGETDIR/lib/pkgconfig \
            --with-default-terminfo-dir=/usr/share/terminfo \
            --with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo"
make
make install
  1. tmux

Extract and cd into it.

#!/bin/sh
set -e
TARGETDIR=$HOME/.local
PKG_CONFIG_PATH=$TARGETDIR/lib/pkgconfig \
    ./configure --enable-static --prefix=$TARGETDIR
make
make install
    
5. references
https://gist.github.com/mbreese/b0630195e57874c87ef3611d059d1bc2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment