build failure: No rule to make target '/usr/include/linux/limits.h'

Szabolcs Nagy szabolcs.nagy@arm.com
Tue Sep 5 18:24:00 GMT 2017


suppose i have directory structure

D/glibc - source repo
D/build - from where i run the configure script and then make
D/include - old libc headers lying around which should not affect anything

then when i run make i get
....
make  subdir=iconv -C iconv ..=../ subdir_lib
make[2]: Entering directory 'D/glibc/iconv'
/usr/bin/install -c -m 644 D/build/../include/linux/limits.h /usr/include/linux/limits.h
/usr/bin/install: cannot remove '/usr/include/linux/limits.h': Permission denied
/usr/bin/install -c -m 644 D/build/../include/linux/limits.h /usr/include/linux/limits.h
/usr/bin/install: cannot remove '/usr/include/linux/limits.h': Permission denied
make[2]: *** No rule to make target '/usr/include/linux/limits.h', needed by 'D/build/iconv/iconv_open.o'.  Stop.
make[2]: Leaving directory 'D/glibc/iconv'
Makefile:215: recipe for target 'iconv/subdir_lib' failed
make[1]: *** [iconv/subdir_lib] Error 2
make[1]: Leaving directory 'D/glibc'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2

the exact failure depends on the contents of D/include,
if i remove that directory then the build succeeds.

somehow glibc managed to include stuff from outside of
the source or build tree.. i don't immediately see why.

anyway it would be nice if glibc *never* tried to overwrite
headers in /usr/include/* while i'm running make.



More information about the Libc-alpha mailing list