support/cmake_install.cmake ignores DESTDIR
- Dominant language
- C++
- Stars
- 8.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
There's at least one installed path within the `install` target that is ignoring `DESTDIR`:
```
git clean -ffxd \
&& git fetch --all \
&& git pull --rebase \
&& git describe --long --always --dirty \
&& cmake -B build . \
&& make -C build -j$(nproc) \
&& DESTDIR="$(mktemp -dt DESTDIR.XXXXXX)" make -C build install
Removing build/
Already up to date.
b9791c88
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
...
Traceback (most recent call last):
File "/home/luser/retdec/support/install-share.py", line 93, in
main()
File "/home/luser/retdec/support/install-share.py", line 47, in main
os.makedirs(support_dir, exist_ok=True)
File "", line 215, in makedirs
File "", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/usr/local/share/retdec'
CMake Error at support/cmake_install.cmake:77 (message):
RetDec share directory installation FAILED
Call Stack (most recent call first):
cmake_install.cmake:71 (include)
make: *** [Makefile:100: install] Error 1
```
Contributor guide
No contributing guide indexed for this repository
Research direction
The failing install path is in support/cmake_install.cmake, which invokes support/install-share.py; start by tracing the install target with DESTDIR set using the command shown. Done means the share directory is installed beneath DESTDIR and the install target completes without the permission error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100