[lldb-dev] Linux build - link errors creating the driver
Joel Dillon
joelrdillon at gmail.com
Sun Oct 23 07:42:52 PDT 2011
Sure, here you go.
On Sun, Oct 23, 2011 at 3:15 AM, Dragos Tatulea <dragos.tatulea at gmail.com>wrote:
> Hi,
>
> On Sat, Oct 22, 2011 at 11:20 PM, Joel Dillon <joelrdillon at gmail.com>wrote:
>
>> Hi,
>>
>> I've just grabbed lldb and the specified version of llvm and clang from
>> svn according to the instructions on the website. I had to make some changes
>> to get things to build (a missing std:: for ptrdiff_t in Core/Stream.cpp,
>> stddef.h needs to be included for RegisterContextDarwin_i386.cpp and
>> _x86_64.cpp, and for some reason I had to manually add -lrt and the python
>> link stuff to LIBS in Makefile.config to get liblldb to link). However, now
>> it's falling over at the final stage of linking the driver, and I'm not sure
>> why.
>
> I'm compiling on Kubuntu 11.10 64-bit, gcc 4.6.1, if that's relevant.
>> Any other intrepid Linux-lldb users had this problem? Log is thus -
>>
>> Could you send a patch for the ptrdiff and stddef.h stuff please? I didn't
> have to include -lrt (was already there) BUT I had the same error the first
> time I tried to build. The second time worked out ok... Hope it's not a bug
> in the build sytem.
>
> Thanks,
> Dragos
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20111023/a8597b8d/attachment.html>
-------------- next part --------------
Index: source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
===================================================================
--- source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp (revision 142727)
+++ source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp (working copy)
@@ -9,6 +9,8 @@
// C Includes
+#include <stddef.h>
+
// C++ Includes
// Other libraries and framework includes
#include "lldb/Core/DataBufferHeap.h"
@@ -18,6 +20,7 @@
#include "lldb/Core/Scalar.h"
#include "lldb/Host/Endian.h"
+
// Project includes
#include "RegisterContextDarwin_i386.h"
Index: source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
===================================================================
--- source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp (revision 142727)
+++ source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp (working copy)
@@ -10,6 +10,7 @@
// C Includes
#include <stdarg.h>
+#include <stddef.h>
// C++ Includes
// Other libraries and framework includes
Index: source/Core/Stream.cpp
===================================================================
--- source/Core/Stream.cpp (revision 142727)
+++ source/Core/Stream.cpp (working copy)
@@ -282,7 +282,7 @@
Stream&
Stream::operator<< (void *p)
{
- Printf ("0x%.*tx", (int)sizeof(void*) * 2, (ptrdiff_t)p);
+ Printf ("0x%.*tx", (int)sizeof(void*) * 2, (std::ptrdiff_t)p);
return *this;
}
More information about the lldb-dev
mailing list