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

Regression in local paths #115

Open
AlbinoGeek opened this issue Apr 1, 2018 · 6 comments · May be fixed by #116
Open

Regression in local paths #115

AlbinoGeek opened this issue Apr 1, 2018 · 6 comments · May be fixed by #116

Comments

@AlbinoGeek
Copy link

AlbinoGeek commented Apr 1, 2018

Contrary to #1 being closed:

localpkg does not work

xgo --targets=darwin/386,darwin/ amd64,linux/386,linux/amd64,windows/386,windows/amd64 ./

Checking for required docker image billziss/xgo-cgofuse... found.
Cross compiling private/source/path...
Building locally private/source/path...
go: GOPATH entry is relative; must be absolute path: "\\ext-go\\1".
For more details see: 'go help gopath'
Compiling for darwin-10.6/386...
go: GOPATH entry is relative; must be absolute path: "\\ext-go\\1".
For more details see: 'go help gopath'
2018/04/01 14:53:03 Failed to cross compile package: exit status 2.

And of course since it's not a published package, I can't do the normal way:

Fetching main repository private/source/path...
Fetching https://private/source/path?go-get=1
https fetch failed: Get https://private/source/path?go-get=1: remote error: tls: handshake failure
package private/source/path: unrecognized import path "private/source/path" (https fetch: Get https://private/source/path?go-get=1: remote error: tls: handshake failure)
/build.sh: line 73: cd: /go/src/private/source/path: No such file or directory
2018/04/01 14:55:11 Failed to cross compile package: exit status 1.

Why can't you just mount the directory I call it from?

@AlbinoGeek
Copy link
Author

gox . works 100% as expected

@kevinpfab kevinpfab linked a pull request Apr 5, 2018 that will close this issue
@astockwell
Copy link

I'm also experiencing this issue:

xgo --targets=linux/amd64 . (with or without trailing slash) on OSX yields:

Checking for required docker image karalabe/xgo-latest... found.
Cross compiling ....
Building locally ....
Compiling for linux/amd64...
can't load package: package .: no Go files in /
2018/05/09 07:48:54 Failed to cross compile package: exit status 1.
make: *** [ccnix] Error 1

@astockwell
Copy link

Apologies, my issue was my own mistake, I was trying to build a project outside of my GOPATH. Hopefully this is a reminder to anyone else who runs into this issue - triple-check your project is in your GOPATH!

@AlbinoGeek
Copy link
Author

Still an issue in my case, will not compile relative paths.

@jjhesk
Copy link

jjhesk commented Dec 5, 2018

+1

@eycorsican
Copy link

I encountered a similar issue that I found it was caused by symbol links contain in one of my import package that link to folders outside of the GOPATH (in my case, it's some symbol links that generated by bazel, and I have ignored bazel-* so I didn't notice it before). Just as @astockwell mentioned, triple-check your project is in your GOPATH.

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

Successfully merging a pull request may close this issue.

4 participants