<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks for helping out!!!</div><div class=""><br class=""></div>Could you apply the following on top of that:<div class=""><br class=""><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><b class="">diff --git a/lib/sanitizer_common/sanitizer_common_nolibc.cc b/lib/sanitizer_common/sanitizer_common_nolibc.cc</b></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><b class="">index 65d1e37..4115167 100644</b></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><b class="">--- a/lib/sanitizer_common/sanitizer_common_nolibc.cc</b></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><b class="">+++ b/lib/sanitizer_common/sanitizer_common_nolibc.cc</b></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 187, 199);" class="">@@ -17,10 +17,8 @@</div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> namespace __sanitizer {</div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(195, 55, 32);" class="">-#if SANITIZER_LINUX</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> void WriteToSyslog(const char *buffer) {}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(195, 55, 32);" class="">-#endif</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(195, 55, 32);" class="">-</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class="">+bool ShouldLogAfterPrintf() { return false; }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> void Abort() { internal__exit(1); }</div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> }  // namespace __sanitizer</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Oct 27, 2015, at 4:28 PM, H.J. Lu <<a href="mailto:hjl.tools@gmail.com" class="">hjl.tools@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Tue, Oct 27, 2015 at 3:57 PM, Kuba Brecka <<a href="mailto:jbrecka@apple.com" class="">jbrecka@apple.com</a>> wrote:<br class=""><blockquote type="cite" class="">It caused:<br class=""><br class="">/tmp/gotsan.wmNri3GVMz/race_linux_amd64.syso: In function<br class="">`__sanitizer::SharedPrintfCode(bool, char const*, __va_list_tag*)':<br class=""><a href="http://gotsan.cc" class="">gotsan.cc</a>:(.text+0x4a85): undefined reference to<br class="">`__sanitizer::WriteToSyslog(char const*)'<br class="">collect2: error: ld returned 1 exit status<br class="">@<br class=""><br class="">on Fedora 22.<br class=""><br class=""><br class="">It looks like the issue is in lib/tsan/go/buildgo.sh, which doesn’t even<br class="">build sanitizer_common_libcdep.cc...<br class=""><br class="">Could you try adding it to buildgo.sh’s list of Linux sources?  If the fix<br class="">is not that easy, we can revert this patch, but since this looks like it’s a<br class="">Go-specific Linux-specific failure, it would be great if you could help us<br class="">with triaging the failure.<br class=""><br class="">Thanks,<br class="">Kuba<br class=""><br class=""></blockquote><br class="">After applying:<br class=""><br class="">diff --git a/lib/tsan/go/buildgo.sh b/lib/tsan/go/buildgo.sh<br class="">index a7e12f1..f34b23c 100755<br class="">--- a/lib/tsan/go/buildgo.sh<br class="">+++ b/lib/tsan/go/buildgo.sh<br class="">@@ -40,6 +40,7 @@ if [ "`uname -a | grep Linux`" != "" ]; then<br class="">   SRCS="<br class="">      $SRCS<br class="">      ../rtl/tsan_platform_linux.cc<br class="">+     ../../sanitizer_common/sanitizer_common_libcdep.cc<br class="">      ../../sanitizer_common/sanitizer_posix.cc<br class="">      ../../sanitizer_common/sanitizer_posix_libcdep.cc<br class="">      ../../sanitizer_common/sanitizer_procmaps_common.cc<br class=""><br class=""></div></div></blockquote><div>Also, I think we should unconditionally include sanitizer_common_libcdep.cc like this. (But the error below is unrelated.)</div><div><b style="font-family: Menlo; font-size: 11px;" class="">diff --git a/lib/tsan/go/buildgo.sh b/lib/tsan/go/buildgo.sh</b></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><b class="">index a7e12f1..8c89d8f 100755</b></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><b class="">--- a/lib/tsan/go/buildgo.sh</b></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><b class="">+++ b/lib/tsan/go/buildgo.sh</b></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 187, 199);" class="">@@ -20,6 +20,7 @@<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> SRCS="</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">        ../rtl/tsan_sync.cc</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">        ../../sanitizer_common/sanitizer_allocator.cc</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">        ../../sanitizer_common/sanitizer_common.cc</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class="">+<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">       </span>../../sanitizer_common/sanitizer_common_libcdep.cc</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">        ../../sanitizer_common/sanitizer_deadlock_detector2.cc</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">        ../../sanitizer_common/sanitizer_flag_parser.cc</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">        ../../sanitizer_common/sanitizer_flags.cc</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">I got<br class=""><br class="">libRTSanitizerCommon.test.nolibc.x86_64.a(sanitizer_printf.cc.o): In<br class="">function `__sanitizer::SharedPrintfCode(bool, char const*,<br class="">__va_list_tag*)':<br class="">/export/gnu/import/git/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_printf.cc:281:<br class="">undefined reference to `__sanitizer::ShouldLogAfterPrintf()'<br class="">clang-3.8: error: linker command failed with exit code 1 (use -v to<br class="">see invocation)<br class="">projects/compiler-rt/lib/sanitizer_common/tests/CMakeFiles/Sanitizer-x86_64-Test-Nolibc.dir/build.make:59:<br class="">recipe for target<br class="">'projects/compiler-rt/lib/sanitizer_common/tests/CMakeFiles/Sanitizer-x86_64-Test-Nolibc'<br class="">failed<br class="">gmake[4]: *** [projects/compiler-rt/lib/sanitizer_common/tests/CMakeFiles/Sanitizer-x86_64-Test-Nolibc]<br class="">Error 1<br class=""><br class=""><br class=""><br class="">-- <br class="">H.J.<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>