moparisthebest / static-curl

fully static builds of curl, runs anywhere
https://code.moparisthebest.com/moparisthebest/static-curl
MIT License
497 stars 30 forks source link

Can you provide s390x support on it #15

Open modassarrana89 opened 2 months ago

modassarrana89 commented 2 months ago

it is building for multi-architecture , but not for s390x. May i know the reason behind it . I have triggered build.sh for s390x & it seems working fine. I have not pasted the complete output , just a small part for your reference

[root@m1305001 static-curl]# podman run --rm -v $(pwd):/tmp -w /tmp -e ARCH=s390x alpine /tmp/build.sh
Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/alpine:latest...
Getting image source signatures
Copying blob eb8fba61d864 done  
Copying config 8fc740d8c4 done  
Writing manifest to image destination
+ '[' '!' -f curl-8.7.1.tar.gz ]
+ apk add gnupg
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/s390x/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/s390x/APKINDEX.tar.gz
(1/32) Installing libgpg-error (1.47-r2)
(2/32) Installing libassuan (2.5.6-r1)
(3/32) Installing ncurses-terminfo-base (6.4_p20231125-r0)
(4/32) Installing libncursesw (6.4_p20231125-r0)
(5/32) Installing pinentry (1.2.1-r1)
Executing pinentry-1.2.1-r1.post-install
(6/32) Installing libgcrypt (1.10.3-r0)
(7/32) Installing gnupg-gpgconf (2.4.4-r0)
(8/32) Installing gmp (6.3.0-r0)
(9/32) Installing nettle (3.9.1-r0)
(10/32) Installing libunistring (1.1-r2)
(11/32) Installing libidn2 (2.3.4-r4)
...
...
/bin/sh ../libtool  --tag=CC   --mode=link clang  -Qunused-arguments -O2 -Wno-pointer-bool-conversion    -static -all-static -o curl slist_wc.o tool_binmode.o tool_bname.o tool_cb_dbg.o tool_cb_hdr.o tool_cb_prg.o tool_cb_rea.o tool_cb_see.o tool_cb_wrt.o tool_cfgable.o tool_dirhie.o tool_doswin.o tool_easysrc.o tool_filetime.o tool_findfile.o tool_formparse.o tool_getparam.o tool_getpass.o tool_help.o tool_helpers.o tool_hugehelp.o tool_ipfs.o tool_libinfo.o tool_listhelp.o tool_main.o tool_msgs.o tool_operate.o tool_operhlp.o tool_paramhlp.o tool_parsecfg.o tool_progress.o tool_setopt.o tool_sleep.o tool_stderr.o tool_strdup.o tool_urlglob.o tool_util.o tool_vms.o tool_writeout.o tool_writeout_json.o tool_xattr.o var.o ../lib/base64.o ../lib/curl_multibyte.o ../lib/dynbuf.o ../lib/nonblock.o ../lib/strtoofft.o ../lib/timediff.o ../lib/version_win32.o ../lib/warnless.o   ../lib/libcurl.la -lnghttp2 -lssh2 -lssh2 -lssl -lcrypto -lssl -lssl -lcrypto -ldl -lz -lssl -lcrypto -lssl -lcrypto -ldl -pthread -lcrypto -ldl -pthread -lz 
libtool: link: clang -Qunused-arguments -O2 -Wno-pointer-bool-conversion -static -o curl slist_wc.o tool_binmode.o tool_bname.o tool_cb_dbg.o tool_cb_hdr.o tool_cb_prg.o tool_cb_rea.o tool_cb_see.o tool_cb_wrt.o tool_cfgable.o tool_dirhie.o tool_doswin.o tool_easysrc.o tool_filetime.o tool_findfile.o tool_formparse.o tool_getparam.o tool_getpass.o tool_help.o tool_helpers.o tool_hugehelp.o tool_ipfs.o tool_libinfo.o tool_listhelp.o tool_main.o tool_msgs.o tool_operate.o tool_operhlp.o tool_paramhlp.o tool_parsecfg.o tool_progress.o tool_setopt.o tool_sleep.o tool_stderr.o tool_strdup.o tool_urlglob.o tool_util.o tool_vms.o tool_writeout.o tool_writeout_json.o tool_xattr.o var.o ../lib/base64.o ../lib/curl_multibyte.o ../lib/dynbuf.o ../lib/nonblock.o ../lib/strtoofft.o ../lib/timediff.o ../lib/version_win32.o ../lib/warnless.o  ../lib/.libs/libcurl.a -lnghttp2 -lssh2 -lssl -lcrypto -ldl -lz -pthread
make[2]: Leaving directory '/tmp/curl-8.7.1/src'
make[1]: Leaving directory '/tmp/curl-8.7.1/src'
Making all in scripts
make[1]: Entering directory '/tmp/curl-8.7.1/scripts'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/tmp/curl-8.7.1/scripts'
make[1]: Entering directory '/tmp/curl-8.7.1'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/tmp/curl-8.7.1'
+ strip src/curl
+ ls -lah src/curl
-rwxr-xr-x    1 root     root        4.5M Apr 30 08:25 src/curl
+ file src/curl
src/curl: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, BuildID[sha1]=2a0463253b44bbbcfb8d2b1571521c6d41cb4d36, stripped
+ ldd src/curl
/lib/ld-musl-s390x.so.1: src/curl: Not a valid dynamic program
+ true
+ ./src/curl -V
curl 8.7.1 (s390x-ibm-linux-musl) libcurl/8.7.1 OpenSSL/3.1.4 zlib/1.3.1 libssh2/1.11.0 nghttp2/1.58.0
Release-Date: 2024-03-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets
+ mkdir -p /tmp/release/
+ mv src/curl /tmp/release/curl-s390x
+ cd ..
+ rm -rf curl-8.7.1/
modassarrana89 commented 2 months ago

Verified curl command output on s390x architecture as shown below

[root@m1305001 ~]# ./static-curl/release/curl-s390x -V
curl 8.7.1 (s390x-ibm-linux-musl) libcurl/8.7.1 OpenSSL/3.1.4 zlib/1.3.1 libssh2/1.11.0 nghttp2/1.58.0
Release-Date: 2024-03-27
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets