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 9371c65
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 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,20 @@ class Xclogparser < Formula
depends_on xcode: "13.0"

uses_from_macos "swift"
uses_from_macos "zlib"

def install

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

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

`brew install --verbose --formula --build-bottle xclogparser` failed on macOS Sequoia (15) on Apple Silicon!

mv /private/tmp/homebrew-unpack-20241022-4753-dj3g19/XCLogParser-0.2.39 /private/tmp/xclogparser-20241022-4753-u7bzbq/XCLogParser-0.2.39 ==> swift package fetch warning: 'fetch' command is deprecated; use 'resolve' instead warning: /Users/brew/Library/org.swift.swiftpm/configuration is not accessible or not writable, disabling user-level cache features. warning: /Users/brew/Library/org.swift.swiftpm/security is not accessible or not writable, disabling user-level cache features. error: 'xclogparser-0.2.39': Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/private/tmp/TemporaryDirectory.mKgjBF/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-target", "arm64-apple-macosx13.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks", "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-L", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk", "-package-description-version", "5.5.0", "/private/tmp/xclogparser-20241022-4753-u7bzbq/XCLogParser-0.2.39/Package.swift", "-o", "/private/tmp/TemporaryDirectory.LEKlIg/xclogparser-0.2.39-manifest"]) sandbox-exec: sandbox_apply: Operation not permitted ==> Formula Path: /opt/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: 24 hours ago Core tap HEAD: 2d9c8f3d4b626398820a72a465b5561a41f463b9 Core tap last commit: 5 minutes ago Core tap JSON: 22 Oct 15:22 UTC Core cask tap JSON: 22 Oct 15:22 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_CACHE: /Users/brew/Library/Caches/Homebrew 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: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/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 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/bin/ruby CPU: quad-core 64-bit dunno Clang: 16.0.0 build 1600 Git: 2.39.5 => /usr/bin/git Curl: 8.7.1 => /usr/bin/curl macOS: 15.0-arm64 CLT: 16.0.0.0.1.1724870825 Xcode: 16.0 Rosetta 2: false ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /opt/homebrew CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/15 HOMEBREW_MAKE_JOBS: 4 HOMEBREW_GIT: /usr/bin/git HOMEBREW_SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk PATH: /opt/homebrew/Library/Homebrew/shims/mac/su

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

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

`brew install --verbose --formula --build-bottle xclogparser` failed on macOS Sonoma (14) on Apple Silicon!

mv /private/tmp/homebrew-unpack-20241022-4951-6n0hqn/XCLogParser-0.2.39 /private/tmp/xclogparser-20241022-4951-3qtj8r/XCLogParser-0.2.39 ==> swift package fetch warning: 'fetch' command is deprecated; use 'resolve' instead warning: /Users/brew/Library/org.swift.swiftpm/configuration is not accessible or not writable, disabling user-level cache features. warning: /Users/brew/Library/org.swift.swiftpm/security is not accessible or not writable, disabling user-level cache features. error: 'xclogparser-0.2.39': Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/private/tmp/TemporaryDirectory.W8MfH6/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-target", "arm64-apple-macosx13.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks", "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-L", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk", "-package-description-version", "5.5.0", "/private/tmp/xclogparser-20241022-4951-3qtj8r/XCLogParser-0.2.39/Package.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "/private/tmp/TemporaryDirectory.V5QbNT/xclogparser-0.2.39-manifest"]) sandbox-exec: sandbox_apply: Operation not permitted ==> Formula Path: /opt/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: 24 hours ago Core tap HEAD: 2d9c8f3d4b626398820a72a465b5561a41f463b9 Core tap last commit: 5 minutes ago Core tap JSON: 22 Oct 15:22 UTC Core cask tap JSON: 22 Oct 15:22 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_BOOTSNAP: set HOMEBREW_CACHE: /Users/brew/Library/Caches/Homebrew 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: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/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 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/bin/ruby CPU: quad-core 64-bit dunno Clang: 15.0.0 build 1500 Git: 2.39.3 => /usr/bin/git Curl: 8.4.0 => /usr/bin/curl macOS: 14.4.1-arm64 CLT: 15.3.0.0.1.1708646388 Xcode: 15.3 Rosetta 2: false ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /opt/homebrew CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/14 HOMEBREW_MAKE_JOBS: 4 HOMEBREW_GIT: /usr/bin/git HOMEBREW_SD

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

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

`brew install --verbose --formula --build-bottle xclogparser` failed on macOS Ventura (13) on Apple Silicon!

mv /private/tmp/homebrew-unpack-20241022-4876-2t54tv/XCLogParser-0.2.39 /private/tmp/xclogparser-20241022-4876-gsxyf1/XCLogParser-0.2.39 ==> swift package fetch warning: 'fetch' command is deprecated; use 'resolve' instead warning: /Users/brew/Library/org.swift.swiftpm/configuration is not accessible or not writable, disabling user-level cache features. warning: /Users/brew/Library/org.swift.swiftpm/security is not accessible or not writable, disabling user-level cache features. error: 'xclogparser-0.2.39': Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/private/tmp/TemporaryDirectory.vs0YpP/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-target", "arm64-apple-macosx13.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks", "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-L", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk", "-package-description-version", "5.5.0", "/private/tmp/xclogparser-20241022-4876-gsxyf1/XCLogParser-0.2.39/Package.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "/private/tmp/TemporaryDirectory.ooFN0J/xclogparser-0.2.39-manifest"]) sandbox-exec: sandbox_apply: Operation not permitted ==> Formula Path: /opt/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: 24 hours ago Core tap HEAD: 2d9c8f3d4b626398820a72a465b5561a41f463b9 Core tap last commit: 6 minutes ago Core tap JSON: 22 Oct 15:23 UTC Core cask tap JSON: 22 Oct 15:23 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_BOOTSNAP: set HOMEBREW_CACHE: /Users/brew/Library/Caches/Homebrew 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: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/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 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/bin/ruby CPU: quad-core 64-bit dunno Clang: 15.0.0 build 1500 Git: 2.39.3 => /usr/bin/git Curl: 8.4.0 => /usr/bin/curl macOS: 13.6.6-arm64 CLT: 15.1.0.0.1.1700200546 Xcode: 15.2 Rosetta 2: false ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /opt/homebrew CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/13 HOMEBREW_MAKE_JOBS: 4 HOMEBREW_GIT: /usr/bin/git HOMEBREW_SD
system "swift", "build", "-c", "release", "--disable-sandbox"
# Fix hardcoded path to system zlib.
system "swift", "package", "fetch"
inreplace ".build/checkouts/GzipSwift/Sources/system-zlib/include/module.modulemap",
"/usr/include", Formula["zlib"].opt_include

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 9371c65

Please sign in to comment.