Open greearb opened 5 years ago
I had the problem that I couldn't download a DMG of the SDK, but found only an xip file (are SDK DMGs made available from Apple any longer at all?). My solution was to install XCode into /Applications, since the script would find it there.
There is gen_sdk_package_pbzx.sh
for xip
files.
@tpoechtrager Thanks, had no idea. Should the README be updated to make users aware of this?? I can make a PR.
It's already in the README. "Packing the SDK on Linux - Method 1 (Xcode > 8.0)"
@tpoechtrager But that's for packaging on Linux, I am packaging on OSX. Am I missing something?
I have never tried the pbzx method on macOS. Let me know if it works.
@tpoechtrager Gotcha, will try to experiment with it.
@tpoechtrager I packaged the SDK with ./tools/gen_sdk_package_pbzx.sh, and while it was outputting a bunch of warnings throughout (see below), it seemed to succeed in the end, although I don't know if the result is good or not.
./Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sysexits.h: Can't create 'Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/sysexits.h'
./Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/string.h: Can't create 'Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/string.h'
./Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/ndbm.h: Can't create 'Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/ndbm.h'
Ignore it if it's just that. AppleTVSimulator.platform
is not relevant for us.
@tpoechtrager Can you suggest a way of verifying the produced package?
There were far more warnings of the kind above BTW, I just didn't paste all of them. Just took an excerpt towards the end.
Why are you not using the normal packaging method on macOS? Mount the xip
image and run ./tools/gen_sdk_package.sh
.
You could test it with the cross-compiler.
@tpoechtrager How can I mount a xip archive? The official osxcross docs say to download a DMG file and mount it, which is why I asked in the first place how to deal with xip since Apple don't provide XCode DMGs AFAICT. After all, you're the one who told me to use gen_sdk_package_pbzx.sh.
My solution was to install XCode into /Applications, since the script would find it there.
So what's the problem? Just run ./tools/gen_sdk_package.sh
. I suggested you to use gen_sdk_package_pbzx.sh
because I thought you were on a non-Darwin OS. I misread the /Application
part.
I don't even have access to a macOS machine at the moment, so I can't update the README.
@tpoechtrager My original point is that I think the README is out of date, since it says to download and mount a DMG, which apparently isn't available from Apple any longer. In my opinion, the README should be updated with a solution that describes how to build from a xip file. I can provide a PR, to do so if you want.
Yes, file a PR please. Thanks.
OK 👍
I downloaded the latest xcode dmg and mounted it on my mac-mini. I copied over the gen_sdk_package.sh, but it will not find my xcode. Any suggestions? And, any mailing list or similar that could be used to ask such questions instead of a bug report?
ct-mini1:~ greearb$ ./gen_sdk_package.sh please mount Xcode.dmg ct-mini1:~ greearb$ ct-mini1:~ greearb$ ct-mini1:~ greearb$ ct-mini1:~ greearb$ mount /dev/disk1s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse) /dev/disk2s3 on /Volumes/Xcode (hfs, local, nodev, nosuid, read-only, noowners, mounted by greearb) ct-mini1:~ greearb$ ls /Volumes/Xcode/Packages/ BluetoothSDK.pkg MacOSX10.6.pkg CHUD.pkg OpenGLApps.pkg CoreAudioSDK.pkg OpenGLSDK.pkg Dashcode.pkg OtherDevDocumentation.pkg DevDocumentation.pkg QuickTimeSDK.pkg DevSDK.pkg RelocatableScript.pkg DevSamples.pkg SystemScript.pkg DevToolsDocumentation.pkg VersionedDeveloperToolsSystemSupport.pkg DeveloperTools.pkg WebKitSDK.pkg DeveloperToolsCLI.pkg X11Documentation.pkg DeveloperToolsSystemSupport.pkg X11SDK.pkg DistributedBuildsSupport.pkg gcc4.0.pkg DocDownloadOff.pkg gcc4.0ADCDocs.pkg DocDownloadOn.pkg gcc4.2.pkg FireWireSDK.pkg gcc4.2ADCDocs.pkg JavaSDK.pkg llvm-gcc4.2.pkg MacOSX10.4.Universal.pkg xcrun.pkg MacOSX10.5.pkg ct-mini1:~ greearb$