Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

编译错误 server.go variable redeclared #107

Open
snipking opened this issue Oct 25, 2017 · 1 comment
Open

编译错误 server.go variable redeclared #107

snipking opened this issue Oct 25, 2017 · 1 comment

Comments

@snipking
Copy link

snipking commented Oct 25, 2017

基于 alpine 镜像构建 dog-tunnel 的 Docker 镜像,Dockerfile 如下

FROM alpine
RUN sed -i "s/http:\/\/dl-cdn.alpinelinux.org\/alpine/http:\/\/mirrors.aliyun.com\/alpine/g" /etc/apk/repositories && \
    apk update && \
    apk add git make go build-base && \
    go version && \
    mkdir /dog-tunnel-src && \
    cd /dog-tunnel-src && \
    export GOPATH="/dog-tunnel-src/" && \
    go get github.com/go-sql-driver/mysql && \
    go get github.com/klauspost/reedsolomon && \
    go get github.com/cznic/zappy && \
    go get github.com/vzex/dog-tunnel && \
    cd github.com/vzex/dog-tunnel/ && \
    git checkout origin/master -b udp && \
    make && \
    apk info && \
    apk del run-parts openssl lua5.2-libs lua5.2 ncurses-terminfo ncurses-widec-libs lua5.2-posix ca-certificates libssh2 curl expat pcre git go make build-base && \
    apk cache clean && \
    rm -rf /usr/lib/go && \
    cd .. && \
    rm -rf /dog-tunnel-src

go version go1.6.3 linux/amd64

报错如下

# github.com/vzex/dog-tunnel
src/github.com/vzex/dog-tunnel/server.go:24: bUseSSL redeclared in this block
	previous declaration at src/github.com/vzex/dog-tunnel/client.go:48
src/github.com/vzex/dog-tunnel/server.go:30: bShowVersion redeclared in this block
	previous declaration at src/github.com/vzex/dog-tunnel/client.go:49
src/github.com/vzex/dog-tunnel/server.go:89: handleResponse redeclared in this block
	previous declaration at src/github.com/vzex/dog-tunnel/client.go:94
src/github.com/vzex/dog-tunnel/server.go:91: handleResponse.func1 redeclared in this block
	previous declaration at src/github.com/vzex/dog-tunnel/client.go:221
src/github.com/vzex/dog-tunnel/server.go:403: main redeclared in this block
	previous declaration at src/github.com/vzex/dog-tunnel/client.go:481
src/github.com/vzex/dog-tunnel/server.go:429: main.func1 redeclared in this block
	previous declaration at src/github.com/vzex/dog-tunnel/client.go:524
@snipking snipking changed the title 编译错误 /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/include/stdint.h:9:26: error: no include path in which to search for stdint.h 编译错误 server.go variable redeclared Oct 25, 2017
@vzex
Copy link
Owner

vzex commented Feb 17, 2018

makefile看起来不对?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants