root-gg / plik

Plik is a temporary file upload system (Wetransfer like) in Go.
https://plik.root.gg
Other
1.49k stars 170 forks source link

Go get complains about missing BuildInfo #226

Closed camathieu closed 4 years ago

camathieu commented 7 years ago
plik@ks2:~/gopath/src/github.com/root-gg# go get -v github.com/root-gg/plik/server
github.com/root-gg/plik/server/vendor/github.com/facebookgo/stats
github.com/root-gg/plik/server/vendor/github.com/gorilla/context
github.com/root-gg/plik/server/vendor/github.com/facebookgo/clock
github.com/root-gg/plik/server/vendor/github.com/root-gg/juliet
github.com/root-gg/plik/server/vendor/github.com/root-gg/utils
github.com/root-gg/plik/server/vendor/github.com/BurntSushi/toml
github.com/root-gg/plik/server/vendor/github.com/gorilla/mux
github.com/root-gg/plik/server/vendor/github.com/facebookgo/httpdown
github.com/root-gg/plik/server/vendor/github.com/root-gg/logger
github.com/root-gg/plik/server/vendor/github.com/GeertJohan/yubigo
github.com/root-gg/plik/server/vendor/github.com/nu7hatch/gouuid
github.com/root-gg/plik/server/vendor/github.com/ncw/swift
github.com/root-gg/plik/server/vendor/github.com/boombuler/barcode
github.com/root-gg/plik/server/vendor/github.com/boombuler/barcode/utils
github.com/root-gg/plik/server/vendor/github.com/dgrijalva/jwt-go
github.com/root-gg/plik/server/vendor/github.com/boombuler/barcode/qr
github.com/root-gg/plik/server/common
github.com/root-gg/plik/server/vendor/github.com/boltdb/bolt
github.com/root-gg/plik/server/vendor/gopkg.in/mgo.v2/bson
github.com/root-gg/plik/server/vendor/gopkg.in/mgo.v2/internal/scram
github.com/root-gg/plik/server/dataBackend/file
github.com/root-gg/plik/server/dataBackend/stream
github.com/root-gg/plik/server/dataBackend/swift
github.com/root-gg/plik/server/dataBackend/weedfs
github.com/root-gg/plik/server/metadataBackend/file
github.com/root-gg/plik/server/dataBackend
github.com/root-gg/plik/server/vendor/gopkg.in/mgo.v2
github.com/root-gg/plik/server/vendor/golang.org/x/net/context
github.com/root-gg/plik/server/vendor/golang.org/x/oauth2/jws
github.com/root-gg/plik/server/metadataBackend/bolt
github.com/root-gg/plik/server/vendor/golang.org/x/oauth2/internal
github.com/root-gg/plik/server/vendor/google.golang.org/cloud/internal
github.com/root-gg/plik/server/vendor/google.golang.org/cloud/compute/metadata
github.com/root-gg/plik/server/vendor/golang.org/x/oauth2
github.com/root-gg/plik/server/vendor/golang.org/x/net/context/ctxhttp
github.com/root-gg/plik/server/vendor/google.golang.org/api/googleapi/internal/uritemplates
github.com/root-gg/plik/server/vendor/google.golang.org/api/googleapi
github.com/root-gg/plik/server/vendor/golang.org/x/oauth2/jwt
github.com/root-gg/plik/server/vendor/golang.org/x/oauth2/google
github.com/root-gg/plik/server/vendor/google.golang.org/api/gensupport
github.com/root-gg/plik/server/vendor/google.golang.org/api/oauth2/v2
github.com/root-gg/plik/server/metadataBackend/mongo
github.com/root-gg/plik/server/metadataBackend
github.com/root-gg/plik/server/handlers
github.com/root-gg/plik/server/middleware
# github.com/root-gg/plik/server/handlers
plik/server/handlers/misc.go:51:28: undefined: common.GetBuildInfo
mxschmitt commented 6 years ago

Maybe switch from generating a version.go via bash script to ldflags and fill there the variables with content at build time.

mincaeuro commented 6 years ago

got the same error:

go/src/github.com/root-gg/plik/server/handlers/misc.go:51: undefined: common.GetBuildInfo

mxschmitt commented 6 years ago

@mincaeuro You must follow the instructions on how to build it from source: https://github.com/root-gg/plik#from-sources

mincaeuro commented 6 years ago

thats exactly what I do, I'm getting the error,when I try to:

go get github.com/root-gg/plik/server

mxschmitt commented 6 years ago

This is currently as designed. We can't prevent it. Maybe add the make command to go:generate, but that does not make much sense. Idk As alternative like i posted above is to switch from generating a buildinfo.go to ldflags.

camathieu commented 6 years ago

The warning is annoying but does not prevent you to actually make afterwards.

camathieu commented 6 years ago

I've updated the documentation : https://github.com/root-gg/plik/commit/ddc1b0f2bfa07b9c3fa53c406b261de50eaebff8

mincaeuro commented 6 years ago

Actually I taught it does, as at "make" I'm getting error and it fails at the end.. will post you log, when I'm back online...I need to use the source, as I'm trying to get in run on ARM pc..

camathieu commented 6 years ago

Interesting, here are my logs from a 64bits linux box :

[epik:~/gopath/src/github.com/root-gg]# rm -rf plik/
[epik:~/gopath/src/github.com/root-gg]# go get github.com/root-gg/plik/server
# github.com/root-gg/plik/server/handlers
plik/server/handlers/misc.go:51:28: undefined: common.GetBuildInfo
[epik:~/gopath/src/github.com/root-gg]# cd plik
[epik:~/gopath/src/github.com/root-gg/plik] (master)# make
grunt-contrib-copy@1.0.0 node_modules/grunt-contrib-copy
├── file-sync-cmp@0.1.1
└── chalk@1.1.3 (escape-string-regexp@1.0.5, supports-color@2.0.0, ansi-styles@2.2.1, has-ansi@2.0.0, strip-ansi@3.0.1)

load-grunt-tasks@3.5.2 node_modules/load-grunt-tasks
├── arrify@1.0.1
├── resolve-pkg@0.1.0 (resolve-from@2.0.0)
├── pkg-up@1.0.0 (find-up@1.1.2)
└── multimatch@2.1.0 (array-differ@1.0.0, array-union@1.0.2, minimatch@3.0.4)

grunt-contrib-concat@1.0.1 node_modules/grunt-contrib-concat
├── source-map@0.5.7
└── chalk@1.1.3 (ansi-styles@2.2.1, supports-color@2.0.0, escape-string-regexp@1.0.5, has-ansi@2.0.0, strip-ansi@3.0.1)

grunt-cli@1.2.0 node_modules/grunt-cli
├── grunt-known-options@1.1.0
├── nopt@3.0.6 (abbrev@1.1.1)
├── resolve@1.1.7
└── findup-sync@0.3.0 (glob@5.0.15)

grunt-contrib-clean@1.1.0 node_modules/grunt-contrib-clean
├── async@1.5.2
└── rimraf@2.6.2 (glob@7.1.2)

grunt-contrib-uglify@3.3.0 node_modules/grunt-contrib-uglify
├── uri-path@1.0.0
├── chalk@1.1.3 (escape-string-regexp@1.0.5, ansi-styles@2.2.1, supports-color@2.0.0, has-ansi@2.0.0, strip-ansi@3.0.1)
├── uglify-js@3.3.22 (commander@2.15.1, source-map@0.6.1)
└── maxmin@1.1.0 (figures@1.7.0, gzip-size@1.0.0, pretty-bytes@1.0.4)

grunt-ng-annotate@3.0.0 node_modules/grunt-ng-annotate
├── lodash.clonedeep@4.5.0
└── ng-annotate@1.2.2 (tryor@0.1.2, stable@0.1.8, stringset@0.2.1, stringmap@0.2.2, simple-is@0.2.0, simple-fmt@0.1.0, alter@0.2.0, convert-source-map@1.1.3, ordered-ast-traverse@1.1.1, source-map@0.5.7, acorn@2.6.4, optimist@0.6.1)

grunt-contrib-cssmin@2.2.1 node_modules/grunt-contrib-cssmin
├── maxmin@2.1.0 (pretty-bytes@3.0.1, figures@1.7.0, gzip-size@3.0.0)
├── chalk@1.1.3 (ansi-styles@2.2.1, supports-color@2.0.0, escape-string-regexp@1.0.5, strip-ansi@3.0.1, has-ansi@2.0.0)
└── clean-css@4.1.11 (source-map@0.5.7)

grunt-contrib-watch@1.0.1 node_modules/grunt-contrib-watch
├── async@1.5.2
├── gaze@1.1.2 (globule@1.2.0)
├── tiny-lr@0.2.1 (parseurl@1.3.2, livereload-js@2.3.0, qs@5.1.0, debug@2.2.0, body-parser@1.14.2, faye-websocket@0.10.0)
└── lodash@4.17.10

grunt@1.0.2 node_modules/grunt
├── grunt-known-options@1.1.0
├── path-is-absolute@1.0.1
├── eventemitter2@0.4.14
├── rimraf@2.2.8
├── exit@0.1.2
├── nopt@3.0.6 (abbrev@1.1.1)
├── coffeescript@1.10.0
├── minimatch@3.0.4 (brace-expansion@1.1.11)
├── glob@7.0.6 (inherits@2.0.3, fs.realpath@1.0.0, inflight@1.0.6, once@1.4.0)
├── iconv-lite@0.4.21 (safer-buffer@2.1.2)
├── findup-sync@0.3.0 (glob@5.0.15)
├── js-yaml@3.5.5 (esprima@2.7.3, argparse@1.0.10)
├── dateformat@1.0.12 (get-stdin@4.0.1, meow@3.7.0)
├── grunt-legacy-util@1.0.0 (async@1.5.2, getobject@0.1.0, hooker@0.2.3, which@1.2.14, underscore.string@3.2.3, lodash@4.3.0)
└── grunt-legacy-log@1.0.1 (hooker@0.2.3, colors@1.1.2, underscore.string@3.3.4, grunt-legacy-log-utils@1.0.0, lodash@4.17.10)

bower@1.8.4 node_modules/bower
bower angular#~1.6.1            cached https://github.com/angular/bower-angular.git#1.6.10
bower angular#~1.6.1          validate 1.6.10 against https://github.com/angular/bower-angular.git#~1.6.1
bower bootstrap#~3.3.5          cached https://github.com/twbs/bootstrap.git#3.3.7
bower bootstrap#~3.3.5        validate 3.3.7 against https://github.com/twbs/bootstrap.git#~3.3.5
bower angular-bootstrap#~2.3.2  cached https://github.com/angular-ui/bootstrap-bower.git#2.3.2
bower angular-bootstrap#~2.3.2         validate 2.3.2 against https://github.com/angular-ui/bootstrap-bower.git#~2.3.2
bower fontawesome#~4.7.0                 cached https://github.com/FortAwesome/Font-Awesome.git#4.7.0
bower fontawesome#~4.7.0               validate 4.7.0 against https://github.com/FortAwesome/Font-Awesome.git#~4.7.0
bower underscore#~1.8.3                  cached https://github.com/jashkenas/underscore.git#1.8.3
bower underscore#~1.8.3                validate 1.8.3 against https://github.com/jashkenas/underscore.git#~1.8.3
bower filesize#~3.3.0                    cached https://github.com/avoidwork/filesize.js.git#3.3.0
bower filesize#~3.3.0                  validate 3.3.0 against https://github.com/avoidwork/filesize.js.git#~3.3.0
bower showdown#~0.3.4                    cached https://github.com/showdownjs/showdown.git#0.3.4
bower showdown#~0.3.4                  validate 0.3.4 against https://github.com/showdownjs/showdown.git#~0.3.4
bower ng-file-upload#~12.2.13            cached https://github.com/danialfarid/angular-file-upload-bower.git#12.2.13
bower ng-file-upload#~12.2.13          validate 12.2.13 against https://github.com/danialfarid/angular-file-upload-bower.git#~12.2.13
bower angular-route#~1.6.1               cached https://github.com/angular/bower-angular-route.git#1.6.10
bower angular-route#~1.6.1             validate 1.6.10 against https://github.com/angular/bower-angular-route.git#~1.6.1
bower angular-sanitize#~1.6.1            cached https://github.com/angular/bower-angular-sanitize.git#1.6.10
bower angular-sanitize#~1.6.1          validate 1.6.10 against https://github.com/angular/bower-angular-sanitize.git#~1.6.1
bower bootstrap-flat#~3.3.4              cached https://github.com/scottdorman/bootstrap-flat.git#3.3.4
bower bootstrap-flat#~3.3.4            validate 3.3.4 against https://github.com/scottdorman/bootstrap-flat.git#~3.3.4
bower angular-markdown-directive#~0.3.1  cached https://github.com/btford/angular-markdown-directive.git#0.3.1
bower angular-markdown-directive#~0.3.1         validate 0.3.1 against https://github.com/btford/angular-markdown-directive.git#~0.3.1
bower angular#>=1.4.0                             cached https://github.com/angular/bower-angular.git#1.6.10
bower angular#>=1.4.0                           validate 1.6.10 against https://github.com/angular/bower-angular.git#>=1.4.0
bower jquery#1.9.1 - 3                            cached https://github.com/jquery/jquery-dist.git#3.3.1
bower jquery#1.9.1 - 3                          validate 3.3.1 against https://github.com/jquery/jquery-dist.git#1.9.1 - 3
bower angular-sanitize#^1.0.8                     cached https://github.com/angular/bower-angular-sanitize.git#1.6.10
bower angular-sanitize#^1.0.8                   validate 1.6.10 against https://github.com/angular/bower-angular-sanitize.git#^1.0.8
bower jquery#>= 1.9.1                             cached https://github.com/jquery/jquery-dist.git#3.3.1
bower jquery#>= 1.9.1                           validate 3.3.1 against https://github.com/jquery/jquery-dist.git#>= 1.9.1
bower angular-bootstrap#~2.3.2                   install angular-bootstrap#2.3.2
bower fontawesome#~4.7.0                         install fontawesome#4.7.0
bower underscore#~1.8.3                          install underscore#1.8.3
bower angular#1.6.10                             install angular#1.6.10
bower filesize#~3.3.0                            install filesize#3.3.0
bower showdown#~0.3.4                            install showdown#0.3.4
bower bootstrap#~3.3.5                           install bootstrap#3.3.7
bower ng-file-upload#~12.2.13                    install ng-file-upload#12.2.13
bower angular-route#~1.6.1                       install angular-route#1.6.10
bower angular-markdown-directive#~0.3.1          install angular-markdown-directive#0.3.1
bower bootstrap-flat#~3.3.4                      install bootstrap-flat#3.3.4
bower jquery#1.9.1 - 3                           install jquery#3.3.1
bower angular-sanitize#^1.0.8                    install angular-sanitize#1.6.10

angular-bootstrap#2.3.2 bower_components/angular-bootstrap
└── angular#1.6.10

fontawesome#4.7.0 bower_components/fontawesome

underscore#1.8.3 bower_components/underscore

angular#1.6.10 bower_components/angular

filesize#3.3.0 bower_components/filesize

showdown#0.3.4 bower_components/showdown

bootstrap#3.3.7 bower_components/bootstrap
└── jquery#3.3.1

ng-file-upload#12.2.13 bower_components/ng-file-upload
└── angular#1.6.10

angular-route#1.6.10 bower_components/angular-route
└── angular#1.6.10

angular-markdown-directive#0.3.1 bower_components/angular-markdown-directive
├── angular#1.6.10
├── angular-sanitize#1.6.10
└── showdown#0.3.4

bootstrap-flat#3.3.4 bower_components/bootstrap-flat
├── bootstrap#3.3.7
└── jquery#3.3.1

jquery#3.3.1 bower_components/jquery

angular-sanitize#1.6.10 bower_components/angular-sanitize
└── angular#1.6.10
Running "clean:0" (clean) task
>> 0 paths cleaned.

Running "concat:js_vendors" (concat) task

Running "concat:css_vendors" (concat) task

Running "copy:stylesheets" (copy) task
Copied 11 files

Running "ngAnnotate:all" (ngAnnotate) task
>> 1 file successfully annotated.

Running "uglify:javascript" (uglify) task
>> 1 sourcemap created.
>> 1 file created 2.18 MB → 508.25 kB

Running "cssmin:combine" (cssmin) task
>> 1 file created. 228.77 kB → 189.3 kB

Done.
Compiling plik client for darwin-386 to ../clients/darwin-386/plik
Compiling plik client for darwin-amd64 to ../clients/darwin-amd64/plik
Compiling plik client for freebsd-386 to ../clients/freebsd-386/plik
Compiling plik client for freebsd-amd64 to ../clients/freebsd-amd64/plik
Compiling plik client for linux-386 to ../clients/linux-386/plik
Compiling plik client for linux-amd64 to ../clients/linux-amd64/plik
Compiling plik client for linux-arm to ../clients/linux-arm/plik
Compiling plik client for openbsd-386 to ../clients/openbsd-386/plik
Compiling plik client for openbsd-amd64 to ../clients/openbsd-amd64/plik
Compiling plik client for windows-amd64 to ../clients/windows-amd64/plik.exe
Compiling plik client for windows-386 to ../clients/windows-386/plik.exe
mincaeuro commented 6 years ago

now I'm getting: /usr/bin/env: 'node': No such file or directory make: ***[frontend] Error 127 fix: sudo ln -s /usr/bin/nodejs /usr/bin/node

camathieu commented 4 years ago

https://github.com/root-gg/plik/pull/322/commits/2628f1fda5446de2acec4ef1058408f29212459e

camathieu commented 4 years ago

Fixed in 1.3