dep not work in shared folder between windows and virtualbox

Created on 8 Jan 2018  Â·  13Comments  Â·  Source: golang/dep

What version of dep are you using (dep version)?

dep:
 version     : devel
 build date  : 
 git hash    : 
 go version  : go1.9.2
 go compiler : gc
 platform    : linux/amd64

What dep command did you run?

# dep init
waiting for lockfile /vagrant_data/workspace/wigo/pkg/dep/sm.lock: Lockfile created, but doesn't exist

What did you expect to see?

I need to output normally, it can't work

What did you see instead?

I see the error output to show something goes wrong. I doubt if it's about the shared folder to cause path error or something. please fix it

Most helpful comment

i fix this problem with follows command:
env DEPNOLOCK=1 dep init-v

All 13 comments

This happens reliably, whenever you try running dep init from within the VM?

@sdboyer yes, everytime when I run dep init under the shared folder like /vagrant_data/workspace/ whthin VM.
In Vagrantfile, I configured:

config.vm.synced_folder "./data", "/vagrant_data"

I confirm that I have the same problem.

dep works on the host machine, but waits for the lock on the VM (vagrant + virtualbox):

waiting for lockfile /home/vagrant/host/go/pkg/dep/sm.lock: Lockfile created, but doesn't exist

In my Vagrantfile, I have the following config line for the share folder:

  config.vm.synced_folder ENV["HOME"] + '/go', "/home/vagrant/host/go",
      owner: 1000, group: 1000

I tried removing all the dep generated files and redo a dep init from the VM, but I get the same waiting message even for initialization.

dep version:

dep:
 version     : v0.4.1
 build date  : 2018-01-24
 git hash    : 37d9ea0a
 go version  : go1.9.1
 go compiler : gc
 platform    : linux/amd64

i meet the same wrong: lockfile /home/www/gowork/pkg/dep/sm.lock: Lockfile created, but doesn't exist ,i can not handle it。

does any one solve this trouble。please leave a message. thanks a lot。i am run in vagrant

I have same problem
vagrant@vagrant-ubuntu-trusty-64:/go/src/github.com/tendermint/tendermint$ dep ensure waiting for lockfile /go/pkg/dep/sm.lock: Lockfile created, but doesn't exist waiting for lockfile /go/pkg/dep/sm.lock: Lockfile created, but doesn't exist

dep version:

vagrant@vagrant-ubuntu-trusty-64:/go/src/github.com/tendermint/tendermint$ dep version dep: version : devel build date : git hash : go version : go1.9.2 go compiler : gc platform : linux/amd64 features : ImportDuringSolve=false

Same problem when trying to use a shared folder as DEPCACHEDIR (Docker toolbox on MacOS X). Maybe the problem is due to the fact dep tries to create an hard link (see here and that's not supported by VBox (see https://www.virtualbox.org/ticket/818).

For my use case the solution was to avoid setting DEPCACHEDIR to a shared folder.

Anyone found solution for this issue?
I am also using shared folder on mac and ubuntu and am getting the same error while doing dep ensure

waiting for lockfile /media/sf_workspace/Workspace/go/pkg/dep/sm.lock: Lockfile created, but doesn't exist

Any fixes? I hit same issue with shared folders between macOS and Linux on VMWare Fusion 10.

Update: I was able to run same command from macOS in same folder but I can't do it from Linux:

dep ensure -update github.com/aaa/ss
waiting for lockfile /Users/username/.project/pkg/dep/sm.lock: Lockfile created, but doesn't exist

Linux (I used .sh install tool to pull fresh version):

dep version
dep:
 version     : devel
 build date  : 
 git hash    : 
 go version  : go1.10.2
 go compiler : gc
 platform    : linux/amd64
 features    : ImportDuringSolve=false

macOS:

dep version
dep:
 version     : v0.4.1
 build date  : 2018-01-27
 git hash    : 37d9ea0
 go version  : go1.9.3
 go compiler : gc
 platform    : darwin/amd64

@davide-romanini So you solve it on MacOS?

i fix this problem with follows command:
env DEPNOLOCK=1 dep init-v

Same problem here with an Ubuntu 18.04 VM on top of Win10. GOPATH is in a VirtualBox shared folder.
dep is in an inifinite loop of waiting for the lockfile to be created.

$ dep ensure -v
waiting for lockfile /vagrant/go/pkg/dep/sm.lock: Lockfile created, but doesn't exist
waiting for lockfile /vagrant/go/pkg/dep/sm.lock: Lockfile created, but doesn't exist
... 
$ dep version
dep:
 version     : v0.4.1
 build date  : 2018-01-24
 git hash    : 37d9ea0a
 go version  : go1.9.1
 go compiler : gc
 platform    : linux/amd64

I found that dep automatically deletes the lockfile (/vagrant/go/pkg/dep/sm.lock) even if it is manually created beforehand, or even if it is created manually from another terminal while dep is waiting in its loop.

btw. the DEPNOLOCK hack works for me, as well.

I tried to use the @kispaljr command but I got command not found regarding init-v, so I used env DEPNOLOCK=1 dep ensure -v.

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mohanraj-r picture mohanraj-r  Â·  3Comments

alecthomas picture alecthomas  Â·  3Comments

alethenorio picture alethenorio  Â·  3Comments

jiharal picture jiharal  Â·  3Comments

carolynvs picture carolynvs  Â·  3Comments