Skip to content

Commit

Permalink
xclogparser: staticly link Swift stdlib on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 authored and daeho-ro committed Nov 11, 2024
1 parent cc890e8 commit a1d9107
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Formula/x/xclogparser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Xclogparser < Formula
url "https://github.com/MobileNativeFoundation/XCLogParser/archive/refs/tags/v0.2.39.tar.gz"
sha256 "b225891b94bbdb549ddbc9ffe838ad87f73ef7cc79934e3e23969bb1220eafd9"
license "Apache-2.0"
revision 1

bottle do
sha256 cellar: :any_skip_relocation, arm64_sonoma: "2af489ea40d0e2ea3d490c151137cc74992e17d9e5d4ea842efe37bb5c3c83f3"
Expand All @@ -18,9 +19,21 @@ class Xclogparser < Formula
depends_on xcode: "13.0"

uses_from_macos "swift"
uses_from_macos "zlib"

def install

Check failure on line 24 in Formula/x/xclogparser.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew install --verbose --formula --build-bottle xclogparser` failed on Linux!

Already downloaded: /home/linuxbrew/.cache/Homebrew/downloads/e89c7a01022e66fec4521b761f17f9eee4b785a5bf343c2dc7f706d2381edad7--XCLogParser-0.2.39.tar.gz ==> Verifying checksum for 'e89c7a01022e66fec4521b761f17f9eee4b785a5bf343c2dc7f706d2381edad7--XCLogParser-0.2.39.tar.gz' /usr/bin/env tar --extract --no-same-owner --file /home/linuxbrew/.cache/Homebrew/downloads/e89c7a01022e66fec4521b761f17f9eee4b785a5bf343c2dc7f706d2381edad7--XCLogParser-0.2.39.tar.gz --directory /tmp/homebrew-unpack-20241111-6746-nd2irg mv /tmp/homebrew-unpack-20241111-6746-nd2irg/XCLogParser-0.2.39 /tmp/xclogparser-20241111-6746-h2pu8t/XCLogParser-0.2.39 ==> swift package fetch --static-swift-stdlib error: Unknown option '--static-swift-stdlib' Usage: swift package fetch --version <version> [--branch <branch>] [--revision <revision>] [<package-name>] See 'package fetch -help' for more information. ==> Formula Path: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/x/xclogparser.rb ==> Configuration HOMEBREW_VERSION: 4.4.5-2-g1cb90c6 ORIGIN: https://github.com/Homebrew/brew HEAD: 1cb90c600546f82d67e6950d90d2073ecc32114d Last commit: 4 hours ago Core tap HEAD: 9edd1f4705a194b32804ce5a5f710e053ad01983 Core tap last commit: 8 minutes ago Core tap JSON: 11 Nov 21:46 UTC HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew HOMEBREW_BOOTSNAP: set HOMEBREW_CASK_OPTS: [] HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GITHUB_API_TOKEN: set HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_LOGS: /github/home/bottles/logs HOMEBREW_MAKE_JOBS: 4 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set HOMEBREW_NO_INSTALL_FROM_API: set HOMEBREW_SORBET_RUNTIME: set HOMEBREW_VERIFY_ATTESTATIONS: set Homebrew Ruby: 3.3.6 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby CPU: quad-core 64-bit zen3 Clang: N/A Git: 2.47.0 => /usr/bin/git Curl: 7.81.0 => /usr/bin/curl Kernel: Linux 6.5.0-1025-azure x86_64 GNU/Linux OS: Ubuntu 22.04.5 LTS Host glibc: 2.35 /usr/bin/gcc: 11.4.0 /usr/bin/ruby: N/A glibc: N/A gcc@11: N/A gcc: 14.2.0_1 xorg: N/A ==> ENV HOMEBREW_CC: gcc-11 HOMEBREW_CXX: g++-11 MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew/opt/berkeley-db@5:/home/linuxbrew/.linuxbrew PKG_CONFIG_PATH: /home/linuxbrew/.linuxbrew/opt/mpdecimal/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/openssl@3/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/ncurses/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/readline/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/zlib/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/sqlite/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/xz/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/bzip2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/expat/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libedit/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libffi/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libxcrypt/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/krb5/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libtirpc/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libnsl/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/brotli/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libnghttp2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libssh2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/rtmpdump/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/lz4/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/zstd/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/util-linux/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/openldap/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libidn2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/curl/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/icu4c@76/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libxml2/lib/pkgconfig HOMEBREW_MAKE_JOBS: 4 HOMEBREW_GIT: /usr/bin/git ACLOCAL_PATH: /home/linuxbrew/.linuxbrew/share/aclocal PATH: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homeb
system "swift", "build", "-c", "release", "--disable-sandbox"
args = if OS.mac?
["--disable-sandbox"]
else
["--static-swift-stdlib"]
end

# Fix hardcoded path to system zlib.
system "swift", "package", "fetch", *args
inreplace ".build/checkouts/GzipSwift/Sources/system-zlib/include/module.modulemap",
"/usr/include", Formula["zlib"].opt_include

system "swift", "build", "-c", "release", *args
bin.install ".build/release/xclogparser"
end

Expand Down

0 comments on commit a1d9107

Please sign in to comment.