-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to build a static nload binary ? #15
Comments
Hi! I had no success building this as a static binary using an You need to get the
This successfully built a statically linked binary. |
@paunstefan , #cd / #apt update && apt install make gcc-multilib build-essential automake -y && apt upgrade -y #git clone --recursive https://github.com/rolandriegel/nload.git #git clone --recursive https://github.com/mirror/ncurses.git #cd /ncurses #./configure #make #cd /nload #./run_autotools #CPPFLAGS=-I/ncurses/include LDFLAGS="-L/ncurses/lib -static" ./configure #make #cd /nload/src #./nload Error opening terminal: xterm. |
@quaggalinux Thanks to developers of Alpine linux (based on Run inside of Alpine: apk update && apk add git bash autoconf automake linux-headers build-base ncurses-dev ncurses-static
git clone https://github.com/berghetti/nload.git nload && cd nload
./run_autotools # no need to edit because of "apk add bash"
LDFLAGS="-static" ./configure --prefix=/opt/nload
make -j9 && make install
# To check static linking. Output may be little bit different depending on platform and other things...
file /opt/nload/bin/nload
/opt/nload/bin/nload: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped |
@flajr WOW! Today must a great day! Following is my procedure: I installed ubuntu-20.04.5-live-server-amd64.iso and then installed docker on ubuntu #docker pull alpine:latest #docker run -dit -p 2222:22 --name=ok -v /tmp:/tmp alpine #docker ps -a #docker attach e901a5205bc3 (e901a5205bc3 is alpine CONTAINER ID) #cd / #apk update && apk add git bash autoconf automake linux-headers build-base ncurses-dev ncurses-static #git clone https://github.com/rolandriegel/nload #cd /nload #./run_autotools #LDFLAGS="-static" ./configure --prefix=/opt/nload #make -j9 #cd src #cp nload /tmp/ #exit Finally I can copy the static nload executive file form ubuntu host's tmp directory. You are the Top Gun! |
@flajr Would you please take a look at project: I also open an issues "gdm85/iftop#3" asking help for static compile. Thank you! |
Hi,
Could you tell me how to build a static nload binary ?
Or, is there any parameters to make static nload binary ?
Thank you!
The text was updated successfully, but these errors were encountered: