Build error
dave256 opened this issue · 8 comments
On macOS 11.1 with Xcode 12.4 on an M1 Mac, I get this linker error:
The linked framework 'CoreSimulator.framework' is missing one or more architectures required by this target: arm64.
Am I missing an extra step or is something wrong with the Xcode installation on my Mac?
I haven't tried on M1, I'm afraid. @dchakarov checked something recently and it seemed okay, so I'm not sure what the fix might be here.
@twostraws, ok thanks. Just wanted to make certain I wasn't missing some extra step needed.
@dave256 check out this issue: #103 (comment)
@AvdLee @twostraws I had tried that but got a bunch of errors. I looked at them and they seem to be related to the SwiftUI previews.
/Users/dreed/Projects/ControlRoom/ControlRoom/About UI/AboutView.swift:68:1: Type Name Violation: Type name should only contain alphanumeric characters: 'AboutView_Previews' (type_name)
So I commented out the Previews that had issues and now I get this:
Showing All Messages
PhaseScriptExecution SwiftLint /Users/dreed/Library/Developer/Xcode/DerivedData/ControlRoom-eygwvexwtqvpkhbccnxzwaazpzen/Build/Intermediates.noindex/ControlRoom.build/Debug/ControlRoom.build/Script-551F8CFA23F4CB770006D1BD.sh (in target 'ControlRoom' from project 'ControlRoom')
Loading configuration from '.swiftlint.yml'
Configuration contains invalid keys:
["identifier_name"]
Linting Swift files in current working directory
Linting 'LoadingFailedView.swift' (1/54)
Linting 'LoadingView.swift' (2/54)
Linting 'PreferencesView.swift' (3/54)
Linting 'AboutView.swift' (4/54)
Linting 'Contributors.swift' (5/54)
Could not cast value of type 'Swift.Int64' (0x10925ef70) to 'Swift.String' (0x1092654c8).
/Users/dreed/Library/Developer/Xcode/DerivedData/ControlRoom-eygwvexwtqvpkhbccnxzwaazpzen/Build/Intermediates.noindex/ControlRoom.build/Debug/ControlRoom.build/Script-551F8CFA23F4CB770006D1BD.sh: line 6: 13476 Abort trap: 6 swiftlint
Command PhaseScriptExecution failed with a nonzero exit code
then I looked and realized I don't have SwiftLint so I commented out the script in the build phase for it and it now builds.
I'm leaving this open in case you want to look at the issue with Previews but you can close it if you want.
On macOS 11.2 (RC3) with Xcode 12.4(12D4e) on an MacBook Air M1 and selected schema "My Mac (Rosetta)", successful build is achieved.
Rosetta emulation works fine for me too, but I tried just removing CoreSimulator.framework from the frameworks group in Xcode out of sheer curiosity. To my utter surprise, it actually created a mostly working Apple Silicon native binary (every feature I tried worked, but there was quite a bit of console spam).
Now I know nothing about Xcode, swift, or this core simulator framework, but I have a native apple silicon binary that works for my purposes, so I'm happy.
Rosetta emulation works fine for me too, but I tried just removing CoreSimulator.framework from the frameworks group in Xcode out of sheer curiosity. To my utter surprise, it actually created a mostly working Apple Silicon native binary (every feature I tried worked, but there was quite a bit of console spam).
Now I know nothing about Xcode, swift, or this core simulator framework, but I have a native apple silicon binary that works for my purposes, so I'm happy.
This works, thanks. Maybe, just maybe, because M1 is already native ARM, it doesn't need to run a simulator.
See #118