Giter VIP home page Giter VIP logo

Comments (7)

diwakergupta avatar diwakergupta commented on May 29, 2024

@banool First, unless you're actually developing dbxcli, you shouldn't need to build from source. Just download the latest binary for your platform from the releases page:
https://github.com/dropbox/dbxcli/releases

Second, you shouldn't need to go get anything additional -- all the dependencies are vendored-in (see the vendor directory). So if you've cloned the repo, just running go build in the root directory should suffice.

Feel free to reopen if you're still running into any problems.

from dbxcli.

banool avatar banool commented on May 29, 2024

Running go build on its own doesn't work. I still get the same error about versionCmd. When I remove the versionCmd line, like I said the auth step doesn't work, I still get that 400 error.

from dbxcli.

diwakergupta avatar diwakergupta commented on May 29, 2024

@banool are you sure you are compiling in the correct directory? vendor directories only work if your GOROOT, GOPATH etc are all setup correctly. FWIW, I just did the following:

  • Create a vanilla Ubuntu VM container on Google Cloud
  • Install go and git
  • Create $HOME/go
  • Run go get github.com/dropbox/dbxcli
  • cd ~/go/src/github.com/dropbox/dbxcli
  • go build

This works perfectly fine. Can you add the output of go env on your system?

from dbxcli.

diwakergupta avatar diwakergupta commented on May 29, 2024

Actually from your original post, seems like you are compiling from the directory Users/daniel/github/dbxcli -- this will NOT work. You need to create $HOME/go and then run go get. To learn more, see https://golang.org/doc/install#testing and https://golang.org/doc/code.html#Workspaces

from dbxcli.

banool avatar banool commented on May 29, 2024

Ah that worked for me build wise. The output of go env is:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/daniel/.go"
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/23/rbh4ybd93gj9689ymmdflvcc0000gn/T/go-build113185276=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

I'm using .go as my go folder instead of go, which I imagine should be fine considering the GOPATH is set to it.

I still can't do the auth step. When it gives me the link to follow, I arrive at this page:

400 error page

from dbxcli.

diwakergupta avatar diwakergupta commented on May 29, 2024

@banool also expected. If you want to build and test dbxcli yourself locally, you'll need to register your own apps here: https://www.dropbox.com/developers/apps

from dbxcli.

banool avatar banool commented on May 29, 2024

Ah. I feel there should maybe be instructions in the README or CONTRIBUTING files that tell newcomers how to do all of this, at least the API stuff. It wasn't readily apparent to me that this was necessary, nor is it obvious what to do now that I have to. For example, I see in build.sh that there are 3 different keys that it is referring to, but I'm only given one keypair when making an app. I infer by the names that the latter two are only for teams, but no doubt some people would be confused by this. Furthermore, replacing the keys in build.sh doesn't actually resolve the issue. Instead, you have to change the keys in the root.go file. I'll submit a pull request with appropriate instructions.

from dbxcli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.