Page MenuHomeSolus

Kernel Headers Don't Package Required Tools
Closed, ResolvedPublic


In order to build modules, Solus ships with the required headers in /lib/modules/$(uname -r)/build, just like every other distro.

However, in order to build modules on recent kernels, the headers must also ship some kernel-tree-specific build-time tools, such as objtool.

You'll observe this when trying to build an out of tree module. Everything goes well, except you have this message in your output: Makefile:944: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". If you then follow the advice and install libelf-devel, the build entirely fails with something along the lines of make[2]: *** No rule to make target....

You can "fix" this error with this hack/workaround: sudo ln -s /bin/true /lib/modules/$(uname -r)/build/tools/objtool/objtool. This convinces the makefile that objtool was there and did something, and so the build succeeds again.

However, that's obviously a terrible way to do it, and really Solus' packages should instead be including these essential build-time tools as part of the /lib/modules headers that it ships. Shipping objtool&friends with those headers is what all other distros do too.

Event Timeline

zx2c4 created this task.Jan 22 2018, 4:06 PM
Herald removed ikey as the assignee of this task. · View Herald TranscriptJan 22 2018, 4:06 PM
Herald added a subscriber: ikey.
anaknaga added a subscriber: anaknaga.
pokgak added a subscriber: pokgak.Jan 22 2018, 5:50 PM
ikey triaged this task as Unbreak Now! priority.

Ikey done a stoopid. :P

Herdo awarded a token.Jan 23 2018, 7:35 AM
Herdo added a subscriber: Herdo.Jan 24 2018, 9:22 PM
ikey changed the task status from Open to In Progress.Jan 26 2018, 5:36 PM
ikey closed this task as Resolved.Jan 26 2018, 8:06 PM