-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
golang 1.6 + codis 安装错误 #715
Comments
1.6刚出,我们还没针对1.6测试过…… |
ok,那目前 codis 支持的 golang 最高版本是?辛苦:) |
https://github.com/CodisLabs/codis/blob/master/.travis.yml 这个持续集成的配置文件里涉及到的版本就是我们目前期望支持的版本,如果里面有而有兼容问题就属于非预期的bug了。 |
go 现在才刚刚到 go1.6.1,到 1.6.x 稳定以后,我们会把正确的支持集成进来。 现在这个错误,是 godep 与 go1.6 冲突导致的,可以简单 fix 一下。 release 3.0 的话,修改如下。 diff --git a/Makefile b/Makefile
index ec9c57e..555c881 100644
--- a/Makefile
+++ b/Makefile
@@ -7,12 +7,12 @@ GODEP :=
ifndef GODEP
GODEP := $(shell \
if which godep 2>&1 >/dev/null; then \
- echo "godep"; \
+ echo GO15VENDOREXPERIMENT="0" "godep"; \
else \
if [ ! -x "${GOPATH}/bin/godep" ]; then \
go get -u github.com/tools/godep; \
fi; \
- echo "${GOPATH}/bin/godep"; \
+ echo GO15VENDOREXPERIMENT="0" "${GOPATH}/bin/godep"; \
fi;)
endif master 分支的话, |
也可以在make之前 export GO15VENDOREXPERIMENT = 0. 这是go |
all: build
build: build-version godep build-proxy build-config build-server
godep:
@go get -u github.com/tools/godep
GO15VENDOREXPERIMENT=0 GOPATH=`echo $GOPATH` /path/to/$GOBIN/godep restore
build-version:
@bash genver.sh
build-proxy:
GOPATH=`echo $GOPATH`:$$GOPATH go build -o bin/codis-proxy ./cmd/proxy
build-config:
GOPATH=`echo $GOPATH`:$$GOPATH go build -o bin/codis-config ./cmd/cconfig
@rm -rf bin/assets && cp -r cmd/cconfig/assets bin/
build-server:
@mkdir -p bin
make -j4 -C extern/redis-2.8.21/
@rm -f bin/codis-server
@cp -f extern/redis-2.8.21/src/redis-server bin/codis-server
clean:
@rm -rf bin
@rm -f *.rdb *.out *.log *.dump deploy.tar
@rm -f extern/Dockerfile
@rm -f sample/log/*.log sample/nohup.out
@if [ -d test ]; then cd test && rm -f *.out *.log *.rdb; fi
distclean: clean
@make --no-print-directory --quiet -C extern/redis-2.8.21 clean
gotest:
GOPATH=`echo $GOPATH`:$$GOPATH go test ./pkg/... ./cmd/...
|
codis编译的是时候,改了Makefile之后还是报 GO15VENDOREXPERIMENT is enabled and the vendor/ directory is not a valid ,请问除了修复Makefile和 GO15VENDOREXPERIMENT="0" make这两种方法,其他的方法有吗。 |
golang 1.6 版本
配置了 GOPATH 系统变量,但安装 codis 时,出现如下错误:
root# make
GOPATH=
godep path
godep restoreError: GO15VENDOREXPERIMENT is enabled and the vendor/ directory is not a valid Go workspace.
godep: Error restore requires GOPATH but it is empty.
make: *** [godep] Error 1
The text was updated successfully, but these errors were encountered: