make install is currently broken - does not respect prefix.

Hello,

I had to revert commit r196413. It broke the make install.

Full log:
http://llvm-jenkins.debian.net/job/llvm-toolchain-binaries/architecture=amd64,distribution=unstable/418/

Summary:
"/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/tools/lldb/source/Interpreter/../../scripts/finish-swig-wrapper-classes.sh" "/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/tools/lldb/source/Interpreter/../.." "/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/build-llvm/tools/lldb/source/Interpreter" "/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/build-llvm/tools/lldb/source/Interpreter" "/usr/lib/llvm-3.5" -m
mkdir: cannot create directory '/usr/lib/llvm-3.5': Permission denied
Error: Unable to find or create /usr/lib/llvm-3.5/lib/python2.7/site-packages/lldb
/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/tools/lldb/scripts/Python/finish-swig-Python-LLDB.sh failed with exit code 1
make[6]: *** [install-local] Error 1
make[6]: Leaving directory `/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/build-llvm/tools/lldb/source/Interpreter'
make[5]: *** [install] Error 1

here, it should install in
/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/debian/tmp/usr/lib/llvm-3.5/lib/python2.7/site-packages/

Sylvestre

Hi Sylvestre,

What in the configure process is telling it to append this part:

/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/debian/tmp
to the install prefix?  I suspect I may just need to have a typically-empty-but-not-in-your-case variable to the front part of the install location.  I was using $prefix to get the --prefix={something} part.

As a side note, part of that change was to fail when the python packages don’t actually install rather than just failing silently. You might want to double check whether the lldb package is actually going where you want in this case - while everything may have been just fine before for your setup, it also could be the case that they python packages are not installing and you just aren’t getting an error due to the silent failure.

Actually, I am adding this:

  --prefix=/usr/lib/llvm-3.5
to the configure
and then, DESTDIR with the make install
/usr/bin/make -C build-llvm VERBOSE=1 install DESTDIR=/tmp/buildd/llvm-toolchain-snapshot-3.5~svn196491/debian/tmp/

Usually, adding $(DESTDIR) in the path fixes this kind of issues.

Sorry for not being clear in my initial email,
S

Okay thanks - I’ll fix up the change to handle that as well and post up the adjusted patch after I validate your scenario.

Thanks. Until you get the +w permission, don't hesitate to send me the
patch.

Sounds good, thanks Sylvestre. Hope to have that shortly here.