Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to Make from Source #265

Open
praveenkumar2608 opened this issue Jan 29, 2020 · 7 comments
Open

Not able to Make from Source #265

praveenkumar2608 opened this issue Jan 29, 2020 · 7 comments

Comments

@praveenkumar2608
Copy link

I have cloned the master build and and tried to make it. I am getting lot of errors:

make
Building...
go build -v -o ./bin/gobetween -ldflags '-X main.version=0.8.0+snapshot -X main.revision=284e9fc5229cfd804e1bee0caba3ecc15abc0454 -X main.branch=master' .
go: creating new go.mod: module github.com/yyyar/gobetween
go: finding github.com/yyyar/gobetween/utils/codec latest
go: finding github.com/yyyar/gobetween/logging latest
go: finding github.com/yyyar/gobetween/info latest
go: finding github.com/yyyar/gobetween/manager latest
go: finding github.com/yyyar/gobetween/metrics latest
go: finding github.com/yyyar/gobetween/src/config latest
go: finding github.com/yyyar/gobetween/utils latest
Fetching https://github.com?go-get=1
go: finding github.com/yyyar/gobetween/src latest
Parsing meta tags from https://github.com?go-get=1 (status code 200)
go: github.com/yyyar/gobetween/src@v0.0.0-20200123060714-284e9fc5229c: parsing go.mod: unexpected module path "github.com/yyyar/gobetween"
go: error loading module requirements
make: *** [build] Error 1

@yyyar
Copy link
Owner

yyyar commented Jan 29, 2020

@praveenkumar2608 what go version do you have? go version
And on what OS are you running the build?

@praveenkumar2608
Copy link
Author

go version go1.12.15 linux/amd64
&
CentOS Linux release 7.6.1810 (Core)

@yyyar
Copy link
Owner

yyyar commented Jan 29, 2020

Hm, it looks very strange, it should build fine.
Please check your local files are not modified and you have a clean clone of the repo.
Also, please show the output of the commands git status and cat go.mod
Thanks!

@praveenkumar2608
Copy link
Author

Here is output

gobetween]# git status

On branch master

nothing to commit, working directory clean
[root@netops1 gobetween]# cat go.mod
module github.com/yyyar/gobetween/main

go 1.12

replace github.com/yyyar/gobetween => ./src

require github.com/yyyar/gobetween v0.0.0-00010101000000-000000000000
<

@praveenkumar2608
Copy link
Author

praveenkumar2608 commented Jan 29, 2020

I am getting this error when I do make. only after moving go.mod, it actually tried to make it, but fails.

require github.com/yyyar/gobetween v0.0.0-00010101000000-000000000000
[root@netops1 gobetween]# make
Building...
go build -v -o ./bin/gobetween -ldflags '-X main.version=0.8.0+snapshot -X main.revision=284e9fc5229cfd804e1bee0caba3ecc15abc0454 -X main.branch=master' .
$GOPATH/go.mod exists but should not
make: *** [build] Error 1

<

After make, I am getting this error

Fetching https://github.com?go-get=1
Parsing meta tags from https://github.com?go-get=1 (status code 200)
build github.com/yyyar/gobetween/main/gobetween: cannot load github.com/yyyar/gobetween/api: cannot find module providing package github.com/yyyar/gobetween/api
make: *** [build] Error 1

@praveenkumar2608
Copy link
Author

Dear Team,

Any insight on this?

@yyyar
Copy link
Owner

yyyar commented Feb 3, 2020

Hi @praveenkumar2608
I've tried to reproduce it in different environments but got no luck: I've never got an error like yours.
It also works on Travis CI (See log here https://travis-ci.org/yyyar/gobetween/jobs/641248961) and on automatic Docker builds with no errors.

Possibly something wrong with your Golang installation.
Maybe clearing go cache and trying make again would help:
go clean -cache -modcache -i -r

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

No branches or pull requests

2 participants