go: race: race tool does not work on Linux Mint

Please answer these questions before submitting your issue. Thanks!

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

go1.9 linux/amd64

Does this issue reproduce with the latest release?

yes

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

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

What did you do?

If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best.

Build any program with -race flag for example, go build -race

What did you expect to see?

no output

What did you see instead?

hello

runtime.raceinit: relocation target __tsan_init not defined runtime.raceinit: relocation target __tsan_map_shadow not defined runtime.racefini: relocation target __tsan_fini not defined runtime.raceproccreate: relocation target __tsan_proc_create not defined runtime.raceprocdestroy: relocation target __tsan_proc_destroy not defined runtime.racemapshadow: relocation target __tsan_map_shadow not defined runtime.racemalloc: relocation target __tsan_malloc not defined runtime.racefree: relocation target __tsan_free not defined runtime.racegostart: relocation target __tsan_go_start not defined runtime.racegoend: relocation target __tsan_go_end not defined runtime.raceacquireg: relocation target __tsan_acquire not defined runtime.racereleaseg: relocation target __tsan_release not defined runtime.racereleasemergeg: relocation target __tsan_release_merge not defined runtime.racefingo: relocation target __tsan_finalizer_goroutine not defined runtime.RaceDisable: relocation target __tsan_go_ignore_sync_begin not defined runtime.RaceEnable: relocation target __tsan_go_ignore_sync_end not defined runtime.raceread: relocation target __tsan_read not defined runtime.racereadpc: relocation target __tsan_read_pc not defined runtime.racewrite: relocation target __tsan_write not defined runtime.racewritepc: relocation target __tsan_write_pc not defined runtime.racereadrange: relocation target __tsan_read_range not defined /usr/lib/go-1.9/pkg/tool/linux_amd64/link: too many errors

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

On my Ubuntu this did the trick: sudo apt-get install golang-1.10-race-detector-runtime