stunnel/static-curl

Doesn't seem to work

hacktek opened this issue · 5 comments

This is what was run:

root@docker-ce-ubuntu-4gb-hel1-2:~/static-curl# docker run --rm -v $(pwd):/tmp -w /tmp -e ARCH=amd64 alpine /tmp/build.sh

Running on Ubuntu 22.04:

Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.2 LTS
Release:	22.04
Codename:	jammy

These are the final logs before it dies:

/bin/sh ../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H   -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DUNITTESTS -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include  -O3 -MT vquic/libcurlu_la-curl_ngtcp2.lo -MD -MP -MF vquic/.deps/libcurlu_la-curl_ngtcp2.Tpo -c -o vquic/libcurlu_la-curl_ngtcp2.lo `test -f 'vquic/curl_ngtcp2.c' || echo './'`vquic/curl_ngtcp2.c
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DUNITTESTS -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -isystem /opt/curl/include -O3 -MT vquic/libcurlu_la-curl_ngtcp2.lo -MD -MP -MF vquic/.deps/libcurlu_la-curl_ngtcp2.Tpo -c vquic/curl_ngtcp2.c  -fPIC -DPIC -o vquic/libcurlu_la-curl_ngtcp2.o
vquic/curl_ngtcp2.c:136:3: error: unknown type name 'ngtcp2_connection_close_error'
  ngtcp2_connection_close_error last_error;
  ^
vquic/curl_ngtcp2.c:656:5: warning: call to undeclared function 'ngtcp2_connection_close_error_set_application_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    ngtcp2_connection_close_error_set_application_error(
    ^
vquic/curl_ngtcp2.c:715:5: warning: call to undeclared function 'ngtcp2_connection_close_error_set_application_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    ngtcp2_connection_close_error_set_application_error(
    ^
vquic/curl_ngtcp2.c:1205:6: warning: call to undeclared function 'ngtcp2_conn_get_max_local_streams_uni'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  if(ngtcp2_conn_get_max_local_streams_uni(ctx->qconn) < 3) {
     ^
vquic/curl_ngtcp2.c:1820:11: warning: call to undeclared function 'ngtcp2_connection_close_error_set_transport_error_tls_alert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          ngtcp2_connection_close_error_set_transport_error_tls_alert(
          ^
vquic/curl_ngtcp2.c:1825:11: warning: call to undeclared function 'ngtcp2_connection_close_error_set_transport_error_liberr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          ngtcp2_connection_close_error_set_transport_error_liberr(
          ^
vquic/curl_ngtcp2.c:1878:5: warning: call to undeclared function 'ngtcp2_connection_close_error_set_transport_error_liberr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    ngtcp2_connection_close_error_set_transport_error_liberr(&ctx->last_error,
    ^
vquic/curl_ngtcp2.c:1907:9: warning: call to undeclared function 'ngtcp2_connection_close_error_set_application_error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        ngtcp2_connection_close_error_set_application_error(
        ^
vquic/curl_ngtcp2.c:1965:9: warning: call to undeclared function 'ngtcp2_connection_close_error_set_transport_error_liberr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        ngtcp2_connection_close_error_set_transport_error_liberr(
        ^
vquic/curl_ngtcp2.c:2280:3: warning: call to undeclared function 'ngtcp2_connection_close_error_default'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  ngtcp2_connection_close_error_default(&ctx->last_error);
  ^
9 warnings and 1 error generated.
make[2]: *** [Makefile:4320: vquic/libcurlu_la-curl_ngtcp2.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f vtls/.deps/libcurlu_la-openssl.Tpo vtls/.deps/libcurlu_la-openssl.Plo
mv -f vtls/.deps/libcurlu_la-vtls.Tpo vtls/.deps/libcurlu_la-vtls.Plo
make[2]: Leaving directory '/mnt/curl-8.0.1/lib'
make[1]: *** [Makefile:1482: all] Error 2
make[1]: Leaving directory '/mnt/curl-8.0.1/lib'
make: *** [Makefile:1256: all-recursive] Error 1

ngtcp2 change the names related to connection_close_error
ngtcp2/ngtcp2@363ebe5

I will add a parameter to bind the version soon.

I've updated the scripts and tested fine, please try again.

Thanks for the quick turnaround but I'm getting this now:

~/static-curl$ docker run --rm -v $(pwd):/mnt -w /mnt -e ARCH=amd64 alpine /mnt/build.sh
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/mnt/build.sh": permission denied: unknown.

EDIT: oops my bad, forgot to make it executable, d'oh!

EDIT 2: confirmed, working fine now! Thank you.

Thanks for your feedback.

@hacktek FYI. The latest curl v8.1.0 is now compatible with ngtcp2 v0.15.0, a specific ngtcp2 version is no longer required.