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

Error on build Docker image: cannot find package "github.com/ethereum/go-ethereum/pow" #131

Closed
drrest opened this issue Apr 5, 2017 · 15 comments

Comments

@drrest
Copy link

drrest commented Apr 5, 2017

Help me please!

While building Docker raise error:

package github.com/ethereum/go-ethereum/pow: cannot find package "github.com/ethereum/go-ethereum/pow" in any of:
	/usr/lib/go-1.6/src/github.com/ethereum/go-ethereum/pow (from $GOROOT)
	/open-ethereum-pool/build/_workspace/src/github.com/ethereum/go-ethereum/pow (from $GOPATH)

When i look inside of folder " _workspace/src/github.com/ethereum/go-ethereum/ " i have no see folder pow.

I trying to switch branches and in "poc8" branch of go-ethereum folder "poc8" found, but this is not work.

I trying to add
go get github.com/ethereum/go-ethereum/pow

Help please!!!

@ghost
Copy link

ghost commented Apr 6, 2017

It not just docker. They broke the dependency in go-ethereum by removing pow.

@sammy007
Copy link
Owner

sammy007 commented Apr 6, 2017

Go spam this instead ethereum/ethash#94

I am not getting paid from anyone so I am not going to maintain my own versions of their broken packages, they either fix their shit or I am out. My proposal is in related issue.

@mikeyb
Copy link

mikeyb commented Apr 6, 2017

go get github.com/ethereumproject/go-ethereum/pow
etc..

Should work for you long term as classic chain will stay PoW/ethash for the foreseeable future.

@karalabe
Copy link

karalabe commented Apr 7, 2017

This upstream PR should solve the issue ethereum/ethash#95 . Note that the ethereum/ethash repository is based on the C++ code, which has a lot of shortcomings and is incompatible with big endian systems. That was the reason for reimplementing ethash in Go https://godoc.org/github.com/ethereum/go-ethereum/consensus/ethash. I'd suggest switching over to that package.

PS: And I strongly suggest vendoring dependencies, as none of this would happen if open pool used proper Go development methodology.

@sammy007
Copy link
Owner

sammy007 commented Apr 7, 2017

I didn't expect that you are going to grind whole go-ethereum repo so hard, ethash was okay for a year, I will consider switching indeed, but time is limited, at first look I have no idea what is the replacement for Verify.

@karalabe
Copy link

karalabe commented Apr 7, 2017

I'll try to fix up the old ethash. You are right in that it shouldn't break. The PR I mentioned vendors (or should) everything it that it used so it shouldn't ever break again. I'll see if I can get it merged in and Ill try to build open pool to see if it fixes the issue.

@sammy007
Copy link
Owner

sammy007 commented Apr 7, 2017

Yeah please fix, I will switch to vendoring indeed since it's now fashionable, when this repo was born we had tons of crutches for deps so I totally ignored all of them.

@karalabe
Copy link

karalabe commented Apr 7, 2017

Btw, I suggest govendor. We've went through a ton of different ones, all having some weird cornercases. govendor was the only one that actually manages to "properly" handle out repo. It still needs a few special "clauses" due to c++ crypto, but that's the last non-go thing.

@sammy007
Copy link
Owner

sammy007 commented Apr 7, 2017

Okay thx for suggestion.

@karalabe
Copy link

karalabe commented Apr 7, 2017

Is there a docker image for open pool I can try to build to verify that my fix works?

@sammy007
Copy link
Owner

sammy007 commented Apr 7, 2017

I don't use docker, so there is no Dockerfile.

I need to make some fixes on my side also:

proxy/miner.go:44: cannot use share (type Block) as type ethash.Block in argument to hasher.Light.Verify:
	Block does not implement ethash.Block (wrong type for HashNoNonce method)
		have HashNoNonce() "github.com/ethereum/go-ethereum/common".Hash
		want HashNoNonce() "github.com/ethereum/ethash/vendor/github.com/ethereum/go-ethereum/common".Hash
proxy/miner.go:48: cannot use block (type Block) as type ethash.Block in argument to hasher.Light.Verify:
	Block does not implement ethash.Block (wrong type for HashNoNonce method)
		have HashNoNonce() "github.com/ethereum/go-ethereum/common".Hash
		want HashNoNonce() "github.com/ethereum/ethash/vendor/github.com/ethereum/go-ethereum/common".Hash
make: *** [all] Error 2

@sammy007
Copy link
Owner

sammy007 commented Apr 7, 2017

Installation is dead simple, clone repo and run make.

@karalabe
Copy link

karalabe commented Apr 7, 2017

No, that's still my error. You can't have vendored types in the API (since they will be different). Will push a second fix in a moment.

@karalabe
Copy link

karalabe commented Apr 7, 2017

Ok, so I will not vendor in common since that's part of the API. This is a bit ugly but there's not much to do, it was a bad design decision whoever made it way back.

@sammy007
Copy link
Owner

sammy007 commented Apr 7, 2017

Cool, it works now, much appreciated!

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

No branches or pull requests

4 participants