On Tue, Feb 26, 2019 at 1:54 AM wrote: > On Mon, 25 Feb 2019 06:43:39 -0500, YU Bo said: > > > But, my "question" is: when i test some program which needs kernel > headers, > > where to install those headers file? > > In Documention/kbuild/headers_install.rst, i learn it : > > make headers_install INSTALL_HDR_PATH=/usr > > In my case, Is it ok to do that?I do not think it will work. > > You need to put the headers into a directory that will be accessible to > your > "program that needs kernel headers" at build time. Hint: gcc has a "-I" > option > for a reason, and CFLAGS is an actual thing for a reason.... > > Note that in general, most programs *won't* need the new kernel headers, > because glibc (or musl, or whatever your libc is) will be insulating you > from > the actual syscall interface anyhow. > > Also, dropping the headers into /usr/include is dangerous, as the next time > you apply software updates, they could overlay your version of the headers > with the distro's version, which will cause lots of debugging fun the next > time > you rebuild your program and it builds against old headers. If you're > lucky, > the build will fail. If you're unlucky, the program will build but fail > in subtle > ways at runtime.... > Thank you for reply.I do not kow to explain the way,but i tried it. In my case, ```bash # cd ~/src/kernel-dev/lib/modules/5.0.0-rc8/build make headers_install ``` I think the way, which can effect VM(i logged in). Thank you :)