[llvm-bugs] [Bug 43352] New: Undefined symbols when using boost statecharts
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 18 07:26:01 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43352
Bug ID: 43352
Summary: Undefined symbols when using boost statecharts
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: COFF
Assignee: unassignedbugs at nondot.org
Reporter: brian.j.cody at gmail.com
CC: llvm-bugs at lists.llvm.org
Version 9.0.0 RC5
The same link works in ld. You can use the boost statechart as such:
namespace my_namespace
{
struct evt_done_state: boost::statechart::event<evt_done_state> {};
}
lld-link: error: undefined symbol:
__ZN5boost10statechart6detail10no_contextIN12my_namespace14evt_done_stateEE11no_funct>>>
referenced by (... file path)
Looking at the boost source code, there is declared, undefined function. This
was taken from boost 1.63.0, but the specific code is common for older and
newer versions:
boost\statechart\detail\reaction_dispatcher.hpp:33
template< class Event >
struct no_context
{
void no_function( const Event & ); // <------
};
The method is not called or referenced, and shows up as 'U' in nm. I suspect ld
drops the unused, undefined symbol.
We're working around this by changing the offending line to:
void no_function( const Event & ) {}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190918/6ba4aa0a/attachment.html>
More information about the llvm-bugs
mailing list