cloudflare / homebrew-cloudflare

97 stars 39 forks source link

How to prevent brew uninstall Cloudflare http3 curl when doing brew upgrade #35

Closed zoonderkins closed 11 months ago

zoonderkins commented 2 years ago

Hi,

I'm using command below to install curl to support http3

> brew remove -f curl
> curl -O https://raw.githubusercontent.com/cloudflare/homebrew-cloudflare/master/curl.rb

When doing brew upgrade, it reinstall back to normal Mac curl.

junhochoi commented 2 years ago

Can you try brew pin curl?

cj-scott-prive commented 1 year ago

@junhochoi Thanks - can confirm brew pin curl works.

Q: Can we get your suggestion added to Cloudflare's HTTP3-Curl tutorial? That document used to be hosted at: https://developers.cloudflare.com/http3/tutorials/curl-brew ..

... if the docs were deleted and "never coming back", confirmation would still be very helpful (as people are looking for them). For example, it might be the page location changed and there's no redirect so could I be mistakenly assuming it was deleted? TY

In any case, this Issue seems ripe to close. Cheers.

zoonderkins commented 1 year ago

Hi I got this error on Mac M2 Mbpr, Ventura 13.4.1

❯ brew install --build-from-source ./curl.rb
Error: Failed to load cask: ./curl.rb
Cask 'curl' is unreadable: wrong constant name #<Class:0x0000000150476ef8>
Warning: Treating ./curl.rb as a formula.
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################# 100.0%
==> Fetching curl
==> Cloning https://github.com/cloudflare/quiche.git
Cloning into '/Users/edwardoo/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/edwardoo/Library/Caches/Homebrew/curl--quiche--git/quiche/deps/boringssl'...
Submodule path 'quiche/deps/boringssl': checked out 'f1c75347daa2ea81a941e953f2263e0a4d970c8d'
/Users/edwardoo/Library/Caches/Homebrew/curl--quiche--git/quiche/deps/boringssl
==> Downloading https://curl.se/download/curl-7.81.0.tar.bz2
############################################################################################# 100.0%
Warning: curl 8.1.2_1 is available and more recent than version 7.81.0.
==> Downloading https://formulae.brew.sh/api/formula.jws.json
##O=#  #
==> cargo build --release --package=quiche --features=ffi,pkg-config-meta,qlog
==> ./configure --prefix=/opt/homebrew/Cellar/curl/7.81.0 --with-ssl=/private/tmp/curl-20230704-2703
==> make install
Last 15 lines from /Users/edwardoo/Library/Logs/Homebrew/curl/03.make:
                                                                    ^
/private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/include/quiche.h:269:14: note: 'quiche_connect' declared here
quiche_conn *quiche_connect(const char *server_name,
             ^
1 error generated.
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/libssh2/1.11.0_1/include -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/rtmpdump/2.4+20151223_2/include -isystem /opt/homebrew/Cellar/libidn2/2.3.4_1/include -isystem /opt/homebrew/Cellar/libnghttp2/1.54.0/include -isystem /private/tmp/curl-20230704-2703-14452wn/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
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-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/libssh2/1.11.0_1/include -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/rtmpdump/2.4+20151223_2/include -isystem /opt/homebrew/Cellar/libidn2/2.3.4_1/include -isystem /opt/homebrew/Cellar/libnghttp2/1.54.0/include -isystem /private/tmp/curl-20230704-2703-14452wn/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-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/libssh2/1.11.0_1/include -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/rtmpdump/2.4+20151223_2/include -isystem /opt/homebrew/Cellar/libidn2/2.3.4_1/include -isystem /opt/homebrew/Cellar/libnghttp2/1.54.0/include -isystem /private/tmp/curl-20230704-2703-14452wn/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-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/libssh2/1.11.0_1/include -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/rtmpdump/2.4+20151223_2/include -isystem /opt/homebrew/Cellar/libidn2/2.3.4_1/include -isystem /opt/homebrew/Cellar/libnghttp2/1.54.0/include -isystem /private/tmp/curl-20230704-2703-14452wn/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-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/libssh2/1.11.0_1/include -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/rtmpdump/2.4+20151223_2/include -isystem /opt/homebrew/Cellar/libidn2/2.3.4_1/include -isystem /opt/homebrew/Cellar/libnghttp2/1.54.0/include -isystem /private/tmp/curl-20230704-2703-14452wn/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-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/libssh2/1.11.0_1/include -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/rtmpdump/2.4+20151223_2/include -isystem /opt/homebrew/Cellar/libidn2/2.3.4_1/include -isystem /opt/homebrew/Cellar/libnghttp2/1.54.0/include -isystem /private/tmp/curl-20230704-2703-14452wn/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
libtool: compile:  clang -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -isystem /usr/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include -isystem /private/tmp/curl-20230704-2703-14452wn/curl-7.81.0/quiche/quiche/deps/boringssl/src/include/openssl -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/libssh2/1.11.0_1/include -isystem /opt/homebrew/Cellar/openssl@3/3.1.1_1/include -isystem /opt/homebrew/Cellar/rtmpdump/2.4+20151223_2/include -isystem /opt/homebrew/Cellar/libidn2/2.3.4_1/include -isystem /opt/homebrew/Cellar/libnghttp2/1.54.0/include -isystem /private/tmp/curl-20230704-2703-14452wn/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
make: *** [install-recursive] Error 1
GwynethLlewelyn commented 1 year ago

@zoonderkins have you tried with a more recent version of homebrew-cloudflare? Your formula is still pulling 7.81.0, while (at the time of writing) 8.2.0 is out (and soon — hopefully! — so will 8.2.1, already released for 'mainline' curl).

Maybe that fixes the compilation for you — it seems that it's just getting an old header from 7.81.0 and therefore failing.