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

Unknown clang parameter when running make setup on 10.13.6 #62

Closed DoggoKt closed 3 years ago

DoggoKt commented 3 years ago

I followed all the instructions (clone the repo, cd into directory, and execute make setup). However it seems the Makefile tries to pass the parameter -print-target-triple to clang which apparently doesn't exist in my clang version. I'm on macOS 10.13.6 High Sierra, using latest xcode for that version (10.1)

Output of make setup:

iMac:simject d0gg3r$ make setup
clang: error: unknown argument: '-print-target-triple'
clang: error: no input files
>> Compiling resim for 
>>> Target directory is /opt/simject
ld: warning: text-based stub file /System/Library/Frameworks//Foundation.framework/Foundation.tbd and library file /System/Library/Frameworks//Foundation.framework/Foundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation are out of sync. Falling back to library file for linking.
>>> Signing...
>>> Copying library...
clang: error: unknown argument: '-print-target-triple'
clang: error: no input files
clang: error: unknown argument: '-print-target-triple'
clang: error: no input files
>> Compiling simject for 
>>> Using SDK at /Library/Developer/CommandLineTools/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
>>> Target directory is /opt/simject
error: unknown target triple '-DDYLIB_DIR=@"/opt/simject"', please use -triple
      or -arch
make[1]: *** [build] Error 1
make: *** [all] Error 2

Output of clang --version

iMac:simject d0gg3r$ clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I have xcode tools and all installed as seen above.

DoggoKt commented 3 years ago

@angelXwind

DoggoKt commented 3 years ago

After testing on my kali machine, it appears that it exists on verrsion 9.0.1 - or maybe the default provided by xcode doesn't have it?

DoggoKt commented 3 years ago

I updated to the apple llvm 11 via brew (brew install llvm) and the option is there, as found in the docs here, in this part. This flag also apparently includes -print-target-triple. Then I just added it top-priority to my PATH and it should be fine now.