[lldb-dev] Unable to build LLDB 4.0 on Debian Linux

Andy Gibbs via lldb-dev lldb-dev at lists.llvm.org
Fri Apr 28 14:36:56 PDT 2017


Hi,


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 "2.9.4")
  -- 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 clang-4.0/tools/lldb/source/API
      linked by target "LLDBBreakpointTests" in directory clang-4.0/tools/lldb/unittests/Breakpoint
      linked by target "LLDBCoreTests" in directory clang-4.0/tools/lldb/unittests/Core
      linked by target "EditlineTests" in directory clang-4.0/tools/lldb/unittests/Editline
      linked by target "ExpressionTests" in directory clang-4.0/tools/lldb/unittests/Expression
      linked by target "HostTests" in directory clang-4.0/tools/lldb/unittests/Host
      linked by target "InterpreterTests" in directory clang-4.0/tools/lldb/unittests/Interpreter
      linked by target "LanguageCPlusPlusTests" in directory clang-4.0/tools/lldb/unittests/Language/CPlusPlus
      linked by target "LLDBPlatformTests" in directory clang-4.0/tools/lldb/unittests/Platform
      linked by target "ProcessGdbRemoteTests" in directory clang-4.0/tools/lldb/unittests/Process/gdb-remote
      linked by target "LLDBMinidumpTests" in directory clang-4.0/tools/lldb/unittests/Process/minidump
      linked by target "ScriptInterpreterPythonTests" in directory clang-4.0/tools/lldb/unittests/ScriptInterpreter/Python
      linked by target "SymbolTests" in directory clang-4.0/tools/lldb/unittests/Symbol
      linked by target "SymbolFileDWARFTests" in directory clang-4.0/tools/lldb/unittests/SymbolFile/DWARF
      linked by target "UnwindAssemblyx86Tests" in directory clang-4.0/tools/lldb/unittests/UnwindAssembly/x86
      linked by target "UtilityTests" in directory clang-4.0/tools/lldb/unittests/Utility

  -- 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
  build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
  build-4.0/bootstrap/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:11: error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic]
     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)
  {
    (void)argv;
  #ifndef backtrace
    return ((int*)(&backtrace))[argc];
  #else
    (void)argc;
    return 0;
  #endif
  }



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,


Andy




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170428/000a961f/attachment.html>


More information about the lldb-dev mailing list