Skip to content

cloudflare-quiche 0.22.0 #175706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

@github-actions github-actions bot added rust Rust use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Jun 26, 2024
@chenrui333
Copy link
Member

chenrui333 commented Jun 26, 2024

  ==> ./test
  dyld[13973]: Library not loaded: /opt/homebrew/opt/cloudflare-quiche/lib/libquiche.0.22.0.dylib
    Referenced from: <496810F1-BA70-3C4C-AF28-E3F3015BEA9A> /private/tmp/cloudflare-quiche-test-20240626-13958-qrdomu/test
    Reason: tried: '/opt/homebrew/opt/cloudflare-quiche/lib/libquiche.0.22.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/cloudflare-quiche/lib/libquiche.0.22.0.dylib' (no such file), '/opt/homebrew/opt/cloudflare-quiche/lib/libquiche.0.22.0.dylib' (no such file), '/usr/local/lib/libquiche.0.22.0.dylib' (no such file), '/usr/lib/libquiche.0.22.0.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/cloudflare-quiche/0.22.0/lib/libquiche.0.22.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/cloudflare-quiche/0.22.0/lib/libquiche.0.22.0.dylib' (no such file), '/opt/homebrew/Cellar/cloudflare-quiche/0.22.0/lib/libquiche.0.22.0.dylib' (no such file), '/usr/local/lib/libquiche.0.22.0.dylib' (no such file), '/usr/lib/libquiche.0.22.0.dylib' (no such file, not in dyld cache)
  Error: cloudflare-quiche: failed

@chenrui333 chenrui333 added test failure CI fails while running the test-do block CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. labels Jun 26, 2024
@Bo98
Copy link
Member

Bo98 commented Jun 26, 2024

The lib.install line probably needs updating, probably something like shared_library("libquiche", "*")

@chenrui333
Copy link
Member

I actually did not see the artifact tree difference between the two versions (diff). Gonna ask in the upstream.

@junhochoi
Copy link
Contributor

Looks like related to cloudflare/quiche#1769
The following works for me.

diff --git a/Formula/c/cloudflare-quiche.rb b/Formula/c/cloudflare-quiche.rb
index 097061d2e69..a9decd920dc 100644
--- a/Formula/c/cloudflare-quiche.rb
+++ b/Formula/c/cloudflare-quiche.rb
@@ -25,6 +25,7 @@ class CloudflareQuiche < Formula

     system "cargo", "build", "--lib", "--features", "ffi,pkg-config-meta", "--release"
     lib.install "target/release/#{shared_library("libquiche")}"
+    MachO::Tools.change_dylib_id("#{lib}/libquiche.dylib", "#{lib}/libquiche.dylib") if OS.mac?
     include.install "quiche/include/quiche.h"

     # install pkgconfig file

@Bo98
Copy link
Member

Bo98 commented Jun 27, 2024

We do want to install sonames though rather than disable it.

Are they missing from target/release or something? I've not tested this out locally yet.

@Bo98
Copy link
Member

Bo98 commented Jun 27, 2024

Or does that PR just create the soname reference but not actually create the files/symlinks proper?
I guess we could do it manually on our side though is a bit awkward.

You usually have a libname.MAJOR.dylib (sometimes minor too depending on your ABI stability policy) and then symlinks from libname.dylib to that.

Relatedly: does upstream have a SOVERSION policy of when ABI breaks? Is it only on major versions or is it every version? It's a bit unclear given it's 0.x. The PR you link mentions .0 but it is clearly trying the full version on macOS 0.22.0 which seems like an extremely unstable ABI.

@junhochoi
Copy link
Contributor

junhochoi commented Jun 27, 2024

To keep the version, this works for me (I added a full version here)

diff --git a/Formula/c/cloudflare-quiche.rb b/Formula/c/cloudflare-quiche.rb
index 097061d2e69..732cb19af24 100644
--- a/Formula/c/cloudflare-quiche.rb
+++ b/Formula/c/cloudflare-quiche.rb
@@ -25,6 +25,7 @@ class CloudflareQuiche < Formula

     system "cargo", "build", "--lib", "--features", "ffi,pkg-config-meta", "--release"
     lib.install "target/release/#{shared_library("libquiche")}"
+    lib.install_symlink "#{lib}/libquiche.dylib" => "#{lib}/libquiche.#{version.major_minor_patch}.dylib"
     include.install "quiche/include/quiche.h"

     # install pkgconfig file

My understanding is that rust doesn't generate soname when it generates library (rust-lang/cargo#5045), so currently it's up to the developer to add/symlink properly when rust-based so (or dylib) is installed.

AFAICT quiche doesn't have a stable ABI version policy yet (since it's 0.x) and release note mentions when it breaks...

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a help wanted or in progress label.

@github-actions github-actions bot added the stale No recent activity label Jun 29, 2024
@github-actions github-actions bot closed this Jul 1, 2024
@p-linnane p-linnane deleted the bump-cloudflare-quiche-0.22.0 branch July 3, 2024 16:24
@chenrui333
Copy link
Member

#176665

@chenrui333 chenrui333 added the superseded PR was replaced by another PR label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. rust Rust use is a significant feature of the PR or issue stale No recent activity superseded PR was replaced by another PR test failure CI fails while running the test-do block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants