Hi Chip,

You made my day with the build system patch! It looks good to me, however, I’m 
not an expert on the SWIG scripts..so maybe someone else who is more familiar 
with the old source/Interpreter/Makefile can take a look too?


After applying it, I noticed a small problem on Linux with the generation of 
the _lldb.so symlink. On Ubuntu 11.10 (with GNU Make 3.81) I did a clean 
out-of-tree build and ended up with the following files:

[OK]     build/Debug+Asserts/lib/liblldb.so
[BROKEN] build/Debug+Asserts/lib/python2.7/site-packages/lldb/_lldb.so --> 
../../liblldb.so

To fix the problem, either the symlink needs to point 3 (instead of 2) 
directories up, or the it needs to be located one directory up.

However, to keep PYTHONPATH simple, I recommend the latter option, since the 
former would require adding two directories to the PYTHONPATH (“site-packages” 
as well as “lldb”). I am attaching a patch (can be applied on top of yours) 
that places the _lldb.so symlink in “site-packages” instead of “lldb”.

Otherwise, your patch looks great. I can confirm no test regressions on Linux 
(but a couple of fixes!). I tried it out on Mac OS X too, and noticed no build 
problems on 10.8.

Cheers,
Dan


From: Charles Davis [mailto:[email protected]]
Sent: Sunday, October 14, 2012 3:30 PM
To: Malea, Daniel
Cc: Kyung su Kim; [email protected]
Subject: Re: [lldb-dev] Hello, I have Questions, about lldb:(


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: [email protected]<mailto:[email protected]> 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
 On Behalf Of Kyung su Kim
Sent: Saturday, October 13, 2012 6:20 PM
To: [email protected]<mailto:[email protected]>
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@kaspyx:~/llvm/tools# grep -m 1 llvm_revision 
lldb/scripts/build-llvm.pl<http://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@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
[email protected]<mailto:[email protected]>
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Attachment: fixup_lldb_symlink.patch
Description: fixup_lldb_symlink.patch

_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to