[cfe-dev] Serious problem building LLDB to go with Clang 3.5 on Ubuntu 12.04

Fletcher, John P j.p.fletcher at aston.ac.uk
Tue Dec 31 10:25:09 PST 2013


I have worked through the problem and I have built a copy of libc++ with libc++abi, all components built with clang.  I have tested that and can use it to build programs.

I have used the new version to build LLVM, clang and LLDB and I still get a failure to build liblldb.so at what I assume is the end or near the end.

The last part of the (very long) error message is like this:
----
/home/fletcher/LLVM/llvm-3.5.svn/build/Release+Asserts/lib/liblldbPluginProcessPOSIX.a(ProcessMessage.o): In function `std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(unsigned long)':
/home/fletcher/LLVM/llvm-3.5.svn/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessMessage.cpp:(.text._ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm[_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm]+0x11a): undefined reference to `std::uncaught_exception()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/home/fletcher/LLVM/llvm-3.5.svn/build/Release+Asserts/lib/liblldb.so] Error 1
make[3]: Leaving directory `/home/fletcher/LLVM/llvm-3.5.svn/build/tools/lldb/lib'
----

I am seeing std::__1 

This is discussed here:
http://stackoverflow.com/questions/12542971/using-libstdc-compiled-libraries-with-clang-stdlib-libc

Has anyone else had this problem?

Thanks

John



________________________________________
From: cfe-dev-bounces at cs.uiuc.edu [cfe-dev-bounces at cs.uiuc.edu] on behalf of Fletcher, John P [j.p.fletcher at aston.ac.uk]
Sent: 31 December 2013 14:04
To: "C. Bergström"
Cc: clang-dev Developers
Subject: Re: [cfe-dev] Serious problem building LLDB to go with Clang 3.5 on Ubuntu 12.04

Sorry, it was -lc++abi which I took out, not -lc++

John
________________________________________
From: Fletcher, John P
Sent: 31 December 2013 14:01
To: "C. Bergström"
Cc: clang-dev Developers
Subject: RE: [cfe-dev] Serious problem building LLDB to go with Clang 3.5 on Ubuntu 12.04

If I take out the libc++ from my LDPATH

I get this when I run ./config.  It is compiling conftest.c

/home/fletcher/LLVM/libcxxDec2013/libcxx/lib/libc++.so: undefined reference to `__cxa_rethrow_primary_exception'
/home/fletcher/LLVM/libcxxDec2013/libcxx/lib/libc++.so: undefined reference to `__cxa_current_primary_exception'
/home/fletcher/LLVM/libcxxDec2013/libcxx/lib/libc++.so: undefined reference to `__cxa_increment_exception_refcount'
/home/fletcher/LLVM/libcxxDec2013/libcxx/lib/libc++.so: undefined reference to `__cxa_decrement_exception_refcount'

I am wondering if I should rebuild libc++ with a consistent use of libc++abi rather than libcxxrt.

One of the problems for a someone who is mainly a user is working out exactly how to get these things built.

Thank you for your help.

John

________________________________________
From: "C. Bergström" [cbergstrom at pathscale.com]
Sent: 31 December 2013 13:03
To: Fletcher, John P
Cc: clang-dev Developers
Subject: Re: [cfe-dev] Serious problem building LLDB to go with Clang 3.5 on Ubuntu 12.04

On 12/31/13 07:57 PM, Fletcher, John P wrote:
> Thank you for the quick reply.
>
> My libc++ was built with libcxxrt and I did supply the unwind headers.  When I tried to use it  to build LLDB I had undefined references to libc++abi.
I think you were using the unwind from libc++abi.. and not this -
https://github.com/pathscale/libunwind. Please let me know exactly what
undefined references you hit



_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev






More information about the cfe-dev mailing list