[llvm-bugs] [Bug 41214] New: Undefined reference when I link libc++

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 23 23:43:48 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41214

            Bug ID: 41214
           Summary: Undefined reference when I link libc++
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: praveenvelliengiri at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

Hi,

When I compile this example
[https://reviews.llvm.org/diffusion/L/browse/llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp
]from the trunk, the linking fails.

Command used to compile : 

clang++ -stdlib=libc++ -fuse-ld=lld  howto.cpp `llvm-config --cxxflags
--ldflags --libs`

the linker throws up 

ld.lld: error: undefined symbol:
llvm::EngineBuilder::EngineBuilder(std::__1::unique_ptr<llvm::Module,
std::__1::default_delete<llvm::Module> >)


But when I link libstdc++ instead of libc++, error was gone. 

Is this a known bug? 

Is there any workaround for this? 

My clang++ -v shows:
clang version 9.0.0,
Target: x86_64-unknown-linux-gnu.

-- 
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/20190324/895379ce/attachment.html>


More information about the llvm-bugs mailing list