title: Can't Cross-Compile Go project with Xgo using CGO AMD=> ARM
body: <p>I'm working on go project that implmenting C code ! </p>
  
  <p>I can build the project on linux/amd64, and we now that go don't cross compile if we use "IMPORT C".
  So i work with XGO that maybe help me to cross compiling for ARM.</p>
  
  <p>i check XGO by cross compiling version of my go project without C code and it's work like cross compil of go.</p>
  
  <p><strong>my environement :</strong>  </p>
  
  <pre><code>go version go1.13.3 linux/amd64
  </code></pre>
  
  <p><strong>Go env :</strong></p>
  
  <pre><code>GO111MODULE="on"
  GOARCH="amd64"
  GOBIN="/opt/go/bin"
  GOCACHE="/home/jj/.cache/go-build"
  GOENV="/home/jj/.config/go/env"
  GOEXE=""
  GOFLAGS=""
  GOHOSTARCH="amd64"
  GOHOSTOS="linux"
  GONOPROXY=""
  GONOSUMDB=""
  GOOS="linux"
  GOPATH="/opt/go"
  GOPRIVATE=""
  GOPROXY="https://proxy.golang.org,direct"
  GOROOT="/usr/local/go"
  GOSUMDB="sum.golang.org"
  GOTMPDIR=""
  GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
  GCCGO="gccgo"
  AR="ar"
  CC="gcc"
  CXX="g++"
  CGO_ENABLED="1"
  GOMOD="/opt/go/src/github.com/brocaar/lora-app-server/go.mod"
  CGO_CFLAGS="-g -O2"
  CGO_CPPFLAGS=""
  </code></pre>
  
  <p><strong>My project is on</strong> =></p>
  
  <pre><code>/opt/go/src/github.com/brocaar
  </code></pre>
  
  <p>My package that include c code is on =></p>
  
  <pre><code>/opt/go/src/github.com/lorawan
  </code></pre>
  
  <p><strong>the go.mode of my project</strong> : </p>
  
  <pre><code>  module github.com/brocaar/lora-app-server
  
    go 1.12
  
    replace github.com/brocaar/lorawan =&gt; /opt/go/src/github.com/brocaar/lorawan
  
    require (
             cloud.google.com/go v0.44.3
             github.com/Azure/azure-service-bus-go v0.9.1
             github.com/NickBall/go-aes-key-wrap v0.0.0-20170929221519-1c3aa3e4dfc5
             github.com/aws/aws-sdk-go v1.19.19
             github.com/brocaar/loraserver v0.0.0-20190917115647-c4da45f52f2b
             github.com/brocaar/lorawan v0.0.0-20190814113539-8eb2a8d6da09
             github.com/dgrijalva/jwt-go v3.2.0+incompatible
             github.com/eclipse/paho.mqtt.golang v1.2.0
             github.com/elazarl/go-bindata-assetfs v1.0.0
             github.com/gofrs/uuid v3.2.0+incompatible
             github.com/golang/protobuf v1.3.2
             github.com/gomodule/redigo v2.0.0+incompatible
             github.com/goreleaser/goreleaser v0.106.0
  
           )
  </code></pre>
  
  <p><strong>My command to cross-compil is</strong>: </p>
  
  <pre><code>xgo -go 1.13.3  --targets=linux/arm-7 /opt/go/src/github.com/brocaar/lora-app-server/cmd/lora-app-server
  </code></pre>
  
  <p><strong>The result error are</strong> : </p>
  
  <pre><code>src/github.com/brocaar/lora-app-server/cmd/lora-app-server
  </code></pre>
  
  <p>Checking docker installation...
      Client:
        Version:           18.09.7
        API version:       1.39
        Go version:        go1.10.4
        Git commit:        2d0083d
        Built:             Fri Aug 16 14:19:38 2019
        OS/Arch:           linux/amd64
        Experimental:      false</p>
  
  <pre><code>Server:
    Engine:
    Version:          18.09.7
    API version:      1.39 (minimum version 1.12)
    Go version:       go1.10.4
    Git commit:       2d0083d
    Built:            Thu Aug 15 15:12:41 2019
    OS/Arch:          linux/amd64
    Experimental:     false
  
    Checking for required docker image karalabe/xgo-1.13.3... found.
    Cross compiling github.com/brocaar/lora-app-server/cmd/lora-app-server...
  Building locally github.com/brocaar/lora-app-server/cmd/lora-app-server...
  Bootstrapping linux/arm-7...
  go: github.com/brocaar/lorawan@v0.0.0-20190814113539-8eb2a8d6da09: parsing 
  /opt/go/src/github.com/brocaar/lorawan/go.mod: open /opt/go/src/github.com/brocaar/lorawan/go.mod: no 
  such file or directory
  2019/12/03 16:02:37 Failed to cross compile package: exit status 1.
  </code></pre>
  
  <p>I really don't now why he say "no such file or directory", because there are go.mod in folder lorawan ! can some one help me ? thanks</p>