sodafoundation / strato

SODA Strato (Multi-cloud) project provides a cloud vendor agnostic data management for hybrid cloud, intercloud or intracloud. This project is renamed as 'Strato'
Apache License 2.0
233 stars 329 forks source link

Build Distribution is failing i.e. make dist is failed #1005

Closed himanshuvar closed 4 years ago

himanshuvar commented 4 years ago

Issue/Feature Description: make dist is failing due to zip: not found Why this issue to fixed / feature is needed(give scenarios or use cases): For making a distribution build, the issue needs to be fixed. How to reproduce, in case of a bug: make dist

Other Notes / Environment Information: (Please give the env information, log link or any useful information for this issue)

Error logs:

root@ubuntu:~/gopath/src/github.com/opensds/multi-cloud# make dist mkdir -p /root/gopath/src/github.com/opensds/multi-cloud/build CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/opensds/multi-cloud/build/api github.com/opensds/multi-cloud/api/cmd CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/opensds/multi-cloud/build/backend github.com/opensds/multi-cloud/backend/cmd CGO_ENABLED=1 GOOS=linux go build -ldflags '-w -s -extldflags "-dynamic"' -o /root/gopath/src/github.com/opensds/multi-cloud/build/s3 github.com/opensds/multi-cloud/s3/cmd CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/opensds/multi-cloud/build/dataflow github.com/opensds/multi-cloud/dataflow/cmd CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/opensds/multi-cloud/build/datamover github.com/opensds/multi-cloud/datamover/cmd CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/opensds/multi-cloud/build/file github.com/opensds/multi-cloud/file/cmd rm -fr /root/gopath/src/github.com/opensds/multi-cloud/build/dist && mkdir -p /root/gopath/src/github.com/opensds/multi-cloud/build/dist/opensds-multicloud-521f251d-dirty-linux-amd64/bin cd /root/gopath/src/github.com/opensds/multi-cloud/build/dist && \ cp ../api opensds-multicloud-521f251d-dirty-linux-amd64/bin/ && \ cp ../backend opensds-multicloud-521f251d-dirty-linux-amd64/bin/ && \ cp ../s3 opensds-multicloud-521f251d-dirty-linux-amd64/bin/ && \ cp ../dataflow opensds-multicloud-521f251d-dirty-linux-amd64/bin/ && \ cp ../datamover opensds-multicloud-521f251d-dirty-linux-amd64/bin/ && \ cp /root/gopath/src/github.com/opensds/multi-cloud/LICENSE opensds-multicloud-521f251d-dirty-linux-amd64 && \ zip -r /root/gopath/src/github.com/opensds/multi-cloud/build/dist/opensds-multicloud-521f251d-dirty-linux-amd64.zip opensds-multicloud-521f251d-dirty-linux-amd64 && \ tar zcvf /root/gopath/src/github.com/opensds/multi-cloud/build/dist/opensds-multicloud-521f251d-dirty-linux-amd64.tar.gz opensds-multicloud-521f251d-dirty-linux-amd64 /bin/sh: 8: zip: not found Makefile:88: recipe for target 'dist' failed make: *** [dist] Error 127

Click2Cloud-Gamma commented 4 years ago

@himanshuvar also can we replace github.com/opensds/multi-cloud with github.com/sodafoundation/multi-cloud ?

kumarashit commented 4 years ago

@himanshuvar this is because zip is installed on your system. Maybe we can put this as pre-requisite for multicloud build. I just tried on my system and it worked. @Click2Cloud-Gamma Yes, that should be considered. root@aks:~/gopath/src/github.com/sodafoundation/multi-cloud# make clean rm -rf /root/gopath/src/github.com/sodafoundation/multi-cloud/build api/api backend/backend dataflow/dataflow datamover/datamover s3/s3 root@aks:~/gopath/src/github.com/sodafoundation/multi-cloud# make cleanvim ^C root@aks:~/gopath/src/github.com/sodafoundation/multi-cloud# vim Makefile root@aks:~/gopath/src/github.com/sodafoundation/multi-cloud# ls b backend/ block/
root@aks:~/gopath/src/github.com/sodafoundation/multi-cloud# make dist mkdir -p /root/gopath/src/github.com/sodafoundation/multi-cloud/build CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/sodafoundation/multi-cloud/build/api github.com/opensds/multi-cloud/api/cmd CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/sodafoundation/multi-cloud/build/backend github.com/opensds/multi-cloud/backend/cmd CGO_ENABLED=1 GOOS=linux go build -ldflags '-w -s -extldflags "-dynamic"' -o /root/gopath/src/github.com/sodafoundation/multi-cloud/build/s3 github.com/opensds/multi-cloud/s3/cmd CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/sodafoundation/multi-cloud/build/dataflow github.com/opensds/multi-cloud/dataflow/cmd CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/sodafoundation/multi-cloud/build/datamover github.com/opensds/multi-cloud/datamover/cmd CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o /root/gopath/src/github.com/sodafoundation/multi-cloud/build/block github.com/opensds/multi-cloud/block/cmd rm -fr /root/gopath/src/github.com/sodafoundation/multi-cloud/build/dist && mkdir -p /root/gopath/src/github.com/sodafoundation/multi-cloud/build/dist/opensds-multicloud-481eaaa3-dirty-linux-amd64/bin cd /root/gopath/src/github.com/sodafoundation/multi-cloud/build/dist && \ cp ../api opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/ && \ cp ../backend opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/ && \ cp ../s3 opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/ && \ cp ../dataflow opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/ && \ cp ../datamover opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/ && \ cp /root/gopath/src/github.com/sodafoundation/multi-cloud/LICENSE opensds-multicloud-481eaaa3-dirty-linux-amd64 && \ zip -r /root/gopath/src/github.com/sodafoundation/multi-cloud/build/dist/opensds-multicloud-481eaaa3-dirty-linux-amd64.zip opensds-multicloud-481eaaa3-dirty-linux-amd64 && \ tar zcvf /root/gopath/src/github.com/sodafoundation/multi-cloud/build/dist/opensds-multicloud-481eaaa3-dirty-linux-amd64.tar.gz opensds-multicloud-481eaaa3-dirty-linux-amd64 adding: opensds-multicloud-481eaaa3-dirty-linux-amd64/ (stored 0%) adding: opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/ (stored 0%) adding: opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/dataflow (deflated 65%) adding: opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/datamover (deflated 65%) adding: opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/api (deflated 65%) adding: opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/backend (deflated 64%) adding: opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/s3 (deflated 67%) adding: opensds-multicloud-481eaaa3-dirty-linux-amd64/LICENSE (deflated 65%) opensds-multicloud-481eaaa3-dirty-linux-amd64/ opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/ opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/dataflow opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/datamover opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/api opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/backend opensds-multicloud-481eaaa3-dirty-linux-amd64/bin/s3 opensds-multicloud-481eaaa3-dirty-linux-amd64/LICENSE tree /root/gopath/src/github.com/sodafoundation/multi-cloud/build/dist /root/gopath/src/github.com/sodafoundation/multi-cloud/build/dist ├── opensds-multicloud-481eaaa3-dirty-linux-amd64 │   ├── bin │   │   ├── api │   │   ├── backend │   │   ├── dataflow │   │   ├── datamover │   │   └── s3 │   └── LICENSE ├── opensds-multicloud-481eaaa3-dirty-linux-amd64.tar.gz └── opensds-multicloud-481eaaa3-dirty-linux-amd64.zip

2 directories, 8 files root@aks:~/gopath/src/github.com/sodafoundation/multi-cloud# ls build/ api backend block dataflow datamover dist/ s3
root@aks:~/gopath/src/github.com/sodafoundation/multi-cloud# ls build/d dataflow datamover dist/
root@aks:~/gopath/src/github.com/sodafoundation/multi-cloud# ls build/dist/opensds-multicloud-481eaaa3-dirty-linux-amd64 opensds-multicloud-481eaaa3-dirty-linux-amd64/ opensds-multicloud-481eaaa3-dirty-linux-amd64.tar.gz opensds-multicloud-481eaaa3-dirty-linux-amd64.zip