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

bug/question: Trying to build without downloading gx #3235

Closed
progval opened this issue Sep 18, 2016 · 20 comments
Closed

bug/question: Trying to build without downloading gx #3235

progval opened this issue Sep 18, 2016 · 20 comments

Comments

@progval
Copy link

progval commented Sep 18, 2016

Version information:

git master

Type:

bug / question

Priority:

P4

Description:

I am trying to build ipfs without downloading gx and gx-go as binary executables.

I did the following:

 ipfs@particle  ~  echo $GOPATH
/home/ipfs/go/
 ipfs@particle  ~  rm -rf $GOPATH
 ipfs@particle  ~  go get github.com/whyrusleeping/gx github.com/whyrusleeping/gx-go github.com/ipfs/go-ipfs
 ipfs@particle  ~  cd go/src/github.com/ipfs/go-ipfs
 ipfs@particle  ~/go/src/github.com/ipfs/go-ipfs   master  sed -i "s#gx_bin=bin/gx-v0.9.0#gx_bin=$GOPATH/bin/gx#" Makefile         
 ipfs@particle  ~/go/src/github.com/ipfs/go-ipfs   master ●  sed -i "s#gx-go_bin=bin/gx-go-v1.3.0#gx-go_bin=$GOPATH/bin/gx-go#" Makefile

However, when I try to make it, I get this:

 ipfs@particle  ~/go/src/github.com/ipfs/go-ipfs   master ●  make install
/home/ipfs/go//bin/gx --verbose install --global
runhook(req-check): No gx helper tool found for go
runhook(install-path): No gx helper tool found for go
installing package: go-ipfs-0.4.4-dev
  - QmYrv4LgCC8FhG2Ab4bwuq5DqBdwMtx3hMb3KKJDZcr2d7 not found locally, fetching into vendor/gx/ipfs/QmYrv4LgCC8FhG2Ab4bwuq5DqBdwMtx3hMb3KKJDZcr2d7
  - fetching QmYrv4LgCC8FhG2Ab4bwuq5DqBdwMtx3hMb3KKJDZcr2d7 via ipfs api
  - QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt not found locally, fetching into vendor/gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt


[verbose stuff]

installing package: go-libp2p-loggables-1.0.11
successfully found all deps for go-libp2p-loggables
installation of go-libp2p-loggables complete!
installation of go-ipfs complete!
make -C cmd/ipfs install
make[1] : on entre dans le répertoire « /home/ipfs/go/src/github.com/ipfs/go-ipfs/cmd/ipfs »
go install -ldflags="-X "github.com/ipfs/go-ipfs/repo/config".CurrentCommit=73cd8b3"
../../vendor/gx/ipfs/QmdhsRK1EK2fvAz2i2SH5DEfkL6seDuyMYEsxKa9Braim3/client_golang/prometheus/summary.go:23:2: cannot find package "github.com/beorn7/perks/quantile" in any of:
    /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/gx/ipfs/QmdhsRK1EK2fvAz2i2SH5DEfkL6seDuyMYEsxKa9Braim3/client_golang/prometheus/vendor/github.com/beorn7/perks/quantile (vendor tree)
    /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/github.com/beorn7/perks/quantile
    /usr/lib/go-1.7/src/github.com/beorn7/perks/quantile (from $GOROOT)
    /home/ipfs/go/src/github.com/beorn7/perks/quantile (from $GOPATH)
../../vendor/gx/ipfs/QmeqtHtxGfcsfXiou7wqHJARWPKUTUcPdtSfSYYHp48dtQ/go-ds-measure/measure.go:9:2: cannot find package "github.com/codahale/metrics" in any of:
    /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/github.com/codahale/metrics (vendor tree)
    /usr/lib/go-1.7/src/github.com/codahale/metrics (from $GOROOT)
    /home/ipfs/go/src/github.com/codahale/metrics (from $GOPATH)

[other similar errors]

The file /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/gx/ipfs/QmdhsRK1EK2fvAz2i2SH5DEfkL6seDuyMYEsxKa9Braim3/client_golang/prometheus/vendor/github.com/beorn7/perks/quantile indeed does not exist:

 ✘ ipfs@particle  ~/go/src/github.com/ipfs/go-ipfs   master ●  ls /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/gx/ipfs/QmdhsRK1EK2fvAz2i2SH5DEfkL6seDuyMYEsxKa9Braim3/client_golang/prometheus/vendor/
gx

In case it helps, here is the content in this directory:

 ipfs@particle  ~/go/src/github.com/ipfs/go-ipfs   master ●  ls /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/gx/ipfs/QmdhsRK1EK2fvAz2i2SH5DEfkL6seDuyMYEsxKa9Braim3/client_golang/prometheus/vendor/gx/    
ipfs
 ipfs@particle  ~/go/src/github.com/ipfs/go-ipfs   master ●  ls /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/gx/ipfs/QmdhsRK1EK2fvAz2i2SH5DEfkL6seDuyMYEsxKa9Braim3/client_golang/prometheus/vendor/gx/ipfs/
QmT6n4mspWYEya864BhCUJEgyxiRfmiSY9ruQwTUNpRKaM  QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt

Any idea of what I could do to make this work?

(Sorry if my question is actually about gx; I can close this issue and open an other one at gx's repo if you want.)

@progval progval changed the title Trying to build without downloading gx bug/question: Trying to build without downloading gx Sep 18, 2016
@Kubuxu
Copy link
Member

Kubuxu commented Sep 18, 2016

You can build/install manually as of here https://github.com/ipfs/go-ipfs#building-on-less-common-systems

@mateon1
Copy link
Contributor

mateon1 commented Sep 18, 2016

/cc @whyrusleeping - The final error in the OP is very similar to what I experienced with the gx corruption I mentioned on IRC. (gx thinks that packages exist, but the folders for these packages don't exist)

@progval
Copy link
Author

progval commented Sep 18, 2016

@Kubuxu Same error, when running the last command:

 ipfs@particle  ~/go/src/github.com/ipfs/go-ipfs   master  go install ./cmd/ipfs
vendor/gx/ipfs/QmdhsRK1EK2fvAz2i2SH5DEfkL6seDuyMYEsxKa9Braim3/client_golang/prometheus/summary.go:23:2: cannot find package "github.com/beorn7/perks/quantile" in any of:
    /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/gx/ipfs/QmdhsRK1EK2fvAz2i2SH5DEfkL6seDuyMYEsxKa9Braim3/client_golang/prometheus/vendor/github.com/beorn7/perks/quantile (vendor tree)
    /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/github.com/beorn7/perks/quantile
    /usr/lib/go-1.7/src/github.com/beorn7/perks/quantile (from $GOROOT)
    /home/ipfs/go/src/github.com/beorn7/perks/quantile (from $GOPATH)
vendor/gx/ipfs/QmeqtHtxGfcsfXiou7wqHJARWPKUTUcPdtSfSYYHp48dtQ/go-ds-measure/measure.go:9:2: cannot find package "github.com/codahale/metrics" in any of:
    /home/ipfs/go/src/github.com/ipfs/go-ipfs/vendor/github.com/codahale/metrics (vendor tree)
    /usr/lib/go-1.7/src/github.com/codahale/metrics (from $GOROOT)
    /home/ipfs/go/src/github.com/codahale/metrics (from $GOPATH)

[etc.]

@mateon1
Copy link
Contributor

mateon1 commented Sep 18, 2016

@progval I had the same issue and going to $GOPATH/src and removing the gx folder, as well as going to $GOPATH/src/github.com/ipfs/go-ipfs/vendor and removing gx there seemed to fix the problem.

@progval
Copy link
Author

progval commented Sep 18, 2016

@mateon1 $GOPATH/src/gx does not exist, and removing $GOPATH/src/github.com/ipfs/go-ipfs/vendor/gx does not help

@mateon1
Copy link
Contributor

mateon1 commented Sep 18, 2016

@progval Okay, if that's the case try removing the vendor/gx folder again, and then doing gx install --global

@Kubuxu
Copy link
Member

Kubuxu commented Sep 18, 2016

You might have very old version of Gx, remove the vendor directory and do gx install --global which is now default.

@progval
Copy link
Author

progval commented Sep 18, 2016

No change.

By the way, my version of gx:

 ipfs@particle  ~/go/src/github.com/ipfs/go-ipfs   master  $GOPATH/bin/gx --version       
gx version 0.9.1

@Kubuxu
Copy link
Member

Kubuxu commented Sep 18, 2016

Can you show output of go env?

@progval
Copy link
Author

progval commented Sep 18, 2016

GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ipfs/go/"
GORACE=""
GOROOT="/usr/lib/go-1.7"
GOTOOLDIR="/usr/lib/go-1.7/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build861211977=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

I run Debian testing, by the way.

@whyrusleeping
Copy link
Member

The issues here appear to be because you don't have gx-go installed.

@whyrusleeping
Copy link
Member

Note the warning in your gx install output:

runhook(req-check): No gx helper tool found for go
runhook(install-path): No gx helper tool found for go

@progval
Copy link
Author

progval commented Sep 18, 2016

These errors were when I used make.

I don't get this error when I use the method suggested by Kubuxu.

(But even when I used make, $GOPATH/bin/gx-go existed)

@whyrusleeping
Copy link
Member

You were using make, but it looks like you were trying to override the gx binary. I'm assuming whatever value you set for gx-go_bin is incorrect and/or not in your path.

@Kubuxu
Copy link
Member

Kubuxu commented Sep 18, 2016

Ok, can you show output of which gx and which gx-go?

@progval
Copy link
Author

progval commented Sep 18, 2016

Indeed, it was not in my $PATH.

@progval
Copy link
Author

progval commented Sep 18, 2016

Adding it to my $PATH fixes the issue.

I'm keeping the issue open in case you want to improve handling of gx-go missing from the $PATH, but feel free to close it otherwise.

@jbenet
Copy link
Member

jbenet commented Sep 19, 2016

Sounds like an issue in gx, which I ran into yesterday too. Let's file it
over there?
On Mon, Sep 19, 2016 at 1:00 AM Valentin Lorentz [email protected]
wrote:

Adding it to my $PATH fixes the issue.

I'm keeping the issue open in case you want to improve handling of gx-go
missing from the $PATH, but feel free to close it otherwise.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#3235 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAIcoSxSsTLj7cW3fQydsy5xOEThtbRvks5qrW4XgaJpZM4J_6qv
.

@whyrusleeping
Copy link
Member

@progval Yeah, I think that we should have a "subtool required" option in gx configs that makes things fail out if its missing.

@whyrusleeping whyrusleeping added the status/deferred Conscious decision to pause or backlog label Nov 28, 2016
@Kubuxu
Copy link
Member

Kubuxu commented Apr 5, 2019

We have switched to go modules (#6038) so there is no gx anymore.

@Kubuxu Kubuxu closed this as completed Apr 5, 2019
@ghost ghost removed the status/deferred Conscious decision to pause or backlog label Apr 5, 2019
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

5 participants