[lldb-dev] Intended install location for python scripts

Todd Fiala tfiala at google.com
Tue Dec 3 09:46:09 PST 2013


Hi all,

I started digging into the 'make install' python script installation issue
listed on another thread.  Here's the ticket for it:

http://llvm.org/bugs/show_bug.cgi?id=18124

I've added some comments to the bug.  My initial digging leads to a few
questions:

1. Where do we expect a configure/make/make install to place the python
scripts?  I was under the impression the scripts should be installed in the
same directory tree implied by the configure --prefix arg, which is also
what a `lldb -P` reports.  However, what I'm finding is that the 'make
install' step is trying to install the python scripts into the python
interpreter's dist-packages location.  I'm getting these failures on
install because I'm not doing a 'sudo' on my make install.

    llvm[4]: Installing Debug+Asserts LLDB python modules
    mkdir: cannot create directory `/usr/lib/python2.7/dist-packages/lldb':
Permission denied
    Error: Unable to find or create /usr/lib/python2.7/dist-packages/lldb
    make[4]: Leaving directory
`/usr/local/google/home/tfiala/llvm/work/build-debug/tools/lldb/source/Interpreter'

Do we want the python scripts installing into the python executable's
dist-packages or the location reported by lldb -P?  My first stab would be
it should go in the installation prefix paths as I would not expect any
code to be installed outside of the prefix and, possibly, require a sudo
when I'm trying to do everything locally without elevated privileges.

2. Should 'make install' fail if we fail to copy over python files? My
first take is that a failure to install the scripts should qualify as an
all-out failure and cause make to fail (i.e. fail early, fail loudly);
otherwise, we can get quite a bit past the root cause of scripting-related
failures without realizing what's broken.

Any opinions on this?  My straw-man answers are:

1. Install into the tree implied by configure --prefix, not into the python
dist-packages dir.  (A close second would be to specify a new configure
path variable so the user can configure, possibly adjusting the output of
lldb -P to match).

2. Change makefiles so that failure to copy scripts fails the install.

I'll fix up whatever we decide here if it requires a change.

Thanks!

Sincerely,
Todd Fiala
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20131203/ca0886d2/attachment.html>


More information about the lldb-dev mailing list