<div dir="ltr"><div dir="ltr">On Fri, Mar 15, 2019 at 10:04 AM Pavel Labath <<a href="mailto:pavel@labath.sk">pavel@labath.sk</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 14/03/2019 21:45, Nico Weber wrote:<br>
> I tried LLVM_ENABLE_PROJECTS=all today, and it fails with<br>
> <br>
> CMake Error: The following variables are used in this project, but they <br>
> are set to NOTFOUND.<br>
> Please set them or make sure they are set and tested correctly in the <br>
> CMake files:<br>
> libedit_INCLUDE_DIRS<br>
>     used as include directory in directory <br>
> /usr/local/google/home/thakis/src/llvm-build-project/CMakeFiles/CMakeTmp<br>
>     used as include directory in directory <br>
> /usr/local/google/home/thakis/src/llvm-build-project/CMakeFiles/CMakeTmp<br>
>     used as include directory in directory <br>
> /usr/local/google/home/thakis/src/llvm-build-project/CMakeFiles/CMakeTmp<br>
> libedit_LIBRARIES<br>
>      linked by target "cmTC_43ea9" in directory <br>
> /usr/local/google/home/thakis/src/llvm-build-project/CMakeFiles/CMakeTmp<br>
> <br>
> CMake Error at /usr/share/cmake-3.10/Modules/CheckTypeSize.cmake:114 <br>
> (try_compile):<br>
>    Failed to configure test project build system.<br>
> Call Stack (most recent call first):<br>
>    /usr/share/cmake-3.10/Modules/CheckTypeSize.cmake:239 <br>
> (__check_type_size_impl)<br>
>    <br>
> /usr/local/google/home/thakis/src/llvm-project/lldb/cmake/modules/LLDBConfig.cmake:106 <br>
> (check_type_size)<br>
>    /usr/local/google/home/thakis/src/llvm-project/lldb/CMakeLists.txt:15 <br>
> (include)<br>
> <br>
> <br>
> <br>
> Is that expected?<br>
> <br>
<br>
Whether it is "expected" to fail the build if you don't have libedit is <br>
a bit of a complicated question and the answer depends on which side of <br>
the "should dependencies auto-disable themselves when not found" debate. <br></blockquote><div><br></div><div>I am in the "document build prereqs and require them" camp but nothing else in LLVM's CMake build is, as far as I can tell. In fact, if that was project philosophy we wouldn't need all these cmake config checks, and yet we have them. So I think this should be consistent with the rest of LLVM.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
However, it's certainly not expected that the build fails in this way, <br>
as there is a find_package(LibEdit REQUIRED) call two lines above this <br>
check.<br>
<br>
I've done some digging around, and it seems this is due to a bug in our <br>
our libedit-finding code. r356263 will fix that, so now the build will <br>
fail slightly earlier and with a slightly better error message.<br>
<br>
If we want to change the libedit dependency to auto-disabling, then we <br>
should start a separate thread about that.</blockquote><div><br></div><div>I think that's the status quo already.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I believe that's not <br>
something that this commit has caused. What it may have done is that it <br>
changed the failure from a build-time thing (we would fail when trying <br>
to compile code using libedit) to a configure-time failure. That I would <br>
consider to be an improvement. :)<br></blockquote><div><br></div><div>I'm not sure I agree with that; if it fails at build time I can at least still build everything that's not lldb.</div><div> </div></div></div>