Couldn't create build system & environment
Nonepse opened this issue · comments
Running on macOS 10.13.4 with Xcode 9.4 installed, I get the following errors when trying to build my project:
$ ./xcbuild -workspace MyProject.xcworkspace
error: couldn't create build system
error: couldn't create build environment
Am I missing something?
I don't think you're missing anything; the build system and the build environment are defined by xcspec files, I believe, which should be hosted in your developer root (and therefore discoverable).
- When was the last time you could build your project with xcbuild? When did you last build xcbuild? What version of Xcode did you have then?
- Is MyProject.xcworkspace doing anything interesting? How'd you create it? If you create a vanilla (I assume iOS) workspace and try to build it, do you get the same errors?
Thanks for the reply @Ktwu. But mine won't be very helpful :(
- First time ever on this machine
- I first tried with a rather large project. Thinking it could be the issue, I tried with a vanilla one: same results
i have the same problem and i /think/ i know what it is but not quite sute how to solve if.
using the xcode-select from the project prints out the following path
'private/var/db/xcode_select_link'
without the leading slash, and without that, its not a valid path. i just built and installed xcbuild for the first time today and haven ever successfully built anything with it because i get an identical error.
follow up on this- the incorrect path was most certainly the problem for me. and was "solved" by doing
"ln -s /private private"
from my pwd in the command line. not sure how to properly fix it, but once i did this i could actually use xcbuild succesfully. bad path logic somewhere. not sure where.
you should "export DEVELOPER_DIR=/Applications/Xcode.app" first