Again, this has nothing to do with our build files, it is in cmakes internal builtin modules when it is trying to compile a program to see if a symbol exists.  This looks like a cmake bug, try upgrading cmake <br><div class="gmail_quote"><div dir="ltr">On Mon, May 15, 2017 at 1:25 AM Pavel Labath <<a href="mailto:labath@google.com">labath@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Technically, it's the combination of -Werror and -pedantic which is<br>
causing the problem. Any single one of them would be fine :)<br>
<br>
I am not sure what could be the problem, LLDB's build files do not<br>
explicitly add any of these flags, so they must be coming from<br>
somewhere else. Without more information, it's hard to say from where.<br>
If you send me your cmake command line, I can try to reproduce the<br>
problem. Otherwise, you're pretty much on your own. All I can<br>
recommend is to try the --trace cmake argument, which may give you an<br>
idea where are those flags coming from.<br>
<br>
pl<br>
<br>
On 12 May 2017 at 19:21, Andy Gibbs <<a href="mailto:andyg1001@hotmail.co.uk" target="_blank">andyg1001@hotmail.co.uk</a>> wrote:<br>
> Sorry not to have come back sooner.<br>
><br>
><br>
> The problem is not the -Werror (I think) but the -pedantic that gets added<br>
> during lldb configuration.  Having looked through the cmake files, I cannot<br>
> see how this is added though.  Interestingly enough the backtrace detection<br>
> is run earlier in configuration, possibly in the llvm part itself, where it<br>
> passes without problem.  The only difference in the log file is that earlier<br>
> on there is no -pedantic option given.<br>
><br>
><br>
> Also, although this is an aside, if clang is the compiler, it also passes<br>
> (with the -pedantic).  Problem is, then I need to build clang to build clang<br>
> :o)<br>
><br>
><br>
> Cheers,<br>
><br>
> Andy<br>
><br>
><br>
><br>
> ________________________________<br>
> From: Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>><br>
> Sent: 02 May 2017 13:50<br>
> To: Pavel Labath; Andy Gibbs<br>
> Cc: <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
> Subject: Re: [lldb-dev] Unable to build LLDB 4.0 on Debian Linux<br>
><br>
> This is in cmake detection code though, the options you set for your build<br>
> have no bearing there right?<br>
><br>
> This looks like a bug in cmake to me, perhaps a newer cmake version can fix<br>
> it?<br>
> On Tue, May 2, 2017 at 3:24 AM Pavel Labath via lldb-dev<br>
> <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> What's the cmake command you are using?<br>
>><br>
>> It sounds like you somehow ended up enabling -Werror, which is<br>
>> confusing the backtrace-detection code (and probably most of the other<br>
>> cmake compile checks).<br>
>><br>
>> One of the workarounds would be to disable -Werror.<br>
>><br>
>> pl<br>
>><br>
>> On 28 April 2017 at 22:36, Andy Gibbs via lldb-dev<br>
>> <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> ><br>
>> > I am having a problem building the 4.0 release branch of LLDB on Debian<br>
>> > Stretch.  Cmake returns the following fault:<br>
>> ><br>
>> ><br>
>> >   -- LLDB version: 4.0.0<br>
>> >   -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version<br>
>> > "2.9.4")<br>
>> >   -- Performing Test HAVE_PROCESS_VM_READV<br>
>> >   -- Performing Test HAVE_PROCESS_VM_READV - Success<br>
>> >   -- Found Curses: /usr/lib/x86_64-linux-gnu/libcurses.so<br>
>> >   -- Looking for __GLIBCXX__<br>
>> >   -- Looking for __GLIBCXX__ - found<br>
>> >   -- Performing Test LLDB_USING_LIBSTDCXX_4_9<br>
>> >   -- Performing Test LLDB_USING_LIBSTDCXX_4_9 - Success<br>
>> >   -- Looking for backtrace<br>
>> >   -- Looking for backtrace - not found<br>
>> >   -- Could NOT find Backtrace (missing:  Backtrace_LIBRARY)<br>
>> >   -- Found Doxygen: /usr/bin/doxygen (found version "1.8.13")<br>
>> >   -- Found SWIG: /usr/bin/swig3.0 (found version "3.0.10")<br>
>> >   -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED<br>
>> >   -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED - Success<br>
>> >   -- Symbols (liblldb): exporting all symbols from the lldb namespace<br>
>> >   CMake Error: The following variables are used in this project, but<br>
>> > 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>
>> >   Backtrace_LIBRARY (ADVANCED)<br>
>> >       linked by target "liblldb" in directory<br>
>> > clang-4.0/tools/lldb/source/API<br>
>> >       linked by target "LLDBBreakpointTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Breakpoint<br>
>> >       linked by target "LLDBCoreTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Core<br>
>> >       linked by target "EditlineTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Editline<br>
>> >       linked by target "ExpressionTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Expression<br>
>> >       linked by target "HostTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Host<br>
>> >       linked by target "InterpreterTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Interpreter<br>
>> >       linked by target "LanguageCPlusPlusTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Language/CPlusPlus<br>
>> >       linked by target "LLDBPlatformTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Platform<br>
>> >       linked by target "ProcessGdbRemoteTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Process/gdb-remote<br>
>> >       linked by target "LLDBMinidumpTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Process/minidump<br>
>> >       linked by target "ScriptInterpreterPythonTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/ScriptInterpreter/Python<br>
>> >       linked by target "SymbolTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Symbol<br>
>> >       linked by target "SymbolFileDWARFTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/SymbolFile/DWARF<br>
>> >       linked by target "UnwindAssemblyx86Tests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/UnwindAssembly/x86<br>
>> >       linked by target "UtilityTests" in directory<br>
>> > clang-4.0/tools/lldb/unittests/Utility<br>
>> ><br>
>> >   -- Configuring incomplete, errors occurred!<br>
>> >   See also "build-4.0/bootstrap/CMakeFiles/CMakeOutput.log".<br>
>> >   See also "build-4.0/bootstrap/CMakeFiles/CMakeError.log".<br>
>> ><br>
>> ><br>
>> ><br>
>> > The output from CMakeError.log is:<br>
>> ><br>
>> ><br>
>> >   Determining if the backtrace exist failed with the following output:<br>
>> >   Change Dir: build-4.0/bootstrap/CMakeFiles/CMakeTmp<br>
>> ><br>
>> >   Run Build Command:"build-4.0/bin/ninja" "cmTC_1e735"<br>
>> >   [1/2] Building C object<br>
>> > CMakeFiles/cmTC_1e735.dir/CheckSymbolExists.c.o<br>
>> >   FAILED: CMakeFiles/cmTC_1e735.dir/CheckSymbolExists.c.o<br>
>> >   /usr/bin/cc    -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings<br>
>> > -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment<br>
>> > -Werror -Werror=date-time -ffunction-sections -fdata-sections -o<br>
>> > CMakeFiles/cmTC_1e735.dir/CheckSymbolExists.c.o   -c<br>
>> > build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c<br>
>> >   build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In<br>
>> > function<br>
>> > ‘main’:<br>
>> >   build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:11:<br>
>> > error:<br>
>> > ISO C forbids conversion of function pointer to object pointer type<br>
>> > [-Werror=pedantic]<br>
>> >      return ((int*)(&backtrace))[argc];<br>
>> >              ^<br>
>> >   cc1: all warnings being treated as errors<br>
>> >   ninja: build stopped: subcommand failed.<br>
>> ><br>
>> >   File build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c:<br>
>> >   /* */<br>
>> >   #include <execinfo.h><br>
>> ><br>
>> >   int main(int argc, char** argv)<br>
>> >   {<br>
>> >     (void)argv;<br>
>> >   #ifndef backtrace<br>
>> >     return ((int*)(&backtrace))[argc];<br>
>> >   #else<br>
>> >     (void)argc;<br>
>> >     return 0;<br>
>> >   #endif<br>
>> >   }<br>
>> ><br>
>> ><br>
>> > It seems that the detection routine is invalid.  The gcc in use is<br>
>> > 6.3.0.<br>
>> > Anyone any idea how to fix / work around this problem?<br>
>> ><br>
>> ><br>
>> > Many thanks,<br>
>> ><br>
>> ><br>
>> > Andy<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><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>
>> _______________________________________________<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>