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-166] Package manager fails in virtualbox shared folder #5443

Closed
swift-ci opened this issue Dec 9, 2015 · 12 comments
Closed

[SR-166] Package manager fails in virtualbox shared folder #5443

swift-ci opened this issue Dec 9, 2015 · 12 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Dec 9, 2015

Previous ID SR-166
Radar None
Original Reporter george (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

Mac OS X 10.11.2 (Host)
Ubuntu 15.10 (Virtualbox Guest)

Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 881bff0fe9dad1bc4eed45931e69117a

Issue Description:

The package manager fails when run in a virtualbox shared folder.

Steps to reproduce:

  1. Create a guest Ubuntu 15.10 OS in an OS X El Capitan host
  2. Share a folder "workspace" from the host OS to the guest OS
  3. Type the following in the guest terminal:
    `cd $SHARED_FOLDER_LOCATION`
    `git clone https://github.com/apple/example-package-dealer`
    `cd example-package-dealer`
    `swift build`

Result:
swift-build: rename error: File exists (17): /media/sf_documents/example-package-dealer/Packages/example-package-fisheryates -> /media/sf_documents/example-package-dealer/Packages/example-package-fisheryates-1.0.2

Expected:
Build Succeeds

@swift-ci
Copy link
Contributor Author

Comment by Rob Allen (JIRA)

This is related to the vboxfs file system.

I changed to using nfs, and it works:

config.vm.synced_folder ".", "/vagrant", type: "nfs"

it would be nice if this worked with vboxfs though!

(I wasted hours on this!)

@ddunbar
Copy link
Member

ddunbar commented Dec 24, 2015

@mxcl any idea where this is coming from?

@mxcl
Copy link
Contributor

mxcl commented Dec 24, 2015

`get.swift` does the rename. But I couldn't guess why it fails. I'll test it out in my vmware VM which has shared folders first.

@swift-ci
Copy link
Contributor Author

Comment by Marcus Kida (JIRA)

Same problem here using Docker version 1.9.1, build a34a1d5 with Ubuntu 14.04.

warning: refname '0.2.3' is ambiguous.
warning: refname '0.2.3' is ambiguous.
Using version 0.2.3 of package Curassow
warning: refname '0.2.1' is ambiguous.
warning: refname '0.2.1' is ambiguous.
Using version 0.2.1 of package Nest
warning: refname '0.2.2' is ambiguous.
warning: refname '0.2.2' is ambiguous.
Using version 0.2.2 of package Inquiline
warning: refname '0.4.0' is ambiguous.
warning: refname '0.4.0' is ambiguous.
Using version 0.4.0 of package Commander
warning: refname '1.2.0' is ambiguous.
warning: refname '1.2.0' is ambiguous.
Using version 1.2.0 of package Safe
error: rename error: File exists (17): /app/Packages/Nest -> /app/Packages/Nest-0.2.1

In case you want a detailed description on how to reproduce this, please tell me. Shouldn't be too hard though by just spinning up a container and mounting a local folder into the FS trying to build the swift project from there.

@mxcl
Copy link
Contributor

mxcl commented Jan 28, 2016

Sorry I haven't had a chance to look into this yet.

@mxcl
Copy link
Contributor

mxcl commented Feb 17, 2016

I have pushed a fix for this: 629a93c

Let me know if it works. Thanks.

@swift-ci
Copy link
Contributor Author

swift-ci commented Mar 1, 2016

Comment by Jay Buffington (JIRA)

I've confirmed this fixing the issue I was seeing related to this.

@swift-ci
Copy link
Contributor Author

swift-ci commented Mar 1, 2016

Comment by Marcus Kida (JIRA)

Sorry for not getting back earlier @mxcl, just confirmed this fixed my issues in an dockerized aufs environment. Chapeau.

@mxcl
Copy link
Contributor

mxcl commented Mar 1, 2016

np! Thanks for confirming.

@swift-ci
Copy link
Contributor Author

Comment by tanner0101 (JIRA)

I'm experiencing a similar issue with the `07-29` toolchain. I have a folder mounted from Windows 10 to a Docker Ubuntu 14.04 container.

root@d5f0ce7420c1:/vapor/Hello# swift build
<unknown>:0: error: could not acquire lock file for module 'SwiftShims': failed to create link /vapor/Hello/.build/debug/ModuleCache/19LPOOIZSL9B7/SwiftShims-1KFO504FT44T.pcm.lock to /vapor/Hello/.build/debug/ModuleCache/19LPOOIZSL9B7/SwiftShims-1KFO504FT44T.pcm.lock-53339b52: Protocol error
<unknown>:0: error: missing required module 'SwiftShims'
<unknown>:0: error: build had 1 command failures
error: exit(1): /usr/bin/swift-build-tool -f /vapor/Hello/.build/debug.yaml
root@d5f0ce7420c1:/vapor/Hello# env IS_SWIFTPM_TEST=1 swift build
Compile Swift Module 'Hello' (1 sources)
<unknown>:0: error: error opening '/vapor/Hello/.build/debug/Hello.build/Hello~partial.swiftmodule' for output: Text file busy
<unknown>:0: error: build had 1 command failures
error: exit(1): /usr/bin/swift-build-tool -f /vapor/Hello/.build/debug.yaml

@ddunbar
Copy link
Member

ddunbar commented Jul 31, 2016

This sounds like it is actually an issue in the compiler's module handling mechanism. Maybe we should try to reduce it to a compiler-specific test case.

@swift-ci
Copy link
Contributor Author

Comment by Jayaprakash (JIRA)

tannernelson (JIRA User) Hi, Did you solved this issue? I am facing the same error when I mount the folder and run "swift hello.swift".

Error message:
<unknown>:0: error: could not acquire lock file for module 'SwiftShims'
<unknown>:0: error: missing required module 'SwiftShims'

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants