Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

no Go files in / #176

Open
kstenerud opened this issue Dec 9, 2019 · 2 comments
Open

no Go files in / #176

kstenerud opened this issue Dec 9, 2019 · 2 comments

Comments

@kstenerud
Copy link

Attempting to cross-compile a plugin fails:

karl@chrx:~/tmp/tgo$ ls
go.mod  main.go
karl@chrx:~/tmp/tgo$ cat go.mod 
module tgo

go 1.13
karl@chrx:~/tmp/tgo$ cat main.go 
package main

func main() {
}
karl@chrx:~/tmp/tgo$ GOPATH=$HOME/go xgo -buildmode=plugin --targets=darwin/* .
Checking docker installation...
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:29:52 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:22 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Checking for required docker image karalabe/xgo-latest... found.
Cross compiling ....
Building locally ....
Compiling for darwin-10.6/amd64...
can't load package: package .: no Go files in /
2019/12/09 10:18:31 Failed to cross compile package: exit status 1.
@sungwoncho
Copy link

What is the content of your go.mod? Also is there a GOPATH environment variable set?

@15652768278
Copy link

I have the same problem, and I use the go mod to manage deps
I try to create a soft link use ln -s on $GOPATH/src/poject_path and the project actual path, the problem goes away

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants