<div dir="ltr">Excellent. Thanks, Greg!<div><br></div><div>I'll get a patch together following that approach unless anything further develops here.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Dec 3, 2013 at 10:00 AM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On Dec 3, 2013, at 9:46 AM, Todd Fiala <<a href="mailto:tfiala@google.com">tfiala@google.com</a>> wrote:<br>
<br>
> Hi all,<br>
><br>
> I started digging into the 'make install' python script installation issue listed on another thread. Here's the ticket for it:<br>
><br>
> <a href="http://llvm.org/bugs/show_bug.cgi?id=18124" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=18124</a><br>
><br>
> I've added some comments to the bug. My initial digging leads to a few questions:<br>
><br>
> 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.<br>
><br>
> llvm[4]: Installing Debug+Asserts LLDB python modules<br>
> mkdir: cannot create directory `/usr/lib/python2.7/dist-packages/lldb': Permission denied<br>
> Error: Unable to find or create /usr/lib/python2.7/dist-packages/lldb<br>
> make[4]: Leaving directory `/usr/local/google/home/tfiala/llvm/work/build-debug/tools/lldb/source/Interpreter'<br>
><br>
> Do we want the python scripts installing into the python executable's dist-packages or the location reported by lldb -P?<br>
<br>
</div>Yes, this would allow multiple installs of LLDB to co-exist without stomping on the previous LLDB's python modules (which could be very different).<br>
<div class="im"><br>
> 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.<br>
><br>
> 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.<br>
><br>
> Any opinions on this? My straw-man answers are:<br>
><br>
> 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).<br>
<br>
</div>The --prefix path sounds right to be for coexistence.<br>
<div class="im"><br>
><br>
> 2. Change makefiles so that failure to copy scripts fails the install.<br>
<br>
</div>Agreed.<br>
<div class="im"><br>
><br>
> I'll fix up whatever we decide here if it requires a change.<br>
><br>
> Thanks!<br>
><br>
> Sincerely,<br>
> Todd Fiala<br>
</div>> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br>
</blockquote></div><br></div>