cli
cli copied to clipboard
version 3.2.1 is not real single-binary
Checklist
- [x] I've searched for similar issues.
- [x] I'm using the latest version of HTTPie.
Minimal reproduction code and steps
- download httpie 3.2.1 (latest httpie version) to centos7 machine
- run "./http"
Current result
Error loading Python lib '/tmp/_MEITUP865/libpython3.9.so.1.0': dlopen: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /tmp/_MEITUP865/libpython3.9.so.1.0)
…
Expected result
usage:
http [METHOD] URL [REQUEST_ITEM ...]
error:
the following arguments are required: URL
for more information:
run 'http --help' or visit https://httpie.io/docs/cli
it seems that httpie still rely on libpython3.9.so, and libpython3.9.so rely on specific glibc version.
It's not just httpie 3.2.1.
Tried other versions on docker's busybox:1.35.0 (uclibc, "has no python") and the same happened:
docker run --rm -it busybox:1.35.0
cd /tmp
rm *
touch 3.1.0 3.2.0 3.2.1
find * -type f -print -exec wget -O http-{} https://github.com/httpie/httpie/releases/download/{}/http \;
chmod +x http-*
find . -name "http*" -print -exec sh -c "{} --version" \;
# ./http-3.2.0
# sh: ./http-3.2.0: not found
# ./http-3.2.1
# sh: ./http-3.2.1: not found
# ./http-3.1.0
# sh: ./http-3.1.0: not found
It was never statically linked. ~Would building it with something like CGO_ENABLED=0 go build -static
solve it?
Doing it may bloat the final binary, right?~
-- EDIT -- Just noticed it's not a go project 😅