colima icon indicating copy to clipboard operation
colima copied to clipboard

Cannot build golang project

Open pedjak opened this issue 2 years ago • 6 comments

I am trying to build a golang project using official golang image, and I have project root as the mount, but I am getting the following errors:

/go/pkg/mod/github.com/go-openapi/[email protected]/pointer.go:35:2: zip: not a valid zip file
/go/pkg/mod/github.com/mdlayher/[email protected]/conn.go:7:2: zip: not a valid zip file
/go/pkg/mod/github.com/mdlayher/[email protected]/family_linux.go:11:2: zip: not a valid zip file
/go/pkg/mod/github.com/spf13/[email protected]/viper.go:42:2: zip: not a valid zip file
/go/pkg/mod/go.etcd.io/etcd/client/pkg/[email protected]/fileutil/fileutil.go:24:2: zip: not a valid zip file
/go/pkg/mod/go.etcd.io/etcd/client/pkg/[email protected]/logutil/log_level.go:18:2: zip: not a valid zip file
/go/pkg/mod/go.etcd.io/etcd/client/[email protected]/logger.go:24:2: zip: not a valid zip file
/go/pkg/mod/k8s.io/[email protected]/pkg/proxy/util/utils.go:34:2: zip: not a valid zip file

The very same image works perfectly under linux host.

How can I check if colima volume mounts are ok? I suspect that something is not right there. Using the default settings.

pedjak avatar Apr 11 '22 18:04 pedjak

This is most likely due to sshfs. What project are you trying to build?

The very same image works perfectly under linux host.

Are you referring to running colima under linux host?

How can I check if colima volume mounts are ok? I suspect that something is not right there. Using the default settings.

colima ssh mount | grep sshfs

If you can build colima and lima from source, I can provide instructions to test with 9p instead of sshfs.

abiosoft avatar Apr 11 '22 18:04 abiosoft

I am trying to build Calico project. Yes, please provide me the instruction how to build from source. Or is there any binary already running with 9p support that I can download and use?

pedjak avatar Apr 11 '22 19:04 pedjak

@pedjak Faced the same issue but after multiple runs the build is successful. But, there is some problem with colima volume mounts. The same worked for me with docker desktop with docker runtime.

murugesanp avatar Apr 25 '22 15:04 murugesanp

This is due to the current volume mount driver (sshfs), which tends to be a bit erratic with concurrent reads. The next release will provide the option of using 9p as an alternate driver.

I was able to reproduce this error with sshfs but it worked fine with 9p.

abiosoft avatar Apr 25 '22 16:04 abiosoft

would be NFS share on OSX host be an alternative?

pedjak avatar Apr 25 '22 20:04 pedjak

would be NFS share on OSX host be an alternative?

From my tests, the setup of NFS on macOS has been quite unpredictable. Due to that, it is not currently being considered as an alternative.

abiosoft avatar Apr 28 '22 06:04 abiosoft