On Mon, Jul 11, 2016 at 6:57 AM, Peter Waller <pe...@pdftables.com> wrote:
> Thanks Ian. No luck though, that doesn't seem to be it.
>
> I have rebuilt the race detector .syso as mentioned in the 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

Hmmm, you're right, it does look like the sanitizer source code is
closely tied to glibc.  In sanitizer_common/sanitizer_allocator.cc I
see direct references to __libc_malloc.

In any case the step toward supporting the race detector with musl is
going to start with porting the compiler-rt library to musl.

If you just want to focus on Go, don't build the race detector.  It
looks like you are running the command `go install -v -race .`.  Don't
do that.  To pass the tests you may need to modify the method
tester.raceDetectorSupported in cmd/dist/test.go.

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.

Reply via email to