Bug#886366: linux-headers-4.15.0-rc5-amd64: missing tools/objtool in /lib/modules/foo/build breaks DKMS modules builds

Luca Boccassi bluca at debian.org
Thu Jan 4 22:44:45 UTC 2018

Package: src:linux
Version: 4.15~rc5-1~exp1
Severity: important

Dear Maintainer,

The new tools/ directory is currently symlinked from linux-kbuild-4.15
into linux-headers-common-4.15.0-rc5 (directory: /usr/src/linux-
headers-4.15.0-rc5-common/tools ) but not into linux-headers-4.15.0-
rc5-amd64 like scripts/ is.

This means objtool is available under /lib/modules/4.15.0-rc5-
amd64/source but not under /lib/modules/4.15.0-rc5-amd64/build which
means kernel modules builds via DKMS fail with:

/bin/sh: 1: ./tools/objtool/objtool: not found

Manually adding the symlink fixes the problem.

If this is indeed the right thing to do, I guess the dh_link that was
added for the -common stanza in debian/rules.real in commit
392435021b7fbec should also be added for the _$(ARCH one):

--- a/debian/rules.real
+++ b/debian/rules.real
@@ -348,6 +348,7 @@ install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(STAMPS_DIR)/build_$(ARCH)_$(
 	@echo '	@:' >> $(DIR)/Makefile
 	dh_link /usr/lib/$(PACKAGE_NAME_KBUILD)/scripts $(BASE_DIR)/scripts
+	dh_link /usr/lib/$(PACKAGE_NAME_KBUILD)/tools $(BASE_DIR)/tools
 	mkdir -p $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)
 	ln -s /usr/src/$(PACKAGE_NAME) $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/build

Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-nvidia-devel/attachments/20180104/5e5754a0/attachment.sig>

More information about the pkg-nvidia-devel mailing list