[lldb-dev] Unable to build LLDB 4.0 on Debian Linux
Andy Gibbs via lldb-dev
lldb-dev at lists.llvm.org
Fri May 12 11:21:55 PDT 2017
Sorry not to have come back sooner.
The problem is not the -Werror (I think) but the -pedantic that gets added during lldb configuration. Having looked through the cmake files, I cannot see how this is added though. Interestingly enough the backtrace detection is run earlier in configuration, possibly in the llvm part itself, where it passes without problem. The only difference in the log file is that earlier on there is no -pedantic option given.
Also, although this is an aside, if clang is the compiler, it also passes (with the -pedantic). Problem is, then I need to build clang to build clang :o)
From: Zachary Turner <zturner at google.com>
Sent: 02 May 2017 13:50
To: Pavel Labath; Andy Gibbs
Cc: lldb-dev at lists.llvm.org
Subject: Re: [lldb-dev] Unable to build LLDB 4.0 on Debian Linux
This is in cmake detection code though, the options you set for your build have no bearing there right?
This looks like a bug in cmake to me, perhaps a newer cmake version can fix it?
On Tue, May 2, 2017 at 3:24 AM Pavel Labath via lldb-dev <lldb-dev at lists.llvm.org<mailto:lldb-dev at lists.llvm.org>> wrote:
What's the cmake command you are using?
It sounds like you somehow ended up enabling -Werror, which is
confusing the backtrace-detection code (and probably most of the other
cmake compile checks).
One of the workarounds would be to disable -Werror.
On 28 April 2017 at 22:36, Andy Gibbs via lldb-dev
<lldb-dev at lists.llvm.org<mailto:lldb-dev at lists.llvm.org>> wrote:
> I am having a problem building the 4.0 release branch of LLDB on Debian
> Stretch. Cmake returns the following fault:
> -- LLDB version: 4.0.0
> -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version
> -- Performing Test HAVE_PROCESS_VM_READV
> -- Performing Test HAVE_PROCESS_VM_READV - Success
> -- Found Curses: /usr/lib/x86_64-linux-gnu/libcurses.so
> -- Looking for __GLIBCXX__
> -- Looking for __GLIBCXX__ - found
> -- Performing Test LLDB_USING_LIBSTDCXX_4_9
> -- Performing Test LLDB_USING_LIBSTDCXX_4_9 - Success
> -- Looking for backtrace
> -- Looking for backtrace - not found
> -- Could NOT find Backtrace (missing: Backtrace_LIBRARY)
> -- Found Doxygen: /usr/bin/doxygen (found version "1.8.13")
> -- Found SWIG: /usr/bin/swig3.0 (found version "3.0.10")
> -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED
> -- Performing Test CXX_SUPPORTS_NO_MACRO_REDEFINED - Success
> -- Symbols (liblldb): exporting all symbols from the lldb namespace
> CMake Error: The following variables are used in this project, but they
> are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the
> CMake files:
> Backtrace_LIBRARY (ADVANCED)
> linked by target "liblldb" in directory
> linked by target "LLDBBreakpointTests" in directory
> linked by target "LLDBCoreTests" in directory
> linked by target "EditlineTests" in directory
> linked by target "ExpressionTests" in directory
> linked by target "HostTests" in directory
> linked by target "InterpreterTests" in directory
> linked by target "LanguageCPlusPlusTests" in directory
> linked by target "LLDBPlatformTests" in directory
> linked by target "ProcessGdbRemoteTests" in directory
> linked by target "LLDBMinidumpTests" in directory
> linked by target "ScriptInterpreterPythonTests" in directory
> linked by target "SymbolTests" in directory
> linked by target "SymbolFileDWARFTests" in directory
> linked by target "UnwindAssemblyx86Tests" in directory
> linked by target "UtilityTests" in directory
> -- Configuring incomplete, errors occurred!
> See also "build-4.0/bootstrap/CMakeFiles/CMakeOutput.log".
> See also "build-4.0/bootstrap/CMakeFiles/CMakeError.log".
> The output from CMakeError.log is:
> Determining if the backtrace exist failed with the following output:
> Change Dir: build-4.0/bootstrap/CMakeFiles/CMakeTmp
> Run Build Command:"build-4.0/bin/ninja" "cmTC_1e735"
> [1/2] Building C object CMakeFiles/cmTC_1e735.dir/CheckSymbolExists.c.o
> FAILED: CMakeFiles/cmTC_1e735.dir/CheckSymbolExists.c.o
> /usr/bin/cc -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings
> -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment
> -Werror -Werror=date-time -ffunction-sections -fdata-sections -o
> CMakeFiles/cmTC_1e735.dir/CheckSymbolExists.c.o -c
> build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function
> build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:11: error:
> ISO C forbids conversion of function pointer to object pointer type
> return ((int*)(&backtrace))[argc];
> cc1: all warnings being treated as errors
> ninja: build stopped: subcommand failed.
> File build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
> /* */
> #include <execinfo.h>
> int main(int argc, char** argv)
> #ifndef backtrace
> return ((int*)(&backtrace))[argc];
> return 0;
> It seems that the detection routine is invalid. The gcc in use is 6.3.0.
> Anyone any idea how to fix / work around this problem?
> Many thanks,
> lldb-dev mailing list
> lldb-dev at lists.llvm.org<mailto:lldb-dev at lists.llvm.org>
lldb-dev mailing list
lldb-dev at lists.llvm.org<mailto:lldb-dev at lists.llvm.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev