akemin-dayo / simject

simject is a command-line tool and iOS dynamic library that allows developers to easily test their tweaks on the iOS Simulator.
BSD 2-Clause "Simplified" License
486 stars 55 forks source link

Error trying to compile on Ventura 13.6 #85

Closed IvanIVGrozny closed 4 months ago

IvanIVGrozny commented 9 months ago

The error goes as follows, first time trying to compile anything after installation.

`% make package THEOS_PACKAGE_SCHEME=rootless ==> Notice: Build may be slow as Theos isn’t using all available CPU cores on this computer. Consider upgrading GNU Make: https://theos.dev/docs/parallel-building

Making all for tweak BadWithNames… ==> Preprocessing Tweak.x… ==> Compiling Tweak.x (x86_64)… Apple clang version 15.0.0 (clang-1500.0.40.1) Target: x86_64-apple-darwin22.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-ios7.0.0-simulator -Wundef-prefix=TARGETOS -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name Tweak.x.m -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-strict-return -ffp-contract=on -fno-rounding-math -funwind-tables=2 -faligned-alloc-unavailable -target-sdk-version=17.0 -fvisibility-inlines-hidden-static-local-var -target-cpu core2 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=gdb -target-linker-version 1015.6 -v -fcoverage-compilation-dir=/Users/sigjnfmac/tweaks/badwithnames -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/swift/clang -dependency-file /Users/sigjnfmac/tweaks/badwithnames/.theos/obj/iphone_simulator/debug/x86_64/Tweak.x.955c9cab.Td -skip-unused-modulemap-deps -MT /Users/sigjnfmac/tweaks/badwithnames/.theos/obj/iphone_simulator/debug/x86_64/Tweak.x.955c9cab.o -MP -include /Users/sigjnfmac/theos/Prefix.pch -iquote /Users/sigjnfmac/tweaks/badwithnames -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk -I /Users/sigjnfmac/tweaks/badwithnames -I /Users/sigjnfmac/theos/include/iphone_simulator -I /Users/sigjnfmac/theos/include -I /Users/sigjnfmac/theos/vendor/include -I /Users/sigjnfmac/theos/include/_fallback -D TARGET_IPHONE_SIMULATOR=1 -D "THEOS_PACKAGE_INSTALL_PREFIX=\"/var/jb\"" -D DEBUG -D "THEOS_INSTANCE_NAME=\"BadWithNames\"" -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/PrivateFrameworks -F/Users/sigjnfmac/theos/vendor/lib/iphone_simulator/rootless -F/Users/sigjnfmac/theos/lib/iphone_simulator/rootless -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/usr/local/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/swift/clang/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/usr/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -O0 -Wall -Wno-unused-command-line-argument -Werror -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -fdebug-compilation-dir=/Users/sigjnfmac/tweaks/badwithnames -ferror-limit 19 -stack-protector 1 -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmodules -fimplicit-module-maps -fmodules-cache-path=/var/folders/r8/39q1lpgx2b58cjwbj_20b_bw0000gn/C/clang/ModuleCache -fmodule-name=BadWithNames -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-timestamp=1705199604 -fmodules-validate-once-per-build-session -fmodules-validate-system-headers -fobjc-runtime=ios-7.0.0 -fobjc-arc -fobjc-exceptions -fexceptions -fmax-type-align=16 -fcommon -fcolor-diagnostics -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /Users/sigjnfmac/tweaks/badwithnames/.theos/obj/iphone_simulator/debug/x86_64/Tweak.x.955c9cab.o -x objective-c /Users/sigjnfmac/tweaks/badwithnames/.theos/obj/iphone_simulator/debug/x86_64/Tweak.x.m clang -cc1 version 15.0.0 (clang-1500.0.40.1) default target x86_64-apple-darwin22.6.0 ignoring nonexistent directory "/Users/sigjnfmac/theos/include/iphone_simulator" ignoring nonexistent directory "/Users/sigjnfmac/theos/include/_fallback" ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/PrivateFrameworks" ignoring nonexistent directory "/Users/sigjnfmac/theos/vendor/lib/iphone_simulator/rootless" ignoring nonexistent directory "/Users/sigjnfmac/theos/lib/iphone_simulator/rootless" ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/usr/local/include" ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/Library/Frameworks"

include "..." search starts here:

/Users/sigjnfmac/tweaks/badwithnames

include <...> search starts here:

/Users/sigjnfmac/tweaks/badwithnames /Users/sigjnfmac/theos/include /Users/sigjnfmac/theos/vendor/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/swift/clang/include /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/usr/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks (framework directory) End of search list. ==> Linking tweak BadWithNames (x86_64)… ld: warning: -multiply_defined is obsolete ld: unknown options: -allow_simulator_linking_to_macosx_dylibs clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: [/Users/sigjnfmac/tweaks/badwithnames/.theos/obj/iphone_simulator/debug/x86_64/BadWithNames.dylib] Error 1 make[2]: [/Users/sigjnfmac/tweaks/badwithnames/.theos/obj/iphone_simulator/debug/x8664/BadWithNames.dylib] Error 2 make[1]: *** [internal-library-all] Error 2 make: *** [BadWithNames.all.tweak.variables] Error 2`

1vke commented 7 months ago

Have you found any solution to this? Experiencing the same on Sonoma 14.3.

1vke commented 6 months ago

@IvanIVGrozny

After installing Xcode 13.4.1, extracting it, renaming the application to Xcode-13.4.1 to prevent any issues with the current Xcode, and placing it in applications it has seemed to solve my issue.

I can not replicate what I was experiencing to the fullest but it seems like that worked. You might also need to switch your switch your Xcode command line tools around. You can do that via: sudo xcode-select -s /Applications/Xcode-13.4.1.app

To switch back to the most current Xcode command line tools, omit -13.4.1 in the application path.

Hope this helps.

EDIT: Seems like you do need to switch to an older Xcode tools version.