I'd swear I checked for existing issues but somehow I missed https://github.com/golang/go/issues/49102.
That was the culprit. Sorry for the noise. I suspect I missed it because it's marked closed. Hopefully something more overt will be done to spare future poor souls the grief? . On Tue, Nov 23, 2021 at 2:34 AM Neil Schellenberger < neilschellenber...@gmail.com> wrote: > Thank you very much, Ian, for your insight. > > Unfortunately, after several more hours of fiddling, I still can't > convince it to work. I assume it's something to do with our (admittedly > somewhat complicated) build environment/toolchain rather than a core Go > problem, but I can't figure out what/how. (Yocto SDK foisted on us by the > hardware vendor....) > > I raised https://github.com/golang/go/issues/49749 in the hope that > someone smarter than me can provide me with the requisite smack upside the > head.... > > I still get various undefined tsan symbols. Presumably those are supposed > to be resolved by the arm64 runtime? (If it makes any difference, we're > cross-compiling on amd64 for arm64 by setting GOARCH, CC, CGO_CFLAGS et > al. Unfortunately, it's not entirely trivial to build and run a native > toolchain and Go distro on the hardware in question.) > > I've made a rudimentary stab at hunting through the tmp build space to > figure it out using `go build -race -work -a`, but it's slow going for a > beginner.... FWIW I don't see any obvious signs of any tsan symbol defs in > there. (But of course, that may be entirely expected if the runtime module > is handled specially/magically.... And, also, I may simply have missed > them. Or be barking up entirely the wrong tree. In the wrong forest.) > > Regards, > Neil > > > On Fri, Nov 19, 2021 at 3:12 PM Ian Lance Taylor <i...@golang.org> wrote: > >> On Fri, Nov 19, 2021 at 8:59 AM neilschel...@gmail.com >> <neilschellenber...@gmail.com> wrote: >> > >> > Can anyone comment on whether arm64 race detection plus Cgo (via gcc >> and binutils) is known to work or not? >> > >> > I'm running in to a bunch of mechanical problems getting a binary >> linked, let alone running. Unfortunately, we have unavoidable Cgo >> dependencies on a h/w support library. I've gotten to the point where the >> final link is dying with some DWARF warnings and with some relocation >> errors relating to tsan symbols. >> > >> > I don't want to pour too much more time into it if it is known to be a >> non-starter.... >> >> As of Go 1.16 the Go race detector is supposed to work on linux-arm64 >> and darwin-arm64. This should work with cgo as well. >> >> To be clear, this means building Go code (that can use cgo) with "go >> build -race". Combining the Go race detector with the C race detector >> (the C compiler -fsanitize=thread option) does not work. >> >> Please feel free to report bugs at https://golang.org/issue with a >> description of how we can reproduce the problem. Thanks. >> >> Ian >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAM3gH59Qm76Pp%3D2-gG8PE6_HMZy6b7bWUa4aKRvF4Q6Zy29a6w%40mail.gmail.com.