dcrd Can't Compile From Github [solved]

Discussion in 'Technical Support' started by walkeralencar, Aug 17, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. walkeralencar

    walkeralencar New Member
    Translator (Português)

    Dec 29, 2015
    57
    24
    Male
    CTO and PHP Consultant
    Brasília-DF, Brazil
    Following steps from: https://github.com/decred/dcrd#linuxbsdmacosxposix---build-from-source

    Code:
    $ git clone https://github.com/decred/dcrd $GOPATH/src/github.com/decred/dcrd
    $ cd $GOPATH/src/github.com/decred/dcrd
    $ glide install
    Result:
     
  2. Dyrk

    Dyrk Sr. Member
    Developer

    Jan 7, 2016
    518
    376
    Male
    Wonderland
    I've just tried on OS X 10.11.6, using:
    go1.6.2 darwin/amd64
    glide 0.11.0-dev


    and dcrd was compiled with no problems. Which OS do you use?
     
  3. jrick

    jrick Member
    Developer

    Jan 4, 2016
    88
    81
    Male
    You are using a glide built with Go 1.5 (where vendoring support has to be manually enabled) so it pulled the wrong dependency version. The easiest fix would be to upgrade to 1.6 or the newly released 1.7.
     
  4. moo1337

    moo1337 Moderator

    Jul 25, 2016
    80
    121
    Male
    Texas
    go 1.5 is on its way out since 1.7 just launched. Time to upgrade.
     
  5. root

    root Member

    Feb 3, 2016
    381
    76
    It worked for me with GO 1.5 some time ago - playing with GOVENDOREXPERIMENT= ?? do not remember.

    Just tried with golang-1.6.3-1.fc24.x86_64
    Code:
    cd $GOPATH/src/github.com/decred/dcrd
    git pull
    ../../../../bin/glide install
    go build
    cd $GOPATH/src/github.com/decred/dcrwallet
    git pull
    ../../../../bin/glide install
    go build
    go build github.com/decred/dcrd/cmd/dcrctl
    
    worked just fine
     
  6. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    As others have said, you really should update to Go 1.6, or even better Go 1.7 which offers the new SSA backend and related optimizations (which are pretty significant).

    However, with Go 1.5, you need to set the GOVENDOREXPERIMENT environment variable in order to work with glide vendoring.

    Code:
    $ git clone https://github.com/decred/dcrd $GOPATH/src/github.com/decred/dcrd
    $ cd $GOPATH/src/github.com/decred/dcrd
    $ export GOVENDOREXPERIMENT=1   # Required for Go 1.5 only -- no need to set for 1.6+
    $ glide install
    
    EDIT: It was pointed out that the error you're seeing is because glide itself was built without the GOVENDOREXPERIMENT=1 variable set, so you'll need to rebuild glide with it set too.
     
  7. walkeralencar

    walkeralencar New Member
    Translator (Português)

    Dec 29, 2015
    57
    24
    Male
    CTO and PHP Consultant
    Brasília-DF, Brazil
    Thanks all, for information, updating my go version: it's go1.5.1 linux/amd64
     
  8. moo1337

    moo1337 Moderator

    Jul 25, 2016
    80
    121
    Male
    Texas
    Must be ubuntu...

    Ubuntu jokes :)
     
  9. walkeralencar

    walkeralencar New Member
    Translator (Português)

    Dec 29, 2015
    57
    24
    Male
    CTO and PHP Consultant
    Brasília-DF, Brazil
    Here we use Mint or ElementaryOS ( both Ubuntu based ) :D
     
  10. moo1337

    moo1337 Moderator

    Jul 25, 2016
    80
    121
    Male
    Texas
    Without fail ancient code is debian based...
     

Share This Page