New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-6287] utils/build-script can't handle spaces in path to Xcode #48837
Comments
SR-3353 duplicate it looks... |
Certainly related to SR-3353. That one is about spaces in the path to the swift clone, and this one is about spaces in the path to Xcode. |
Yea I guess not a dup per se but likely the same type of logical flaw |
Since this has a very clear way to reproduce the issue, I'm going to label this as a "StarterBug". I think a good series of steps to begin working on this would be to:
I'd be happy to help anyone who chooses to work on this, I think I can help answer most questions about the Swift build system. 🙂 |
Comment by Tassilo von Gerlach (JIRA) Just stated reading your blog posts @modocache and will give this a shot. |
Comment by Tassilo von Gerlach (JIRA) I've spent some time trying to solve the issue, but I'm going in circles at this point and was hoping for any insights or pointers in the right direction. I was able to fix the initial crash by changing HOST_CXX_DIR=$(dirname ${HOST_CXX}) to HOST_CXX_DIR=$(dirname "${HOST_CXX}") in utils/build-script-impl line 2666. By wrapping HOST_CXX in quotes it treats it as a single argument as opposed to multiple ones separated by the space in the Xcode path. However, after applying this fix the build now fails with this message. [13/2689] Linking CXX static library lib/libLLVMDemangle.a
FAILED: lib/libLLVMDemangle.a
: && /Applications/Xcode With Spaces.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -no_warning_for_no_symbols -o lib/libLLVMDemangle.a lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o && :
/bin/sh: /Applications/Xcode: No such file or directory
[20/2689] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.o
ninja: build stopped: subcommand failed.
../swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting I have tried to do the following things:
Any insights would be greatly appreciated. Thanks. |
Resetting assignee on all Starter Bugs not modified since 2018. |
(sorry, tvongerlach (JIRA User)) |
Comment by Valeriy Van (JIRA) `./utils/build-script` builds normally with Xcode having spaces in its name provided `xcode-select` properly set path. I.g. I've set path with: `sudo xcode-select -s /Applications/Xcode\ 11.5.app/Contents/Developer`. Then build process ran with `./swift/utils/build-script --clean --xcode --release-debuginfo --debug-swift` completed successfully. |
Environment
macOS 10.13
Xcode 9.1 GM (9B55)
Additional Detail from JIRA
md5: 88d670da60efa0246ef98d7f7ab61099
Issue Description:
I have spaces in my path to Xcode (/Applications/Xcode 9.1 GM.app).
When I attempt to build Swift using utils/build-script, it silently dies with a cryptic message of:
usage: dirname path
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
This is a bad error message and
I should be able to have spaces in my path to Xcode
The text was updated successfully, but these errors were encountered: