<div dir="ltr">I started running into this after moving to a new machine. When building check-all, I get:<div><br></div><div>/work/llvm-6.0/llvm.src/<wbr>projects/compiler-rt/lib/tsan/<wbr>go/buildgo.sh: line 152: 53639 Segmentation fault</div><div><br></div><div>running it with SILENT=0:</div><div><br></div><div><div>cd /work/llvm-6.0/llvm.src/<wbr>projects/compiler-rt/lib/tsan/<wbr>go && env "CC=/usr/bin/cc " IN_TMPDIR=1 SILENT=0 /work/llvm-6.0/llvm.src/<wbr>projects/compiler-rt/lib/tsan/<wbr>go/buildgo.sh</div><div>/usr/bin/cc gotsan.cc -c -o /tmp/gotsan.WEnzff9pjs/race_<wbr>linux_amd64.syso -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO=1 -DSANITIZER_DEADLOCK_DETECTOR_<wbr>VERSION=2 -fPIC -ffreestanding -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror -Wno-unknown-warning-option -DSANITIZER_DEBUG=0 -O3 -msse3 -fomit-frame-pointer</div><div>==54479==ERROR: ThreadSanitizer failed to allocate 0x4000 (16384) bytes at address 17923b3080000 (errno: 12)</div><div>/work/llvm-6.0/llvm.src/<wbr>projects/compiler-rt/lib/tsan/<wbr>go/buildgo.sh: line 152: 54479 Segmentation fault      $DIR/test</div><div><div class="gmail_extra"><br></div><div class="gmail_extra">It seems the problem might be with the gcc version used. For me, /usr/bin/cc is GCC (Debian 6.3.0-18)</div><div class="gmail_extra"><br></div><div class="gmail_extra">If I set CC to a newly-built Clang it works, so this doesn't affect my bootstrapped builds, but it does affect the non-bootstrapped ones.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm not sure what to do here.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 28, 2017 at 9:55 AM, Dmitry Vyukov via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I guess there is lots of stuff that you don't care about besides<br>
tsan/go that is built and tested during llvm build, and there is no<br>
way to selectively disable each one of that. By design.<br>
In the long run we need to fix all failures (please file a proper<br>
bug). If you are looking for a temporal workaround, then comment it<br>
out. I don't what else to suggest.<br>
<div class="gmail-m_3483372141413378226gmail-HOEnZb"><div class="gmail-m_3483372141413378226gmail-h5"><br>
<br>
On Tue, Nov 28, 2017 at 9:47 AM, Csaba Raduly <<a href="mailto:rcsaba@gmail.com" target="_blank">rcsaba@gmail.com</a>> wrote:<br>
> Hi,<br>
> I want to build clang successfully :) I don't care about Go.<br>
><br>
> buildgo.sh is invoked directly by ninja. I don't want to modify the<br>
> (generated) build.ninja<br>
><br>
> The "SILENT=1" is hard-coded into build.ninja and ninja -v has no effect on it.<br>
><br>
> I tried passing  -DLLVM_INCLUDE_GO_TESTS=OFF to cmake but the result<br>
> was the same.<br>
><br>
> Csaba<br>
><br>
> On Tue, Nov 28, 2017 at 7:27 AM, Dmitry Vyukov <<a href="mailto:dvyukov@google.com" target="_blank">dvyukov@google.com</a>> wrote:<br>
>> On Tue, Nov 28, 2017 at 12:16 AM, Kostya Serebryany <<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>> wrote:<br>
>>> +dvyukov<br>
>>><br>
>>> On Mon, Nov 27, 2017 at 4:56 AM, Csaba Raduly via llvm-dev<br>
>>> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>>>><br>
>>>> Hi all,<br>
>>>><br>
>>>> I'm trying to build clang on Ubuntu 17.10 - the build succeeds, but<br>
>>>> testing fails:<br>
>>>><br>
>>>> ~/wk/LLVM/build_release$ svn info ../llvm/<br>
>>>> Path: /home/csabaraduly/wk/LLVM/llvm<br>
>>>> Working Copy Root Path: /home/csabaraduly/wk/LLVM/llvm<br>
>>>> URL: <a href="https://llvm.org/svn/llvm-project/llvm/trunk" rel="noreferrer" target="_blank">https://llvm.org/svn/llvm-proj<wbr>ect/llvm/trunk</a><br>
>>>> Relative URL: ^/llvm/trunk<br>
>>>> Repository Root: <a href="https://llvm.org/svn/llvm-project" rel="noreferrer" target="_blank">https://llvm.org/svn/llvm-proj<wbr>ect</a><br>
>>>> Repository UUID: 91177308-0d34-0410-b5e6-96231b<wbr>3b80d8<br>
>>>> Revision: 319018<br>
>>>> Node Kind: directory<br>
>>>> Schedule: normal<br>
>>>> Last Changed Author: mkazantsev<br>
>>>> Last Changed Rev: 319018<br>
>>>> Last Changed Date: 2017-11-27 12:20:58 +0100 (Mon, 27 Nov 2017)<br>
>>>><br>
>>>> ~/wk/LLVM/build_release$ ninja -v all check-all<br>
>>>> [1/4] cd ~/wk/LLVM/build_release/utils/<wbr>lit && /usr/bin/cmake -E<br>
>>>> remove_directory ~/wk/LLVM/build_release/utils/<wbr>lit/tests &&<br>
>>>> /usr/bin/cmake -E copy_directory ~/wk/LLVM/llvm/utils/lit/tests<br>
>>>> ~/wk/LLVM/build_release/utils/<wbr>lit/tests && /usr/bin/cmake -E copy<br>
>>>> ~/wk/LLVM/build_release/utils/<wbr>lit/lit.site.cfg<br>
>>>> ~/wk/LLVM/build_release/utils/<wbr>lit/tests<br>
>>>> [2/4] cd ~/wk/LLVM/llvm/projects/compil<wbr>er-rt/lib/tsan/go && env<br>
>>>> "CC=/usr/bin/cc " IN_TMPDIR=1 SILENT=1<br>
>>>> ~/wk/LLVM/llvm/projects/compil<wbr>er-rt/lib/tsan/go/buildgo.sh<br>
>>>> FAILED: projects/compiler-rt/lib/tsan/<wbr>CMakeFiles/GotsanRuntimeCheck<br>
>>>> cd ~/wk/LLVM/llvm/projects/compil<wbr>er-rt/lib/tsan/go && env<br>
>>>> "CC=/usr/bin/cc " IN_TMPDIR=1 SILENT=1<br>
>>>> ~/wk/LLVM/llvm/projects/compil<wbr>er-rt/lib/tsan/go/buildgo.sh<br>
>>>> [3/4] cd ~/wk/LLVM/build_release/projec<wbr>ts/compiler-rt/lib && env<br>
>>>> LLVM_CHECKOUT=~/wk/LLVM/llvm SILENT=1 TMPDIR=<br>
>>>> PYTHON_EXECUTABLE=/usr/bin/pyt<wbr>hon2.7<br>
>>>> COMPILER_RT=~/wk/LLVM/llvm/pro<wbr>jects/compiler-rt<br>
>>>><br>
>>>> ~/wk/LLVM/llvm/projects/compil<wbr>er-rt/lib/sanitizer_common/<wbr>scripts/check_lint.sh<br>
>>>> ninja: build stopped: subcommand failed.<br>
>>>><br>
>>>> Even ninja -v resulted in SILENT=1 being passed to buildgo.sh, so I<br>
>>>> tried to run it manually:<br>
>>>><br>
>>>> ~/wk/LLVM/build_release$ pushd<br>
>>>> ~/wk/LLVM/llvm/projects/compil<wbr>er-rt/lib/tsan/go && env "CC=/usr/bin/cc<br>
>>>> " IN_TMPDIR=1 SILENT=0<br>
>>>> ~/wk/LLVM/llvm/projects/compil<wbr>er-rt/lib/tsan/go/buildgo.sh<br>
>>>> ~/wk/LLVM/llvm/projects/compil<wbr>er-rt/lib/tsan/go ~/wk/LLVM/build_release<br>
>>>> /usr/bin/cc gotsan.cc -c -o<br>
>>>> /tmp/gotsan.vYTnyXdSJU/race_li<wbr>nux_amd64.syso -I../rtl -I../..<br>
>>>> -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall<br>
>>>> -fno-exceptions -fno-rtti -DSANITIZER_GO=1<br>
>>>> -DSANITIZER_DEADLOCK_DETECTOR_<wbr>VERSION=2 -fPIC -ffreestanding<br>
>>>> -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror<br>
>>>> -Wno-unknown-warning-option -DSANITIZER_DEBUG=0 -O3 -msse3<br>
>>>> -fomit-frame-pointer<br>
>>>> ==12640==ERROR: ThreadSanitizer failed to allocate 0x4000 (16384)<br>
>>>> bytes at address 1764aec780000 (errno: 12)<br>
>>>> Segmentation fault (core dumped)<br>
>>>><br>
>>>> ~/wk/LLVM/build_release$ uname -a<br>
>>>> Linux 4.13.0-17-generic #20-Ubuntu SMP Mon Nov 6 10:04:08 UTC 2017<br>
>>>> x86_64 x86_64 x86_64 GNU/Linux<br>
>>>><br>
>>>> ~/wk/LLVM/build_release$ /usr/bin/cc -v<br>
>>>> Using built-in specs.<br>
>>>> COLLECT_GCC=/usr/bin/cc<br>
>>>> COLLECT_LTO_WRAPPER=/usr/lib/g<wbr>cc/x86_64-linux-gnu/7/lto-wrap<wbr>per<br>
>>>> OFFLOAD_TARGET_NAMES=nvptx-non<wbr>e<br>
>>>> OFFLOAD_TARGET_DEFAULT=1<br>
>>>> Target: x86_64-linux-gnu<br>
>>>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu<br>
>>>> 7.2.0-8ubuntu3' --with-bugurl=file:///usr/shar<wbr>e/doc/gcc-7/README.Bugs<br>
>>>> --enable-languages=c,ada,c++,g<wbr>o,brig,d,fortran,objc,obj-c++<br>
>>>> --prefix=/usr --with-gcc-major-version-only --program-suffix=-7<br>
>>>> --program-prefix=x86_64-linux-<wbr>gnu- --enable-shared<br>
>>>> --enable-linker-build-id --libexecdir=/usr/lib<br>
>>>> --without-included-gettext --enable-threads=posix --libdir=/usr/lib<br>
>>>> --enable-nls --with-sysroot=/ --enable-clocale=gnu<br>
>>>> --enable-libstdcxx-debug --enable-libstdcxx-time=yes<br>
>>>> --with-default-libstdcxx-abi=n<wbr>ew --enable-gnu-unique-object<br>
>>>> --disable-vtable-verify --enable-libmpx --enable-plugin<br>
>>>> --enable-default-pie --with-system-zlib --with-target-system-zlib<br>
>>>> --enable-objc-gc=auto --enable-multiarch --disable-werror<br>
>>>> --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,m<wbr>x32<br>
>>>> --enable-multilib --with-tune=generic<br>
>>>> --enable-offload-targets=nvptx<wbr>-none --without-cuda-driver<br>
>>>> --enable-checking=release --build=x86_64-linux-gnu<br>
>>>> --host=x86_64-linux-gnu --target=x86_64-linux-gnu<br>
>>>> Thread model: posix<br>
>>>> gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3)<br>
>>>><br>
>>>> Is there a way to disable Go, or at least its tsan checks?<br>
>><br>
>><br>
>> Hi,<br>
>><br>
>> Comments out buildgo.sh invocation from build scripts? Or you want<br>
>> something else?<br>
><br>
><br>
><br>
> --<br>
> GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++<br>
> The Tao of math: The numbers you can count are not the real numbers.<br>
> Life is complex, with real and imaginary parts.<br>
> "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds<br>
> "People disagree with me. I just ignore them." -- Linus Torvalds<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div></div></div></div>