cloudflare / homebrew-cloudflare

99 stars 41 forks source link

MacOS brew install curl fails at vquic/libcurl_la-quiche.lo #57

Closed schmidtpatrick closed 1 year ago

schmidtpatrick commented 1 year ago

I wanted to try curl with http/3 with Environment: ProductName: macOS ProductVersion: 13.2 X86_64 Homebrew 3.6.21 Homebrew/homebrew-core (git revision 9b987d9af4b; last commit 2023-02-08) Homebrew/homebrew-cask (git revision 62abbfc945; last commit 2023-02-08)

Any hint? Here we go:

$ brew install cloudflare/homebrew-cloudflare/curl
==> Fetching cloudflare/cloudflare/curl
==> Cloning https://github.com/cloudflare/quiche.git
Cloning into '/Users/user/Library/Caches/Homebrew/curl--quiche--git'...
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
Submodule 'boringssl' (https://github.com/google/boringssl.git) registered for path 'quiche/deps/boringssl'
Cloning into '/Users/user/Library/Caches/Homebrew/curl--quiche--git/quiche/deps/boringssl'...
Submodule path 'quiche/deps/boringssl': checked out 'f1c75347daa2ea81a941e953f2263e0a4d970c8d'
/Users/userLibrary/Caches/Homebrew/curl--quiche--git/quiche/deps/boringssl
==> Downloading https://curl.se/download/curl-7.81.0.tar.bz2
######################################################################## 100.0%
==> Reinstalling cloudflare/cloudflare/curl
==> cargo build --release --package=quiche --features=ffi,pkg-config-meta,qlog
==> ./configure --prefix=/usr/local/Cellar/curl/7.81.0 --with-ssl=/private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/
==> make install
Last 15 lines from /Users/user/Library/Logs/Homebrew/curl/03.make:
                                                                    ^
/private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/include/quiche.h:257:14: note: 'quiche_connect' declared here
quiche_conn *quiche_connect(const char *server_name,
             ^
1 error generated.
make[1]: *** [vquic/libcurl_la-quiche.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/libssh2/1.10.0/include -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/rtmpdump/2.4+20151223_1/include -isystem /usr/local/Cellar/libidn2/2.3.4_1/include -isystem /usr/local/Cellar/libnghttp2/1.51.0/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/include -fvisibility=hidden -Qunused-arguments -Wno-pointer-bool-conversion -Os -Werror=partial-availability -c vssh/libssh2.c  -fno-common -DPIC -o vssh/.libs/libcurl_la-libssh2.o
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/libssh2/1.10.0/include -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/rtmpdump/2.4+20151223_1/include -isystem /usr/local/Cellar/libidn2/2.3.4_1/include -isystem /usr/local/Cellar/libnghttp2/1.51.0/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/include -fvisibility=hidden -Qunused-arguments -Wno-pointer-bool-conversion -Os -Werror=partial-availability -c vssh/libssh.c -o vssh/libcurl_la-libssh.o >/dev/null 2>&1
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/libssh2/1.10.0/include -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/rtmpdump/2.4+20151223_1/include -isystem /usr/local/Cellar/libidn2/2.3.4_1/include -isystem /usr/local/Cellar/libnghttp2/1.51.0/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/include -fvisibility=hidden -Qunused-arguments -Wno-pointer-bool-conversion -Os -Werror=partial-availability -c vquic/vquic.c -o vquic/libcurl_la-vquic.o >/dev/null 2>&1
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/libssh2/1.10.0/include -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/rtmpdump/2.4+20151223_1/include -isystem /usr/local/Cellar/libidn2/2.3.4_1/include -isystem /usr/local/Cellar/libnghttp2/1.51.0/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/include -fvisibility=hidden -Qunused-arguments -Wno-pointer-bool-conversion -Os -Werror=partial-availability -c vtls/vtls.c -o vtls/libcurl_la-vtls.o >/dev/null 2>&1
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/libssh2/1.10.0/include -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/rtmpdump/2.4+20151223_1/include -isystem /usr/local/Cellar/libidn2/2.3.4_1/include -isystem /usr/local/Cellar/libnghttp2/1.51.0/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/include -fvisibility=hidden -Qunused-arguments -Wno-pointer-bool-conversion -Os -Werror=partial-availability -c vtls/openssl.c -o vtls/libcurl_la-openssl.o >/dev/null 2>&1
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/libssh2/1.10.0/include -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/rtmpdump/2.4+20151223_1/include -isystem /usr/local/Cellar/libidn2/2.3.4_1/include -isystem /usr/local/Cellar/libnghttp2/1.51.0/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/include -fvisibility=hidden -Qunused-arguments -Wno-pointer-bool-conversion -Os -Werror=partial-availability -c vssh/libssh2.c -o vssh/libcurl_la-libssh2.o >/dev/null 2>&1
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/libssh2/1.10.0/include -isystem /usr/local/Cellar/openssl@1.1/1.1.1t/include -isystem /usr/local/Cellar/rtmpdump/2.4+20151223_1/include -isystem /usr/local/Cellar/libidn2/2.3.4_1/include -isystem /usr/local/Cellar/libnghttp2/1.51.0/include -isystem /private/tmp/curl-20230208-57936-1sgfjtm/curl-7.81.0/quiche/quiche/include -fvisibility=hidden -Qunused-arguments -Wno-pointer-bool-conversion -Os -Werror=partial-availability -c vtls/sectransp.c -o vtls/libcurl_la-sectransp.o >/dev/null 2>&1
make: *** [install-recursive] Error 1

Thank you

BirkhoffLee commented 1 year ago

I believe you should post /Users/user/Library/Logs/Homebrew/curl/03.make

schmidtpatrick commented 1 year ago

Hi @BirkhoffLee, thank you for reply.

i needed to start a rebuild

ProductName: macOS ProductVersion: 13.3 BuildVersion: 22E252 X86_64 Homebrew 4.0.11 Homebrew/homebrew-core (git revision db25ff891d0; last commit 2023-02-16) Homebrew/homebrew-cask (git revision ce33115a81; last commit 2023-02-16)

and same error message: ==> Reinstalling cloudflare/cloudflare/curl ==> Installing dependencies for cloudflare/cloudflare/curl: cmake and rust ==> Installing cloudflare/cloudflare/curl dependency: cmake ==> Pouring cmake--3.26.3.ventura.bottle.tar.gz 🍺 /usr/local/Cellar/cmake/3.26.3: 3,188 files, 49.8MB ==> Installing cloudflare/cloudflare/curl dependency: rust ==> Pouring rust--1.68.2.ventura.bottle.tar.gz 🍺 /usr/local/Cellar/rust/1.68.2: 36,096 files, 899.9MB ==> Installing cloudflare/cloudflare/curl ==> cargo build --release --package=quiche --features=ffi,pkg-config-meta,qlog ==> ./configure --prefix=/usr/local/Cellar/curl/7.81.0 --with-ssl=/private/tmp/curl-20230405-31706-abpzp3/curl-7.81.0/quiche/quiche/deps/boringssl/src --with-ca-fallback --with-secure-transport --with-default-ssl ==> make install Last 15 lines from /Users/user/Library/Logs/Homebrew/curl/03.make: sizeof(qs->scid), addr, addrlen, qs->cfg); ^ /private/tmp/curl-20230405-31706-abpzp3/curl-7.81.0/quiche/quiche/include/quiche.h:266:14: note: 'quiche_connect' declared here quiche_conn *quiche_connect(const char *server_name, ^ 1 error generated.

here we go: 03.make.txt

junhochoi commented 1 year ago

Can you try #62 ?

schmidtpatrick commented 1 year ago

Thank you @junhochoi , i modified /usr/local/Homebrew/Library/Taps/cloudflare/homebrew-cloudflare/curl.rb and it works for me

==> Reinstalling cloudflare/cloudflare/curl
==> cargo build --release --package=quiche --features=ffi,pkg-config-meta,qlog
==> ./configure --prefix=/usr/local/Cellar/curl/8.1.1 --with-ssl=/private/tmp/curl-20230530-66699-ogzaag/curl-8.1.1/quiche/quiche/deps/boringssl/src --with-ca-fallback --with-secure-t
==> make install
==> make install -C scripts
🍺  /usr/local/Cellar/curl/8.1.1: 510 files, 10MB, built in 7 minutes 8 seconds
==> Running `brew cleanup curl`...

[~] /usr/local/Cellar/curl/8.1.1/bin/curl -V
curl 8.1.1 (x86_64-apple-darwin22.5.0) libcurl/8.1.1 (SecureTransport) BoringSSL zlib/1.2.11 brotli/1.0.9 zstd/1.5.5 libidn2/2.3.4 libssh2/1.10.0 nghttp2/1.53.0 quiche/0.17.2 librtmp/2.3
Release-Date: 2023-05-23
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets zstd
junhochoi commented 1 year ago

62 is merged now. you may want to test it again (there was a version bump)