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 committed Oct 22, 2024
1 parent 8f306f5 commit 61a47e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 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 @@ -20,7 +21,12 @@ class Xclogparser < Formula
uses_from_macos "swift"

def install

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

View workflow job for this annotation

GitHub Actions / Linux

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

Building for production... [1/13] Write sources [9/13] Compiling system-zlib anchor.c [10/13] Write swift-version-21AA855991029966.txt [12/17] Compiling Gzip Data+Gzip.swift /tmp/xclogparser-20241022-6730-4xpszb/XCLogParser-0.2.39/.build/checkouts/GzipSwift/Sources/system-zlib/include/module.modulemap:2:12: error: header '/usr/include/zlib.h' not found header "/usr/include/zlib.h" ^ /tmp/xclogparser-20241022-6730-4xpszb/XCLogParser-0.2.39/.build/checkouts/GzipSwift/Sources/Gzip/Data+Gzip.swift:32:12: error: could not build C module 'zlibLinux' import zlibLinux ^ error: fatalError ==> Formula Path: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/x/xclogparser.rb ==> Configuration HOMEBREW_VERSION: 4.4.2-14-ga74bdb2 ORIGIN: https://github.com/Homebrew/brew HEAD: a74bdb271c73e0179e9ad75eecbb538938d4e93f Last commit: 23 hours ago Core tap HEAD: 564a47406e9237e765fbf0041762f64012897454 Core tap last commit: 6 minutes ago Core tap JSON: 22 Oct 14:57 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.5 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/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 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/opt/icu4c@75:/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@75/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libxml2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/icu4c/lib/pkgconfig HOMEBREW_MAKE_JOBS: 4 HOMEBREW_GIT: /usr/bin/git ACLOCAL_PATH: /home/linuxbrew/.linuxbrew/share/aclocal PATH: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super:/home/linuxbrew/.linuxbrew/opt/openssl@3/bin:/home/linuxbrew/.linuxbrew/opt/ncurses/bin:/home/linuxbrew/.linuxbrew/opt/sqlite/bin:/home/linuxbrew/.linuxbr
system "swift", "build", "-c", "release", "--disable-sandbox"
args = if OS.mac?
["--disable-sandbox"]
else
["--static-swift-stdlib"]
end
system "swift", "build", "-c", "release", *args
bin.install ".build/release/xclogparser"
end

Expand Down

0 comments on commit 61a47e5

Please sign in to comment.