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

Can't compile with the latest release 1.12 #30402

Closed
maurodelazeri opened this issue Feb 26, 2019 · 1 comment
Closed

Can't compile with the latest release 1.12 #30402

maurodelazeri opened this issue Feb 26, 2019 · 1 comment

Comments

@maurodelazeri
Copy link

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

$ go version

go version go1.12 linux/amd64


Does this issue reproduce with the latest release?

Yes

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

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Model name:            Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Stepping:              3
CPU MHz:               3603.468
CPU max MHz:           3900.0000
CPU min MHz:           800.0000
BogoMIPS:              6784.39
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb invpcid_single retpoline kaiser tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm xsaveopt dtherm ida arat pln pts
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mauro/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mauro/work"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build135486977=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go get

package main
import (
        "fmt"
        "github.com/jasonlvhit/gocron"
)

func task() {
        fmt.Println("I am runnning task.")
}

func taskWithParams(a int, b string, c string) {
        fmt.Println(a, b, c)
}

func main() {
        gocron.Every(30).Seconds().Do(taskWithParams, 1, "hello", "yup")
        <-gocron.Start()
        s := gocron.NewScheduler()
        s.Every(3).Seconds().Do(task)
        <-s.Start()
}

go get

# strings
/usr/local/go/src/strings/strings_decl.go:8:6: IndexByte redeclared in this block
	previous declaration at /usr/local/go/src/strings/strings.go:150:34

What did you expect to see?

Should download the pkg with no errors, I was using go1.11 with no problems

What did you see instead?

# strings
/usr/local/go/src/strings/strings_decl.go:8:6: IndexByte redeclared in this block
	previous declaration at /usr/local/go/src/strings/strings.go:150:34
@maurodelazeri
Copy link
Author

maurodelazeri commented Feb 26, 2019

Found a solution, I had to remove all old pkgs in my case /usr/local/go and then install the latest version

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

2 participants