Opened 2 months ago

Last modified 2 months ago

#71961 assigned defect

SwiftLint fails to build on Ventura 13.7.1

Reported by: bradleyCPA (B. Holder) Owned by: csknns (Christos Koninis)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: SwiftLint

Description (last modified by bradleyCPA (B. Holder))

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?

Attachments (2)

build.sh (149 bytes) - added by bradleyCPA (B. Holder) 2 months ago.
main.log (62.3 KB) - added by bradleyCPA (B. Holder) 2 months ago.

Download all attachments as: .zip

Change History (5)

Changed 2 months ago by bradleyCPA (B. Holder)

Attachment: build.sh added

Changed 2 months ago by bradleyCPA (B. Holder)

Attachment: main.log added

comment:1 Changed 2 months ago by bradleyCPA (B. Holder)

Description: modified (diff)

comment:2 Changed 2 months ago by jmroot (Joshua Root)

Owner: set to csknns
Status: newassigned

comment:3 Changed 2 months ago by bradleyCPA (B. Holder)

Adding sandbox_enable no to /opt/local/etc/macports/macports.conf allows the port to install in my case. Is there a way to do that at the portfile level instead?

Note: See TracTickets for help on using tickets.