finestructure / Arena

A command line tool to create Swift Playground projects with SPM package dependencies
MIT License
684 stars 16 forks source link

0.17.0 compile error on Big Sur #60

Closed leogdion closed 4 years ago

leogdion commented 4 years ago

Unable to upgrade via Brew on Big Sur to 0.17.0:

$ brew upgrade arena
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/cask and caskroom/cask).
==> Updated Formulae
Updated 1 formula.
==> Updated Casks
ibackup-viewer                                                               ibackup-viewer

Warning: You are using macOS 11.0.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.

==> Upgrading 1 outdated package:
finestructure/tap/arena 0.16.1 -> 0.17.0
==> Upgrading finestructure/tap/arena 0.16.1 -> 0.17.0 
==> Downloading https://github.com/finestructure/Arena/archive/0.17.0.tar.gz
==> Downloading from https://codeload.github.com/finestructure/Arena/tar.gz/0.17.0
######################################################################## 100.0%
==> swift build --configuration release --disable-sandbox
Last 15 lines from /Users/leo/Library/Logs/Homebrew/arena/01.swift:
    memcpy(buf.baseAddress!, UnsafePointer<UInt8>(bytes), buf.count)
                                                  ^~~~~
/private/tmp/arena-20200813-50476-kulb1b/Arena-0.17.0/.build/checkouts/swift-llbuild/products/llbuildSwift/Internals.swift:34:51: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    memcpy(buf.baseAddress!, UnsafePointer<UInt8>(bytes), buf.count)
                                                  ^
[91/94] Compiling llbuildBuildSystem BuildSystem.cpp
[92/94] Compiling TSCBasic Await.swift
[93/95] Compiling TSCUtility Archiver.swift
[94/99] Compiling LLBuildManifest BuildManifest.swift
/private/tmp/arena-20200813-50476-kulb1b/Arena-0.17.0/.build/checkouts/swift-package-manager/Sources/LLBuildManifest/BuildManifest.swift:44:9: error: overlapping accesses to 'self.targets', but modification requires exclusive access; consider copying to a local variable
        targets[target, default: createTarget(target)].nodes.append(node)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/private/tmp/arena-20200813-50476-kulb1b/Arena-0.17.0/.build/checkouts/swift-package-manager/Sources/LLBuildManifest/BuildManifest.swift:44:34: note: conflicting access is here
        targets[target, default: createTarget(target)].nodes.append(node)
                                 ^~~~~~~~~~~~

Do not report this issue to Homebrew/brew or Homebrew/core!

Error: You are using macOS 11.0.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.
finestructure commented 4 years ago

This seems to be an issue with the swift-package-manager dependency and Xcode12b4.

Compiling with 11.6 works on Big Sur:

env DEVELOPER_DIR="/Applications/Xcode_11.6.app" xcrun swift build

but

env DEVELOPER_DIR="/Applications/Xcode_12_beta_4.app" xcrun swift build

raises the above error.

I'll see if I can get both to work if I bump swift-package-manager to something newer.

finestructure commented 4 years ago

I’ve tagged this as 0.18.0-b1 for now to see if the builds across versions hold up