Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disrequire Xcode to build once again #39

Open
kfix opened this issue Jan 9, 2022 · 4 comments
Open

disrequire Xcode to build once again #39

kfix opened this issue Jan 9, 2022 · 4 comments

Comments

@kfix
Copy link
Owner

kfix commented Jan 9, 2022

Xcode is huge, almost 12GB downloaded and needs 40GB to extract (really 50Gb if your XCode.xip is on the same filesystem you're installing to)

now that swiftlibs are in the base macOS, should investigate whether the plain "Command Line Tools" package is enough to build MacPin. I think building with CLT used to work but can't remember when/if/why it stopped.

CDT won't have the iOS Simulator to test the mobile builds (or even its SDKs??), but that port is just a toy at this point.

@kfix
Copy link
Owner Author

kfix commented Jan 9, 2022

homebrew's installer has a scriptable way to deploy CLT.pkg
https://github.com/Homebrew/install/blob/master/install.sh#L813

@kfix
Copy link
Owner Author

kfix commented Jan 9, 2022

just calling git on a stock macOS install will try to get CLT installed: https://apple.stackexchange.com/a/304101

so that's a plus

kfix added a commit that referenced this issue Feb 13, 2022
@kfix
Copy link
Owner Author

kfix commented Sep 19, 2022

I didn't document it yet, but CLT is insufficient.

It has a swift-package binary at /Library/Developer/CommandLineTools/usr/bin/swift-package

if you invoke that with build, or just run swift build, you'll get this on stderr:

error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output:
    xcrun: error: unable to find utility "xctest", not a developer tool or in PATH

this also shows up when running make to just show basic infos, so eXcode.mk is finding the right swift bins, they just don't don't want to do anything beyond basic compile invokes.
maybe upstream will un-eff this xctest issue: apple/swift-package-manager#4396
(more context https://forums.swift.org/t/pitch-standardise-swift-cli-across-all-platforms/46672)

if I try to workaround that, I get this:

$ ln -s /usr/bin/true ~/bin/xctest
$ /Library/Developer/CommandLineTools/usr/bin/swift-package build
'macpin': error: invalidManifestFormat("/Users/joey/src/MacPin/Package.swift:2:8: error: no such module \'PackageDescription\'\nimport PackageDescription\n       ^", diagnosticFile: nil)

@kfix
Copy link
Owner Author

kfix commented Feb 19, 2024

well, maybe I can use https://github.com/yonaskolb/XcodeGen to automate the unpleasantness of maintaining an Xcode project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
@kfix and others