[MacPorts] #71961: SwiftLint fails to build on Ventura 13.7.1
MacPorts
noreply at macports.org
Mon Jan 27 14:18:37 UTC 2025
#71961: SwiftLint fails to build on Ventura 13.7.1
-------------------------+--------------------
Reporter: bradleyCPA | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: SwiftLint |
-------------------------+--------------------
Description changed by bradleyCPA:
Old description:
> Relevant error from main.log appears to be:
>
> {{{
> :info:build sandbox-exec: sandbox_apply: Operation not permitted
> :info:build <unknown>:0: warning: compiler plugin not loaded:
> '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_swiftlint/swiftlint/work/SwiftLint-0.57.0/.build/arm64
> -apple-macosx/release/SwiftLintCoreMacros; failed to initialize
> }}}
>
> The portfile for SwiftLint appears to have this relevant section from
> building:
>
> {{{
> use_xcode yes
>
> build.cmd swift
> build.target build
> build.args --configuration release --disable-sandbox
> }}}
>
> And yet trying to naively replicated this and build directly from GitHub
> works fine:
>
> {{{
> #!/bin/bash
>
> git clone https://github.com/realm/SwiftLint.git
> cd SwiftLint
> git checkout 0.57.0
> swift build --configuration release --disable-sandbox
> }}}
>
> I suspect that macports is using `/usr/bin/sandbox-exec` under the covers
> in some way here. This seems odd since it seems like the build needs to
> have the sandbox disabled. And I see there is an
> `/opt/local/libexec/macports/lib/port1.0/portsandbox.tcl`. Perhaps that
> needs to be disabled too in my case?
New description:
Relevant error from main.log appears to be:
{{{
:info:build sandbox-exec: sandbox_apply: Operation not permitted
:info:build <unknown>:0: warning: compiler plugin not loaded:
'/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_swiftlint/swiftlint/work/SwiftLint-0.57.0/.build/arm64
-apple-macosx/release/SwiftLintCoreMacros; failed to initialize
}}}
The portfile for SwiftLint appears to have this relevant section for
building:
{{{
use_xcode yes
build.cmd swift
build.target build
build.args --configuration release --disable-sandbox
}}}
And yet trying to naively replicate this and build directly from GitHub
works fine:
{{{
#!/bin/bash
git clone https://github.com/realm/SwiftLint.git
cd SwiftLint
git checkout 0.57.0
swift build --configuration release --disable-sandbox
}}}
I suspect that macports is using `/usr/bin/sandbox-exec` under the covers
in some way here. This seems odd since it seems like the build needs to
have the sandbox disabled. And I see there is an
`/opt/local/libexec/macports/lib/port1.0/portsandbox.tcl`. Perhaps that
needs to be disabled too in my case?
--
--
Ticket URL: <https://trac.macports.org/ticket/71961#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list