jupyter-xeus / xeus-python-wheel

Building a PyPI wheel for xeus-python
BSD 3-Clause "New" or "Revised" License
12 stars 13 forks source link

Libuuid destdir #8

Closed SylvainCorlay closed 4 years ago

SylvainCorlay commented 4 years ago

In the current state of master, trying to build locally gives

make[4]: Leaving directory '/home/sylvain/dev/jupyter-xeus/xeus-python-wheel/_skbuild/linux-x86_64-3.7/cmake-build/libuuid-download/libuuid-src'
 /bin/mkdir -p '/usr/share/bash-completion/completions'
 /usr/bin/install -c -m 644 bash-completion/uuidgen '/usr/share/bash-completion/completions'
/usr/bin/install: cannot remove '/usr/share/bash-completion/completions/uuidgen': Permission denied

That is because on linux, although having a --prefix set at the configure stage, tries to install to a system path.

Cf https://github.com/spack/spack/issues/7632 by @ax3l..

The fix appears to be setting prefix= and DESTDIR= at make install time.

  1. Setting both these values to the full path of the installation prefix results in the library being installed at the right location but headers being installed in Full-prefix/Full-prefix/include/uuid...

  2. Setting only prefix does not fix the issue

  3. Setting only DESTDIR almost does it, but somehow, the library is installed in PREFIX/usr/lib, i.e. a usr is inserted somehow.

4.This sets DESTDIR to the installation prefix and prefix to an empty string.

SylvainCorlay commented 4 years ago

I would like to have a cleaner fix.