<div dir="ltr">Agree we should just build clang as a dependency.  We're already building most of it anyway since we require it for the expression parser, so spitting out the executabatle as well should not be too controversial.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 27, 2017 at 12:58 PM Davide Italiano via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mind if I try to write a patch for this one or you want to do it?<br>
<br>
On Fri, Oct 27, 2017 at 12:56 PM, Pavel Labath <<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>> wrote:<br>
> Yes, listing clang as a dependency sounds like a good idea.<br>
><br>
> On 27 October 2017 at 12:45, Davide Italiano <<a href="mailto:dccitaliano@gmail.com" target="_blank">dccitaliano@gmail.com</a>> wrote:<br>
>> So, I wiped out my directory for the build and then I created it again using<br>
>> cmake -GNinja ../<br>
>><br>
>> I found out what the bug/problem is, BTW (was going to reply to this<br>
>> e-mail but you've beaten me to the punch).<br>
>> You switched LLDB to build with an in-tree clang, but ninja check-lldb<br>
>> doesn't really require clang to be built.<br>
>> As such, once I cleaned up my checkout, I ended up typing just `ninja<br>
>> check-lldb` and that failed because clang wasn't built.<br>
>> I claim that `ninja check-lldb` should list clang as dependency when<br>
>> we're running the tests with the in-tree clang.<br>
>> WDYT?<br>
>><br>
>> Thanks!<br>
>><br>
>> --<br>
>> Davide<br>
>><br>
>><br>
>><br>
>> On Fri, Oct 27, 2017 at 12:41 PM, Pavel Labath <<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>> wrote:<br>
>>> Did you clean your cmake cache before runinng this? Does<br>
>>> '/home/davide/work/build-lldb/bin/clang' correctly refer to a clang<br>
>>> binary you just built?<br>
>>><br>
>>> On 27 October 2017 at 12:39, Davide Italiano <<a href="mailto:dccitaliano@gmail.com" target="_blank">dccitaliano@gmail.com</a>> wrote:<br>
>>>> Yes, it seems `configuration.compiler` is None, so this explodes:<br>
>>>><br>
>>>> [...]<br>
>>>>         if not is_exe(configuration.compiler):<br>
>>>><br>
>>>> [...]<br>
>>>><br>
>>>> On Fri, Oct 27, 2017 at 12:37 PM, Davide Italiano <<a href="mailto:dccitaliano@gmail.com" target="_blank">dccitaliano@gmail.com</a>> wrote:<br>
>>>>> I think that this change (or some change nearby) broke `check-lldb` on Fedora.<br>
>>>>><br>
>>>>> I'm investigating, but in the meanwhile, here's the log.<br>
>>>>><br>
>>>>> $ ninja check-lldb<br>
>>>>> [2/2] Testing LLDB (parallel execution, with a separate subprocess per test)<br>
>>>>> Traceback (most recent call last):<br>
>>>>>   File "/home/davide/work/llvm-lldb/tools/lldb/test/dotest.py", line<br>
>>>>> 7, in <module><br>
>>>>>     lldbsuite.test.run_suite()<br>
>>>>>   File "/home/davide/work/llvm-lldb/tools/lldb/packages/Python/lldbsuite/test/dotest.py",<br>
>>>>> line 1099, in run_suite<br>
>>>>>     parseOptionsAndInitTestdirs()<br>
>>>>>   File "/home/davide/work/llvm-lldb/tools/lldb/packages/Python/lldbsuite/test/dotest.py",<br>
>>>>> line 282, in parseOptionsAndInitTestdirs<br>
>>>>>     if not is_exe(configuration.compiler):<br>
>>>>>   File "/home/davide/work/llvm-lldb/tools/lldb/packages/Python/lldbsuite/test/dotest.py",<br>
>>>>> line 54, in is_exe<br>
>>>>>     return os.path.isfile(fpath) and os.access(fpath, os.X_OK)<br>
>>>>>   File "/usr/lib64/python2.7/genericpath.py", line 37, in isfile<br>
>>>>>     st = os.stat(path)<br>
>>>>> TypeError: coercing to Unicode: need string or buffer, NoneType found<br>
>>>>> FAILED: cd /home/davide/work/build-lldb/tools/lldb/test &&<br>
>>>>> /usr/bin/python2.7<br>
>>>>> /home/davide/work/llvm-lldb/tools/lldb/test/dotest.py -q --arch=x86_64<br>
>>>>> --executable /home/davide/work/build-lldb/bin/lldb -s<br>
>>>>> /home/davide/work/build-lldb/lldb-test-traces -S nm -u CXXFLAGS -u<br>
>>>>> CFLAGS -C /home/davide/work/build-lldb/bin/clang --env<br>
>>>>> ARCHIVER=/usr/bin/ar --env OBJCOPY=/usr/bin/objcopy<br>
>>>>> ninja: build stopped: subcommand failed.<br>
>>>>><br>
>>>>> On Thu, Oct 26, 2017 at 7:18 PM, Pavel Labath via lldb-dev<br>
>>>>> <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br>
>>>>>> I am going to check in a change (D39215) which causes the check-lldb<br>
>>>>>> target to use the just-built clang for compiling the test inferiors<br>
>>>>>> (instead of the system compiler, which was the old default). The main<br>
>>>>>> reason for this is to provide better reproducibility of test results<br>
>>>>>> between different machines/developers, by removing one of the main<br>
>>>>>> sources of nondeterminism. This behavior can be overridden by setting<br>
>>>>>> the LLDB_TEST_C_COMPILER and LLDB_TEST_CXX_COMPILER cmake variables.<br>
>>>>>><br>
>>>>>> For the change to take effect you will need to clean your build folder<br>
>>>>>> (or at least, remove the affected variables from your CMakeCache.txt).<br>
>>>>>> After this you may observe a change in the test results from the<br>
>>>>>> check-lldb run.<br>
>>>>>><br>
>>>>>> Note that this change only affect cmake code -- if you run your tests<br>
>>>>>> by running dotest.py directly, nothing will change for you.<br>
>>>>>><br>
>>>>>> regards,<br>
>>>>>> pavel<br>
>>>>>> _______________________________________________<br>
>>>>>> lldb-dev mailing list<br>
>>>>>> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
>>>>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div>