Thanks Ian. No luck though, that doesn't seem to be it. I have rebuilt the race detector .syso as mentioned in the README <https://github.com/golang/go/blob/54ffdf364f77c62ffeb205debe26347ca5961373/src/runtime/race/README> .
I get the same error as before (below, again) while building the runtime/race package, during `./race.bash`. (After replacing go/src/runtime/race/race_linux_amd64.syso with the freshly built one from compiler-rt). I had to work around this other minor error by removing -Werror: In file included from ./gotsan.cc:10756:0: /usr/include/sys/signal.h:1:2: error: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Werror=cpp] #warning redirecting incorrect #include <sys/signal.h> to <signal.h> ^ cc1plus: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror] cc1plus: error: unrecognized command line option '-Wno-unused-const-variable' [-Werror] I'm using this: # gcc --version gcc (Alpine 5.3.0) 5.3.0 Here's the build failure during ./race.bash: # runtime/race race_linux_amd64.syso: In function `__sanitizer::InternalAlloc(unsigned long, __sanitizer::SizeClassAllocatorLocalCache<__sanitizer::SizeClassAllocator32<0ul, 140737488355328ull, 0ul, __sanitizer::SizeClassMap<17ul, 64ul, 14ul>, 20ul, __sanitizer::TwoLevelByteMap<32768ull, 4096ull, __sanitizer::NoOpMapUnmapCallback>, __sanitizer::NoOpMapUnmapCallback> >*)': gotsan.cc:(.text+0x1591): undefined reference to `__libc_malloc' race_linux_amd64.syso: In function `__sanitizer::GetArgv()': gotsan.cc:(.text+0x4503): undefined reference to `__libc_stack_end' race_linux_amd64.syso: In function `__sanitizer::ReExec()': gotsan.cc:(.text+0x8f07): undefined reference to `__libc_stack_end' race_linux_amd64.syso: In function `__sanitizer::InternalFree(void*, __sanitizer::SizeClassAllocatorLocalCache<__sanitizer::SizeClassAllocator32<0ul, 140737488355328ull, 0ul, __sanitizer::SizeClassMap<17ul, 64ul, 14ul>, 20ul, __sanitizer::TwoLevelByteMap<32768ull, 4096ull, __sanitizer::NoOpMapUnmapCallback>, __sanitizer::NoOpMapUnmapCallback> >*)': gotsan.cc:(.text+0x5eb8): undefined reference to `__libc_free' collect2: error: ld returned 1 exit status On 11 July 2016 at 14:34, Ian Lance Taylor <i...@golang.org> wrote: > On Mon, Jul 11, 2016 at 6:04 AM, Peter Waller <pe...@pdftables.com> wrote: > > > > I'm guessing the answer to this one is "use glibc", but I can't find any > > existing commentary on this in within the go ecosystem and thought it was > > worth a quick shot in case there is a fix. I'm aware that tsan and glibc > are > > fairly well intermingled, so probably requires a lot of work possibly on > > both musl and go's part. > > > > Just in case there is a quick fix though, here's a minimal reproduce > using > > docker. I'd be interested in seeing this one work some day. > > The race detector requires some C++ code, and for convenience building > Go that code is supplied as an object file. To build with a different > C library you need to either disable the race detector, or rebuild the > object file with the libc you want to use. To rebuild the object > file, see src/runtime/race/README. > > 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. For more options, visit https://groups.google.com/d/optout.