Skip to content

Commit 00b93fe

Browse files
authored
Merge pull request #251628 from Homebrew/podman-arm64-linux
podman: work around patchelf.rb bug when cgo is required
2 parents 825b3e8 + 11ade7e commit 00b93fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Formula/p/podman.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class Podman < Formula
4747
depends_on "libseccomp"
4848
depends_on "passt"
4949
depends_on "slirp4netns"
50+
depends_on "sqlite"
5051
depends_on "systemd"
5152
end
5253

@@ -132,6 +133,13 @@ def install
132133
ENV["HELPER_BINARIES_DIR"] = opt_libexec/"podman"
133134
ENV["BUILD_ORIGIN"] = "brew"
134135

136+
# Workaround to avoid patchelf corruption when cgo is required
137+
if Hardware::CPU.arch == :arm64
138+
ENV["CGO_ENABLED"] = "1"
139+
ENV["GO_EXTLINK_ENABLED"] = "1"
140+
ENV.append "GOFLAGS", "-buildmode=pie -trimpath"
141+
end
142+
135143
system "make"
136144
system "make", "install", "install.completions"
137145

0 commit comments

Comments
 (0)