You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unable to find utility *, not a developer tool or in PATH #3931
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 PATH
The 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 xcrun once 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_PATH unconditionally.
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.
Reacted by awattar, Vincent Dondain, voxoid0, Uri Arev, Rachel Kang and Mikalai Daronin
Is there a way to change "VS for Mac" Xcode settings without going through the UI? We have a customer running into this on the VSTS Hosted macOS VMs and we are looking for a way to switch the "VS for mac" default via a script.
I managed to work around it on our build system by reading out the path located in the Settings.plist, and setting the DEVELOPER_DIR environment variable to this path, appended with "/Contents/Developer".
@rolfbjarne we might also want to create an IDE issue. The IDE could get the Xcode path from xcode-select -p and also set a new Xcode path with xcode-select -s from the UI. What do you think?
Activity
madhurig commentedon May 9, 2018
Is there a way to change "VS for Mac" Xcode settings without going through the UI? We have a customer running into this on the VSTS Hosted macOS VMs and we are looking for a way to switch the "VS for mac" default via a script.
Thanks,
Madhuri
rolfbjarne commentedon May 10, 2018
@madhurig it's stored in
~/Library/Preferences/Xamarin/Settings.plist:DelcoigneYves commentedon Aug 8, 2018
I managed to work around it on our build system by reading out the path located in the Settings.plist, and setting the DEVELOPER_DIR environment variable to this path, appended with "/Contents/Developer".
VincentDondain commentedon Oct 18, 2018
@rolfbjarne we might also want to create an IDE issue. The IDE could get the Xcode path from
xcode-select -pand also set a new Xcode path withxcode-select -sfrom the UI. What do you think?rolfbjarne commentedon Oct 18, 2018
@VincentDondain yes, that's another solution that should work just as fine.
VincentDondain commentedon Oct 18, 2018
Also it's what Xcode does.
[msbuild] Improve the Strip task.
[msbuild] Improve the DSymUtil task.
[msbuild] Improve the Strip task. (#14342)
[msbuild] Improve the DSymUtil task. (#14344)
[msbuild] Port Metal and MetalLib to subclass XamarinTask. Fixes #21437.
5 remaining items
[msbuild] Port the CreateInstallerPackage task to subclass XamarinTask.
[msbuild] Port the OptimizePropertyLists task to subclass XamarinTask.
[msbuild] Port the ALToolUpload and ALToolValidate tasks to subclass …
[msbuild] Port the OptimizeImage task to subclass XamarinTask.
[msbuild] Port the OptimizeImage task to subclass XamarinTask. (#21618)
[msbuild] Port the ALToolUpload and ALToolValidate tasks to subclass …
[msbuild] Port the SpotlightIndexer task to subclass XamarinTask. (#2…
[msbuild] Port the Zip task to subclass XamarinTask. (#21612)
[msbuild] Port the OptimizePropertyLists task to subclass XamarinTask. (
[msbuild] Port the CreateInstallerPackage task to subclass XamarinTas…
[msbuild] Port the CreateAssetPack task to subclass XamarinTask.
[msbuild] Port the CreateAssetPack task to subclass XamarinTask. (#21713
[msbuild] Improve how we handle the path to Xcode. Fixes #11172.
[msbuild] Improve how we handle the path to Xcode. (#24021)