assetto-server-manager icon indicating copy to clipboard operation
assetto-server-manager copied to clipboard

Unable to build from source

Open dark-vex opened this issue 4 years ago • 3 comments

Describe the bug Hi, I'm trying to build from source but it fails because doesn't find a go resource zap v11

To Reproduce Steps to reproduce the behavior:

  • Just follow the instruction in the readme file for build from source and when you run "go get -u github.com/JustaPenguin/assetto-server-manager/..." you will have the following error:
dark-vex@somehost:~$ go get -u github.com/JustaPenguin/assetto-server-manager/...
package github.com/JustaPenguin/assetto-server-manager
        imports github.com/blevesearch/zap/v11: cannot find package "github.com/blevesearch/zap/v11" in any of:
        /usr/local/go/src/github.com/blevesearch/zap/v11 (from $GOROOT)
        /home/dark-vex/go/src/github.com/blevesearch/zap/v11 (from $GOPATH)

I have tried to build also with the provided Dockerfile but it fails too

root@docker-test:~/build# docker build .
Sending build context to Docker daemon  6.144kB
Step 1/41 : FROM golang:1.14 AS build
1.14: Pulling from library/golang
376057ac6fa1: Pull complete 
5a63a0a859d8: Pull complete 
496548a8c952: Pull complete 
2adae3950d4d: Pull complete 
039b991354af: Pull complete 
0cca3cbecb14: Pull complete 
59c34b3f33f3: Pull complete 
Digest: sha256:b5114a530de5817bcc9b9b5f7b523b0424b75c78dd2f68d2b6d79dc858d98c9f
Status: Downloaded newer image for golang:1.14
 ---> 7e5e8028e8ec
Step 2/41 : ARG SM_VERSION
 ---> Running in f8b62491b802
Removing intermediate container f8b62491b802
 ---> c61ea17af0a4
Step 3/41 : ENV DEBIAN_FRONTEND noninteractive
 ---> Running in cef7d5d1353e
Removing intermediate container cef7d5d1353e
 ---> cfcb3a886545
Step 4/41 : ENV BUILD_DIR ${GOPATH}/src/github.com/JustaPenguin/assetto-server-manager
 ---> Running in d839d4045009
Removing intermediate container d839d4045009
 ---> 8cd1b4f9cb85
Step 5/41 : ENV GO111MODULE on
 ---> Running in 0685c473487b
Removing intermediate container 0685c473487b
 ---> caec38a0115f
Step 6/41 : RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
 ---> Running in 8019cae35ae1

## Installing the NodeSource Node.js 12.x repo...


## Populating apt-get cache...

+ apt-get update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [198 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7905 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7380 B]
Fetched 8347 kB in 2s (4154 kB/s)
Reading package lists...

## Installing packages required for setup: lsb-release...
Removing intermediate container 8019cae35ae1
 ---> e2bebc5d3667
Step 7/41 : RUN apt-get update && apt-get install -y build-essential libssl-dev curl nodejs tofrodos dos2unix zip
 ---> Running in 4f31e6a5ab64
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 https://deb.nodesource.com/node_12.x buster InRelease
Reading package lists...
Removing intermediate container 4f31e6a5ab64
 ---> 68ce9c00de57
Step 8/41 : ADD . ${BUILD_DIR}
 ---> 252187dbfaad
Step 9/41 : WORKDIR ${BUILD_DIR}
 ---> Running in 9417a4f5b8d9
Removing intermediate container 9417a4f5b8d9
 ---> a313792f3cf7
Step 10/41 : RUN rm -rf cmd/server-manager/typescript/node_modules
 ---> Running in a7e996db4da0
Removing intermediate container a7e996db4da0
 ---> 9d5e328c0fd1
Step 11/41 : RUN VERSION=${SM_VERSION} make deploy
 ---> Running in d26c28c4f47c
make: *** No rule to make target 'deploy'.  Stop.
The command '/bin/sh -c VERSION=${SM_VERSION} make deploy' returned a non-zero code: 2

Expected behavior I'm expecting to be able to build from source

Desktop (please complete the following information):

  • OS: Debian 10
  • Docker version 19.03.8, build afacb8b7f0
  • Node version 12.16.3
  • go version go1.13.11 linux/amd64

dark-vex avatar May 16 '20 17:05 dark-vex

Bleve changed something. go mod init github.com/blevesearch/bleve-explorer before go get... worked for me.

fergie4000 avatar May 17 '20 14:05 fergie4000

Thanks @fergie4000 it worked but now I have another error with bbolt

go get: github.com/etcd-io/[email protected] updating to
        github.com/etcd-io/[email protected]: parsing go.mod:
        module declares its path as: go.etcd.io/bbolt
                but was required as: github.com/etcd-io/bbolt

dark-vex avatar May 17 '20 15:05 dark-vex

Ignore it, it builds fine.

fergie4000 avatar May 19 '20 11:05 fergie4000