Skip to content
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

go/toolchain/current/src/runtime/signal_unix.go:27: _SIG_DFL redeclared in this block #19143

Closed
xor-gate opened this issue Feb 17, 2017 · 5 comments

Comments

@xor-gate
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.8 linux/amd64

What operating system and processor architecture are you using (go env)?

Debian 8 Jessie AMD64.

GOARCH="amd64"
GOBIN="/home/jjacobs/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jjacobs/go"
GORACE=""
GOROOT="/home/jjacobs/go/toolchain/current"
GOTOOLDIR="/home/jjacobs/go/toolchain/current/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build292127142=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

Try to compile the most simple go program:

package main

func main() {
}

What did you expect to see?

No errors during compilation

What did you see instead?

Redeclaration errors from stdlib

jjacobs@dev04:~$ go run main.go 
# runtime
go/toolchain/current/src/runtime/signal_unix.go:27: _SIG_DFL redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:15
go/toolchain/current/src/runtime/signal_unix.go:28: _SIG_IGN redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:16
go/toolchain/current/src/runtime/signal_unix.go:37: fwdSig redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:25
go/toolchain/current/src/runtime/signal_unix.go:42: disableSigChan redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:35
go/toolchain/current/src/runtime/signal_unix.go:43: enableSigChan redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:36
go/toolchain/current/src/runtime/signal_unix.go:44: maskUpdatedChan redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:37
go/toolchain/current/src/runtime/signal_unix.go:56: signalsOK redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:49
go/toolchain/current/src/runtime/signal_unix.go:62: initsig redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:55
go/toolchain/current/src/runtime/signal_unix.go:97: sigInstallGoHandler redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:90
go/toolchain/current/src/runtime/signal_unix.go:122: sigenable redeclared in this block
        previous declaration at go/toolchain/current/src/runtime/signal1_unix.go:115
go/toolchain/current/src/runtime/signal_unix.go:122: too many errors
@xor-gate
Copy link
Author

Sorry guys for the noise. It seemed I had corrupted my $HOME/go/toolchains/1.8 folder myself and mixed with 1.7.1.

Thank you for this awesome release 💃

@prvst
Copy link

prvst commented Feb 17, 2017

Hi @xor-gate ;
I'm having the exact same issue, can you tell me how did you fixed that?

@xor-gate
Copy link
Author

Remove all your golang toolchains and pkg folders. Then unpack a fresh download, set env vars and start typing :+)

@prvst
Copy link

prvst commented Feb 17, 2017

@xor-gate Thanks!

@la0rg
Copy link

la0rg commented Feb 18, 2017

In case some else will have the same issue:

If you are upgrading from an older version of Go you must first remove the existing version.
To remove an existing Go installation from your system delete the go directory. This is usually /usr/local/go under Linux, Mac OS X, and FreeBSD or c:\Go under Windows.

Source

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

No branches or pull requests

4 participants