Describe the bug
Some targets are installed into $(prefix) during the build phase
While building Nix from the master branch, some targets like libnixutil.so are installed into $(prefix) during the build phase. If the build user doesn't have permission to write into $(prefix) the build fails.
It doesn't happen on the 2.3-maintenance branch, or if the build is configured with the --disable-doc-gen option on the master branch.
Steps To Reproduce
- Checkout Nix master branch
./bootstrap.sh
./configure --prefix=/usr
make
GEN Makefile.config
GEN src/libexpr/parser-tab.cc
GEN src/libexpr/lexer-tab.cc
CXX src/build-remote/build-remote.o
CXX src/nix-build/nix-build.o
CXX src/nix-channel/nix-channel.o
CXX src/nix-collect-garbage/nix-collect-garbage.o
CXX src/nix-copy-closure/nix-copy-closure.o
...
CXX src/libutil/util.o
CXX src/libutil/xml-writer.o
LD /usr/lib64/libnixutil.so
/opt/rh/gcc-toolset-9/root/usr/bin/ld: cannot open output file /usr/lib64/libnixutil.so: Permission denied
collect2: error: ld returned 1 exit status
make: *** [mk/lib.mk:117: /usr/lib64/libnixutil.so] Error 1
Expected behavior
Targets aren't installed $(prefix) during the build
Describe the bug
Some targets are installed into
$(prefix)during the build phaseWhile building Nix from the master branch, some targets like
libnixutil.soare installed into$(prefix)during the build phase. If the build user doesn't have permission to write into$(prefix)the build fails.It doesn't happen on the 2.3-maintenance branch, or if the build is configured with the
--disable-doc-genoption on the master branch.Steps To Reproduce
./bootstrap.sh./configure --prefix=/usrmakeExpected behavior
Targets aren't installed
$(prefix)during the build