DragonBuild / dragon

pip install dragon | A Powerful buildsystem and toolkit currently targeting darwin (iOS/macOS) machines
MIT License
220 stars 23 forks source link

Tweak cannot build for simulator #48

Closed ja1dan closed 3 years ago

ja1dan commented 3 years ago

➜ dragon b sim [DragonGen] Targeting Simulator + simject [DragonGen] Generating build scripts [DragonGen] Creating build script for Aeolus [Dragon] Building Tweak [Dragon] [4/8] (0.272) Linking .dragon/build/arm64/Aeolus.xm.mm.o with clang++ [arm64] FAILED: .dragon/build/Aeolus.arm64 clang++ -arch arm64 -I$DRAGONBUILD/include -I$DRAGONBUILD/vendor/include -I$DRAGONBUILD/include/_fallback -I/headers/ -I. -fcolor-diagnostics -F$DRAGONBUILD/sdks/iPhoneOS.sdk/System/Library/PrivateFrameworks/ -F$DRAGONBUILD/frameworks -O0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -fobjc-arc -target x86_64-apple-darwin20.2.0 -Wall -fmodules -fcxx-modules -fmodule-name=Aeolus -fbuild-session-file=.dragon/modules/ -fmodules-validate-once-per-build-session -fmodules-prune-after=345600 -fmodules-prune-interval=86400 -framework UIKit -framework Foundation -dynamiclib -ggdb -Xlinker -segalign -Xlinker 4000 -framework CydiaSubstrate -L$DRAGONBUILD/lib -L. -o .dragon/build/Aeolus.arm64 .dragon/build/arm64/Aeolus.xm.mm.o -lobjc -lc++ ld: in '/Users/me/.dragonbuild/sdks/iPhoneOS.sdk/System/Library/PrivateFrameworks//DocumentManager.framework/DocumentManager.tbd', building for iOS Simulator, but linking in .tbd built for iOS, for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) [Dragon] [5/8] (0.272) Linking .dragon/build/arm64e/Aeolus.xm.mm.o with clang++ [arm64e] FAILED: .dragon/build/Aeolus.arm64e clang++ -arch arm64e -I$DRAGONBUILD/include -I$DRAGONBUILD/vendor/include -I$DRAGONBUILD/include/_fallback -I/headers/ -I. -fcolor-diagnostics -F$DRAGONBUILD/sdks/iPhoneOS.sdk/System/Library/PrivateFrameworks/ -F$DRAGONBUILD/frameworks -O0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -fobjc-arc -target x86_64-apple-darwin20.2.0 -Wall -fmodules -fcxx-modules -fmodule-name=Aeolus -fbuild-session-file=.dragon/modules/ -fmodules-validate-once-per-build-session -fmodules-prune-after=345600 -fmodules-prune-interval=86400 -framework UIKit -framework Foundation -dynamiclib -ggdb -Xlinker -segalign -Xlinker 4000 -framework CydiaSubstrate -L$DRAGONBUILD/lib -L. -o .dragon/build/Aeolus.arm64e .dragon/build/arm64e/Aeolus.xm.mm.o -lobjc -lc++ ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.iossim.a, missing required architecture arm64e in file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.iossim.a (3 slices) ld: in '/Users/me/.dragonbuild/sdks/iPhoneOS.sdk/System/Library/PrivateFrameworks//DocumentManager.framework/DocumentManager.tbd', building for iOS Simulator, but linking in .tbd built for iOS, for architecture arm64e clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. [Dragon] Build failed [Dragon] Cleaning Up

This is the output I get from "dragon b sim"

0cyn commented 3 years ago

There's an issue with the updated sdk module; I was able to fix it, but an issue in ld causes it to spam console heavily with warnings.

Working on a clean way to fix this.

ja1dan commented 3 years ago

Alright, thanks, krit!

ja1dan commented 3 years ago

There's an issue with the updated sdk module; I was able to fix it, but an issue in ld causes it to spam console heavily with warnings.

Working on a clean way to fix this.

Would you mind telling me how you fixed it?

0cyn commented 3 years ago

We fixed this on monotrix's machine by adding the following to the sim target in defaults.yml. Pushing this fix as soon as I can.

      fw_dirs:                                                         
        - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk                                                                                  
        - $dragondir/frameworks