[lldb-dev] Hello, I have Questions, about lldb:(
Charles Davis
cdavis5x at gmail.com
Sun Oct 14 12:29:47 PDT 2012
On Oct 14, 2012, at 11:21 AM, Malea, Daniel wrote:
> The instructions posted on the build page are slightly out-of-date. LLDB trunk builds against LLVM and Clang trunk, and not a pinned revision as the docs mention. If you’re using older revisions, you should update all your working copies to trunk.
>
> The error you’re seeing with importing _lldb is due to a problem in one of the Makefiles. Python requires an _lldb.so symlink (pointing to liblldb.so) on the PYTHONPATH in order for the import to work correctly. I am working on a cross-platform way to generate it with the Makefiles,
I have a patch for you right now.
I originally wrote this patch so I could build with Makefiles on Darwin. (For the record, I have commit access, so I can commit this once approved).
I'll note that with this change, the liblldbInterpreter.a Makefile is *radically* simpler.
Summary of changes:
- Stop assuming that "Darwin" means "being built by Xcode". There's a slight chance this could break Xcode builds, but I carefully reworked the argument parsing in the scripts so that Xcode builds don't need to change. Apple devs: if this patch breaks Xcode builds, feel free to scream loudly at me so I can go fix it. ;)
- Use the finish script to install, too.
- Make swig auto-generate dependencies if DISABLE_AUTO_DEPENDENCIES is off (like before).
- Ask python where to put site-specific files using the distutils.sysconfig.get_python_lib() function. (Tests' Makefile was changed to do this, too.) This is what you're "supposed" to do, but I avoided doing that when I first wrote the Makefile because I thought that not all python installs would have it. I hope I was wrong...
- Fix out-of-tree builds. For out-of-tree builds, you have to pass to the edit-swig-python-wrapper-file.py script the directory where swig put the LLDBWrapPython.cpp file, or it won't be able to find it. The Makefiles were doing this before Filipe went in and started this.
- Completely eliminate duplication of logic between Makefile and Xcode builds. Radically simplify the Interpreter Makefile; now there aren't two versions of the same rule (one of which wasn't even being maintained!).
I've tested this patch with several self-host builds of Clang, and I have had no trouble building, installing, or running LLDB.
Chip
>
>
> Best of luck,
> Dan
>
> From: lldb-dev-bounces at cs.uiuc.edu [mailto:lldb-dev-bounces at cs.uiuc.edu] On Behalf Of Kyung su Kim
> Sent: Saturday, October 13, 2012 6:20 PM
> To: lldb-dev at cs.uiuc.edu
> Subject: [lldb-dev] Hello, I have Questions, about lldb:(
>
> Hello
>
> I'm a university student in korea
>
> I have a project in my school, that related dissembleing arm machine code
>
> ( I'll use python script language to my project)
>
> so I found this llvm project and i tried to build llvm
>
> but I faced some problems..
>
> (my compilation enviroment is Ubuntu Linux 10.x )
>
> I saw http://lldb.llvm.org/build.html , and worked step by step
>
> first problem is that the llvm_revision doesn't update,..
>
> typed as I saw in manual "svn update -r 127682" ,doesn't work properly..
>
> the result is as below..
> -----------------------------------------------
>
> root at kaspyx:~/llvm/tools# grep -m 1 llvm_revision lldb/scripts/build-llvm.pl
> our $llvm_revision = "127600";
>
> ----------------------------------------------
> it looks some guess.. but i wonder why llvm_revision version doesn't update is..
>
> why the revision is 127600?? i want update to 127682..
>
> it's my guess...
>
> most of all, lldb doesn't work..
>
> i compiled llvm, lldb, clang... step by step, referenced manual..
>
> but lldb.py doesn't work..
>
> There are compiled binaries in my directory.. ( like "lldb", "lldb.py" ..etc)
>
> but When I typed for using lldb python library, I saw error strings
>
> -----------------------------------------
>
> root at kaspyx:~/build2/Debug+Asserts/bin# python lldb.py
>
> Traceback (most recent call last):
> File "lldb.py", line 25, in <module>
> _lldb = swig_import_helper()
> File "lldb.py", line 17, in swig_import_helper
> import _lldb
> ImportError: No module named _lldb
>
> -----------------------------------------
>
> I couldn't find _lldb module.. ,
>
> problems are looks relate llvm_revision.
>
> I don't know what should i do..
>
> am i compiled properly??
>
> thanks ....
>
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20121014/13cdc526/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: big-makefile-swig-cleanup.patch
Type: application/octet-stream
Size: 19349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20121014/13cdc526/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20121014/13cdc526/attachment-0001.html>
More information about the lldb-dev
mailing list