[lldb-dev] [Bug 20689] New: LLDB fails to compile from command line

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 16 22:12:45 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20689

            Bug ID: 20689
           Summary: LLDB fails to compile from command line
           Product: lldb
           Version: 3.4
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: noloader at gmail.com
    Classification: Unclassified

This is the result of a Stack Overflow question:
http://stackoverflow.com/questions/24923650/undefined-symbols-systemruntimemacosxinitialize-and-systemruntimemacosxtermi.

I'm using 3.4.2 releases from their respective downloads. Attempting to build
LLDB along with LLVM, Clang, Compiler_RT and Extras results in a compile
failure. LLVM, Clang, Compiler_RT and Extras are fine alone. The problem arises
when LLDB is added to the process.

The issue may (or may not) exist in other versions.

The recipe to automate fetching, untarring and building is attached. And the
missing Makefile is attached.

*****

There's a few issues with the build, but the first issue encountered is:

...
llvm[3]: Linking Release+Asserts Shared Library liblldb.dylib
Undefined symbols for architecture x86_64:
  "SystemRuntimeMacOSX::Initialize()", referenced from:
      lldb_private::Initialize() in liblldbInitAndLog.a(lldb.o)
  "SystemRuntimeMacOSX::Terminate()", referenced from:
      lldb_private::Terminate() in liblldbInitAndLog.a(lldb.o)
ld: symbol(s) not found for architecture x86_64

*****

First issue. Credit goes to Matt on Stack Overflow. Matt found
https://github.com/llvm-mirror/lldb/commit/7a53199e140843235d2bd2b12182ceb764419c8a.
It appears a Makefile is missing, and once found, the Makefile needs to be
wired into the build:

    cp Missing-Makefile
llvm/tools/lldb/source/Plugins/SystemRuntime/MacOSX/Makefile
    sed -i '' "s|lldbPluginProcessMachCore.a|lldbPluginSystemRuntimeMacOSX.a
lldbPluginProcessMachCore.a|" llvm/tools/lldb/lib/Makefile

*****

After fixing the first issue, I encountered:

...
llvm[4]: Building Release+Asserts Archive Library liblldbUtility.a
make[3]: *** No rule to make target
`/Users/jwalton/Clang-3.4.2/build/Release+Asserts/lib/liblldbPluginSystemRuntimeMacOSX.a',
needed by `/Users/jwalton/Clang-3.4.2/build/Release+Asserts/lib/liblldb.dylib'.
 Stop.

*****

Second issue. Credit goes to Cos on Stack Overflow. It appears another Makefile
needs to be patched, and the SystemRuntime/MacOSX directory needs to be
wire-into the Makefile:

    sed -i '' "s|Process/mach-core|Process/mach-core SystemRuntime/MacOSX|"
llvm/tools/lldb/source/Plugins/Makefile

*****

Once the two solutions by Matt and Cos are incorporated, the build proceeds and
completes successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140817/f83784e2/attachment.html>


More information about the lldb-dev mailing list