Skip to content
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-8803] Issue in swift 4.2 with spaces in folder names on Linux #51311

Closed
swift-ci opened this issue Sep 19, 2018 · 12 comments
Closed

[SR-8803] Issue in swift 4.2 with spaces in folder names on Linux #51311

swift-ci opened this issue Sep 19, 2018 · 12 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project regression swift 4.2

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-8803
Radar rdar://problem/44647589
Original Reporter joebayld (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.2Regression, Driver
Assignee None
Priority Medium

md5: 290ecf88789658dbd438ec2869c6d36e

Issue Description:

I found that when building a swift project with the Release config, if there are spaces in any folder names then errors are thrown during the linking process.

Linking ./.build/x86_64-unknown-linux/release/Run
clang: error: no such file or directory: '/home/ubuntu/MyApp/.build/x86_64-unknown-linux/release/App.build/Models/Contexts/PDF'
clang: error: no such file or directory: 'Contexts/AppPDFContext.swift.o' 
clang: error: no such file or directory: '/home/ubuntu/MyApp/.build/x86_64-unknown-linux/release/App.build/Models/Contexts/View' 
clang: error: no such file or directory: 'Contexts/AppViewContext.swift.o'

As you can see above, the errors are printed across multiple lines. It thinks the files are:

  • /home/ubuntu/MyApp/.build/x86_64-unknown-linux/release/App.build/Models/Contexts/PDF

  • Contexts/AppPDFContext.swift.o

  • /home/ubuntu/MyApp/.build/x86_64-unknown-linux/release/App.build/Models/Contexts/View

  • Contexts/AppViewContext.swift.o

The folder names with spaces are "PDF Contexts" and "View Contexts"

This didn't happen on Swift 4.1.

@belkadan
Copy link
Contributor

Mind trying a development snapshot from https://swift.org/download/ ? We just fixed an issue with escaping characters in long argument lists.

@belkadan
Copy link
Contributor

cc davidungar (JIRA User)

@swift-ci
Copy link
Collaborator Author

Comment by Joe Bay (JIRA)

@belkadanI just tested it on 'swift-4.2-DEVELOPMENT-SNAPSHOT-2018-09-14-a-ubuntu16.04' and it's still not working.

@belkadan
Copy link
Contributor

Drat, thanks. Can you attach a sample project where this is happening, so we can be sure we're seeing the same thing? (The previous issue only kicked in with long argument lists.)

@swift-ci
Copy link
Collaborator Author

Comment by Joe Bay (JIRA)

@belkadan I tried making a small test project and couldn't reproduce. So here is a larger project that the issue happens in. Keep it mind I can only reproduce on Linux and as a release config.

https://github.com/Joebayld/API_Swift42_Issue

@belkadan
Copy link
Contributor

Thanks, that should be good enough for us!

@swift-ci create

@bob-wilson
Copy link

The swift-4.2-DEVELOPMENT-SNAPSHOT-2018-09-14-a toolchain did not include the fix that Jordan was referring to (#19321 It came in right after that.

Actually the newest 4.2 development toolchains that I see for Linux are from Sept. 13, so let me see if we can generate something newer.

@bob-wilson
Copy link

To clarify, Mishal explained to me that the discrepancy between the date shown on the web site (Sept. 13) and the date in the toolchain (09-14) is due to a timezone difference. But, we still need a newer 4.2 toolchain that picks up the fix. There should be a new one generated tonight. Can you try with that when it is available?

@swift-ci
Copy link
Collaborator Author

Comment by Joe Bay (JIRA)

I can test a newer build - it likely won't happen till tomorrow am though. Thanks

@swift-ci
Copy link
Collaborator Author

Comment by Pierpaolo Frasa (JIRA)

I ran into the same problem.

The problem still happens with the example repo linked above with the Swift 4.2 release on Ubuntu 16.04. On Ubuntu 18.04, I cannot test it because of some openSSL dependency hell that I can't get resolved. Similary, I can't even compile with the current master build of Swift because of similar issues, so I can't say whether the problem has been fixed yet.

@belkadan
Copy link
Contributor

Did this get fixed after all?

@swift-ci
Copy link
Collaborator Author

Comment by Pierpaolo Frasa (JIRA)

@belkadan With Ubuntu 16.04, the Swift 4.2.1 release and the repository from above (https://github.com/Joebayld/API_Swift42_Issue) "swift build -c release" works without issue. I can't find a binary for the swift-4.2-DEVELOPMENT-SNAPSHOT-2018-09-14-a snapshot anymore, so I can't verify that this was, in effect, broken before (but my previous comment seems to indicate that it was).

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project regression swift 4.2
Projects
None yet
Development

No branches or pull requests

4 participants