-
Notifications
You must be signed in to change notification settings - Fork 555
Open
Labels
enhancementThe issue or pull request is an enhancementThe issue or pull request is an enhancementiOSIssues affecting iOSIssues affecting iOSmacOSIssues affecting macOSIssues affecting macOS
Milestone
Description
Steps to Reproduce
- Ensure the system Xcode (as defined by
xcode-select -p) points to a different Xcode than Visual Studio for Mac. - Execute
xcrun -k - Create an iOS project, makes sure it has multiple architectures selected (and device-specific builds disabled), and build it.
Result:
lipo : error : unable to find utility "lipo", not a developer tool or in PATH
The error can be reproduced directly on the command line as well:
xcrun -k
$ DEVELOPER_DIR=/Applications/Xcode92.app XCODE_DEVELOPER_DIR_PATH=/Applications/Xcode93.app/Contents/Developer xcrun lipo
xcrun: error: unable to find utility "lipo", not a developer tool or in PATHThe problem is the XCODE_DEVELOPER_DIR_PATH environment variable, which confuses Apple's tooling (when building an XI or XM project the variable is inherited from Visual Studio for Mac, which sets it).
Workarounds
-
Make sure the system Xcode and the VSfM Xcode is the same.
-
Run
xcrunonce without the variable (per broken tool) so that the tool's path is cached:$ xcrun -k $ xcrun clang --version Apple LLVM version 9.0.0 (clang-900.0.39.2) [...] $ DEVELOPER_DIR=/Applications/Xcode92.app XCODE_DEVELOPER_DIR_PATH=/Applications/Xcode93.app/Contents/Developer xcrun clang --version Apple LLVM version 9.0.0 (clang-900.0.39.2) [...]
Potential fixes
- Make mtouch and mmp unset
XCODE_DEVELOPER_DIR_PATHunconditionally. - Make VSfM unset
XCODE_DEVELOPER_DIR_PATH. Presumably there's a reason it's set in the first place, so this might be non-trivial.
I think making mtouch and mmp unset the variable is the simplest and fastest to implement.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementThe issue or pull request is an enhancementThe issue or pull request is an enhancementiOSIssues affecting iOSIssues affecting iOSmacOSIssues affecting macOSIssues affecting macOS