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

go-ipfs build error #5042

Closed
coolskyman opened this issue May 29, 2018 · 15 comments
Closed

go-ipfs build error #5042

coolskyman opened this issue May 29, 2018 · 15 comments

Comments

@coolskyman
Copy link

now i build go-ipfs by goland IDE,but found error for
go-ipfs\blockservice\blockservice.go:135:29: cannot use c (type *"github.com/ipfs/go-cid".Cid) as type *"gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid".Cid in argument to verifcid.ValidateCid

i found go-cid has define twice
how can i deal this error?

@Stebalien
Copy link
Member

Try removing $GOPATH/src/gx and then running make deps again. It looks like something screwed up your build environment.

Also, have you modified anything?

@coolskyman
Copy link
Author

coolskyman commented May 29, 2018

I didn't change anything

I have some doubts
in \src\github.com\ipfs\go-ipfs\blockservice\blockservice.go
import was
cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid"
exchange "gx/ipfs/QmdcAXgEHUueP4A7b5hjabKn2EooeHgMreMvFC249dGCgc/go-ipfs-exchange-interface"
blocks "gx/ipfs/Qmej7nf81hi2x2tvjRBF3mcp74sQyuDH4VMYDGd1YtXjb2/go-block-format"

but in gx/ipfs/Qmej7nf81hi2x2tvjRBF3mcp74sQyuDH4VMYDGd1YtXjb2/go-block-format
import was
cid "github.com/ipfs/go-cid"
u "github.com/ipfs/go-ipfs-util"
mh "github.com/multiformats/go-multihash"

cid in both gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid and github.com/ipfs/go-cid

I think the problem is here 。but i don't understand

@Stebalien
Copy link
Member

So, gx, our package manager, should have rewritten the paths in gx/ipfs/Qmej7nf81hi2x2tvjRBF3mcp74sQyuDH4VMYDGd1YtXjb2/go-block-format to be of the form gx/ipfs/Something/package-name. That's why I suggested deleting the gx/ipfs/... packages and running make deps to download and install them again.

@coolskyman
Copy link
Author

now,i use new GOPATH and download ipfs-go code by git
but ,found error when "make install"
$ make install
bin/check_go_version 1.10
bin/check_go_path /cygdrive/d/gospace/src/github.com/ipfs/go-ipfs /cygdrive/d/gospace/src/github.com/ipfs/go-ipfs
installing gx v0.13.0
bin/dist_get "/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog" gx bin/gx-v0.13.0 v0.13.0
==> Using wget to download "https://ipfs.io/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog/gx/v0.13.0/gx_v0.13.0_windows-amd64.zip" to "bin/tmp/gx.zip"
--2018-05-30 11:28:32-- https://ipfs.io/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog/gx/v0.13.0/gx_v0.13.0_windows-amd64.zip

i found there was no gx_v0.13.0_windows-amd64.zip in this dir
same to gx-go

where can i get this two zip file?

@schomatis
Copy link
Contributor

Hey @coolskyman, apparently the current master of go-ipfs is broken for Windows, those files you're looking for weren't generated (see ipfs/distributions#186), maybe @djdv has a solution for this.

@coolskyman
Copy link
Author

thanks

@djdv
Copy link
Contributor

djdv commented May 30, 2018

@coolskyman
You can try installing a previous gx and gx-go release or build them yourself.
Then, to force make to use them, make sure they are in your PATH, and set IPFS_GX_USE_GLOBAL=1 before invoking make.

@djdv
Copy link
Contributor

djdv commented Jun 6, 2018

@coolskyman
This should be resolved now. Windows builds of gx and gx-go are published (as well as fs-repo-migrations for all platforms).

@My9Bot
Copy link

My9Bot commented Jun 6, 2018

hmmm no

>git reset --hard
HEAD is now at fc05376e9 Merge pull request #4817 from ipfs/feat/refactor

>git pull
Already up to date.

>make install
bin/check_go_version 1.10
bin/check_go_path /c/Users/xxxx/go/src/github.com/ipfs/go-ipfs /c/Users/xxxxx/go/src/github.com/ipfs/go-ipfs
installing gx v0.13.0
bin/dist_get "/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog" gx bin/gx-v0.13.0 v0.13.0
==> Using wget to download "https://ipfs.io/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog/gx/v0.13.0/gx_v0.13.0_windows-amd64.zip" to "bin/tmp/gx.zip"
https://ipfs.io/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog/gx/v0.13.0/gx_v0.13.0_windows-amd64.zip: Unsupported scheme.
error: couldn't download with wget (1)
==> Using curl to download "https://ipfs.io/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog/gx/v0.13.0/gx_v0.13.0_windows-amd64.zip" to "bin/tmp/gx.zip"

!at https://ipfs.io/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog/gx/
is no "gx_v0.13.0_windows-amd64.zip" file

@Stebalien
Copy link
Member

That's because I forgot to pin it... working on it.

@Stebalien
Copy link
Member

Fixed.

@My9Bot
Copy link

My9Bot commented Jun 7, 2018

i still have the same problem

@AbelYANG2022
Copy link

@djdv Sorry, I follow the steps build the source code on windows 10, but still showing the same error:
Unable to download https://ipfs.io/ipfs/QmXtsjCX29kcdeSjrijWiFTK1qwQNW8UrEWDi8okuC2Pog/gx/v0.13.0/gx_v0.13.0_windows-amd64.zip. exiting.

image

@djdv
Copy link
Contributor

djdv commented Jun 10, 2018

@My9Bot, @FactorYang
Sorry, the dist_root needed to be updated in the makefile. This branch should work:
#5093
but it hasen't been merged yet.

@Stebalien, @whyrusleeping
Is there anything preventing #5093?
The test was encountering timeouts while the root was not pinned, since the root is now available and pinned, if the test could be restarted (and pass), I think it can be merged.
I don't have permission to do either.

@whyrusleeping
Copy link
Member

@djdv oh whoops, i thought i merged that one.

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

8 participants