Bug 94969 - build fails because install-data-local doesn't follow $DESTDIR
Summary: build fails because install-data-local doesn't follow $DESTDIR
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Reported: 2016-04-16 15:04 UTC by LoneVVolf
Modified: 2016-04-26 21:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

workaround (523 bytes, patch)
2016-04-17 09:30 UTC, LoneVVolf
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description LoneVVolf 2016-04-16 15:04:36 UTC
When trying to build mesa master using --with-vulkan-drivers=intel (fakeroot environment),

make DESTDIR="${srcdir}/fakeinstall" install fails.

Making install in vulkan
make[3]: Entering directory '/home/panoramix/Documents/WIP/pkgbuilds/mesa-git/src/mesa/src/intel/vulkan'
make  install-recursive
make[4]: Entering directory '/home/panoramix/Documents/WIP/pkgbuilds/mesa-git/src/mesa/src/intel/vulkan'
Making install in .
make[5]: Entering directory '/home/panoramix/Documents/WIP/pkgbuilds/mesa-git/src/mesa/src/intel/vulkan'
make[6]: Entering directory '/home/panoramix/Documents/WIP/pkgbuilds/mesa-git/src/mesa/src/intel/vulkan'
/usr/bin/install -c -m 644 -D ./intel_icd.json /etc/vulkan/icd.d/intel_icd.json
/usr/bin/install: cannot create directory '/etc/vulkan': Permission denied
Makefile:1989: recipe for target 'install-data-local' failed
make[6]: *** [install-data-local] Error 1
make[6]: *** Waiting for unfinished jobs....

The culprit appears to be in src/intel/vulkan/Makefile.am :
$(INSTALL_DATA) -D $(srcdir)/intel_icd.json $(VULKAN_ICD_INSTALL_DIR)/intel_icd.json

I'm currently building with 
$(INSTALL_DATA) -D $(srcdir)/intel_icd.json $(DESTDIR)$(VULKAN_ICD_INSTALL_DIR)/intel_icd.json

Build is succesfull using that line, but i can't do runtime tests due to lack of needed hardware (only amd gpus here) .
Comment 1 LoneVVolf 2016-04-17 09:30:17 UTC
Created attachment 123006 [details] [review]

workaround to make vulkan-intel use DESTDIR for icddir location creation
Comment 2 Chad Versace 2016-04-26 21:00:48 UTC
Fixed by https://cgit.freedesktop.org/mesa/mesa/commit/?id=12cf08fcc3e3229ce8b4f8f9b3230388b16a7e62

author	Laurent Carlier <lordheavym@gmail.com>
commit	12cf08fcc3e3229ce8b4f8f9b3230388b16a7e62
anv: honor DESTDIR when installing icd file

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.