MG-RAST/Shock

Problems during building

Closed this issue · 1 comments

I used the option 1 to build shock in CentOS 7. And the terminal give some error as follows:

[root@localhost gopath]# make install
go get -v github.com/MG-RAST/Shock/...
github.com/MG-RAST/Shock/shock-server/node
github.com/MG-RAST/Shock/vendor/gopkg.in/mgo.v2/internal/sasl
github.com/MG-RAST/Shock/vendor/gopkg.in/mgo.v2/internal/sasl
src/github.com/MG-RAST/Shock/vendor/gopkg.in/mgo.v2/internal/sasl/sasl.go:15:24: fatal error: sasl/sasl.h: No such file or directory
// #include <sasl/sasl.h>
^
compilation terminated.
github.com/MG-RAST/Shock/shock-server/node
src/github.com/MG-RAST/Shock/shock-server/node/db.go:31: cannot convert "priority" to type int
src/github.com/MG-RAST/Shock/shock-server/node/db.go:31: cannot use "priority" (type string) as type int in array or slice literal
make: *** [get] error 2

Can you help to solve the problem?

Best!

For the issue with missing sasl library you can do one of two fixes:

  1. install it. For debain / ubuntu it would be 'apt-get install libsasl2-dev'
  2. it is not required for Shock to run, so you can compile without it using:
    go get -v github.com/MG-RAST/Shock/shock-server/

For the issue with the wrong typed variable, I have a recent commit that fixes that. But I recommend you use a stable release and not the most current code. latest release is https://github.com/MG-RAST/Shock/releases/tag/v0.9.19