Skip to content

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Aug 28, 2025

Fixes linker error:

/usr/bin/ld: /tmp/lto-llvm-013f16.o: in function `lldb_private::JSONTransport<lldb_protocol::mcp::Request, lldb_protocol::mcp::Response, lldb_protocol::mcp::Notification>::OnRead(lldb_private::MainLoopBase&, lldb_private::Transport<lldb_protocol::mcp::Request, lldb_protocol::mcp::Response, lldb_protocol::mcp::Notification>::MessageHandler&)':
/usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/unique_ptr.h:1085:(.text._ZN12lldb_private13JSONTransportIN13lldb_protocol3mcp7RequestENS2_8ResponseENS2_12NotificationEE6OnReadERNS_12MainLoopBaseERNS_9TransportIS3_S4_S5_E14MessageHandlerE+0x7fc): undefined reference to `lldb_private::TransportUnhandledContentsError::TransportUnhandledContentsError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'

Fixes linker error:

```
/usr/bin/ld: /tmp/lto-llvm-013f16.o: in function `lldb_private::JSONTransport<lldb_protocol::mcp::Request, lldb_protocol::mcp::Response, lldb_protocol::mcp::Notification>::OnRead(lldb_private::MainLoopBase&, lldb_private::Transport<lldb_protocol::mcp::Request, lldb_protocol::mcp::Response, lldb_protocol::mcp::Notification>::MessageHandler&)':
/usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/unique_ptr.h:1085:(.text._ZN12lldb_private13JSONTransportIN13lldb_protocol3mcp7RequestENS2_8ResponseENS2_12NotificationEE6OnReadERNS_12MainLoopBaseERNS_9TransportIS3_S4_S5_E14MessageHandlerE+0x7fc): undefined reference to `lldb_private::TransportUnhandledContentsError::TransportUnhandledContentsError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
```
@llvmbot
Copy link
Member

llvmbot commented Aug 28, 2025

@llvm/pr-subscribers-lldb

Author: Nikita Popov (nikic)

Changes

Fixes linker error:

/usr/bin/ld: /tmp/lto-llvm-013f16.o: in function `lldb_private::JSONTransport&lt;lldb_protocol::mcp::Request, lldb_protocol::mcp::Response, lldb_protocol::mcp::Notification&gt;::OnRead(lldb_private::MainLoopBase&amp;, lldb_private::Transport&lt;lldb_protocol::mcp::Request, lldb_protocol::mcp::Response, lldb_protocol::mcp::Notification&gt;::MessageHandler&amp;)':
/usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/bits/unique_ptr.h:1085:(.text._ZN12lldb_private13JSONTransportIN13lldb_protocol3mcp7RequestENS2_8ResponseENS2_12NotificationEE6OnReadERNS_12MainLoopBaseERNS_9TransportIS3_S4_S5_E14MessageHandlerE+0x7fc): undefined reference to `lldb_private::TransportUnhandledContentsError::TransportUnhandledContentsError(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;)'

Full diff: https://github.com/llvm/llvm-project/pull/155811.diff

1 Files Affected:

  • (modified) lldb/source/Protocol/MCP/CMakeLists.txt (+1)
diff --git a/lldb/source/Protocol/MCP/CMakeLists.txt b/lldb/source/Protocol/MCP/CMakeLists.txt
index 23da62085537e..5258cb61a7d10 100644
--- a/lldb/source/Protocol/MCP/CMakeLists.txt
+++ b/lldb/source/Protocol/MCP/CMakeLists.txt
@@ -8,6 +8,7 @@ add_lldb_library(lldbProtocolMCP NO_PLUGIN_DEPENDENCIES
   LINK_COMPONENTS
     Support
   LINK_LIBS
+    lldbHost
     lldbUtility
 )
 

@nikic nikic merged commit a4ac04d into llvm:main Aug 28, 2025
11 checks passed
@nikic nikic deleted the lldb-mcp-dep branch August 28, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants