Bug 1574604 - Out-of-tree kernel modules fail to build on ppc64 with 4.16 kernel
Summary: Out-of-tree kernel modules fail to build on ppc64 with 4.16 kernel
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 27
Hardware: ppc64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2018-05-03 16:08 UTC by Matt K Light
Modified: 2018-05-14 17:55 UTC (History)
18 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-05-14 17:55:32 UTC


Attachments (Terms of Use)

Description Matt K Light 2018-05-03 16:08:48 UTC
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
Build Identifier: 

Compiling OpenAFS on Fedora27 ppc64 with 4.16 Linux kernel fails due to missing file module.lds
Compile had worked with 4.15 kernel
This bug is similar to https://bugzilla.redhat.com/show_bug.cgi?id=1531182

Here is the kernel change:
# diff -up /lib/modules/4.15.17-300.fc27.ppc64/build/arch/powerpc/Makefile /lib/modules/4.16.5-200.fc27.ppc64/build/arch/powerpc/Makefile 
--- /lib/modules/4.15.17-300.fc27.ppc64/build/arch/powerpc/Makefile	2018-03-15 12:59:04.000000000 -0500
+++ /lib/modules/4.16.5-200.fc27.ppc64/build/arch/powerpc/Makefile	2018-04-19 15:26:32.000000000 -0500
@@ -63,6 +63,7 @@ UTS_MACHINE := $(subst $(space),,$(machi
 ifdef CONFIG_PPC32
 KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
 else
+KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/powerpc/kernel/module.lds
 ifeq ($(call ld-ifversion, -ge, 225000000, y),y)
 # Have the linker provide sfpr if possible.
 # There is a corresponding test in arch/powerpc/lib/Makefile

kernel-devel package does not seem to contain arch/powerpc/kernel/module.lds
Copying module.lds from github allowed module compile to complete.

Reproducible: Always

Steps to Reproduce:
1.Install openafs pacakages after building from SRPMS on ppc64 system
2.dkms build openafs/1.6.22.2-1.fc27 -k 4.16.5-200.fc27.ppc64/ppc64
3.grep -B5 Error /var/lib/dkms/openafs/1.6.22.2-1.fc27/build/config.log
Actual Results:  
  ld -EB -m elf64ppc -r  -T ./scripts/module-common.lds -T ./arch/powerpc/kernel/module.lds --save-restore-funcs --build-id  -o /var/lib/dkms/openafs/1.6.22.2-1.fc27/build/conftest.dir/conftest.ko /var/lib/dkms/openafs/1.6.22.2-1.fc27/build/conftest.dir/conftest.o /var/lib/dkms/openafs/1.6.22.2-1.fc27/build/conftest.dir/conftest.mod.o ;  make -f ./arch/powerpc/Makefile.postlink /var/lib/dkms/openafs/1.6.22.2-1.fc27/build/conftest.dir/conftest.ko
make: Leaving directory '/usr/src/kernels/4.16.5-200.fc27.ppc64'
ld: cannot open linker script file ./arch/powerpc/kernel/module.lds: No such file or directory
make[1]: *** [scripts/Makefile.modpost:129: /var/lib/dkms/openafs/1.6.22.2-1.fc27/build/conftest.dir/conftest.ko] Error 1
make: *** [Makefile:1569: modules] Error 2


Expected Results:  
dkms build should have finished successfully

Comment 1 Dan Horák 2018-05-03 16:21:40 UTC
Fix similar to https://src.fedoraproject.org/rpms/kernel/c/23e036f36c5a1535bcb4eaa5510c108195c9d8da?branch=master is needed. Maybe a generic solution would be better as arch/*/kernel/module.lds exists for arm64, arm, m68k, powerpc and riscv in the mainline kernel tree.

Comment 2 Laura Abbott 2018-05-04 20:21:51 UTC
Fix added, should be picked up in the next stable release sometime next week.

Comment 3 Fedora Update System 2018-05-11 14:05:41 UTC
kernel-4.16.8-300.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-ac3b4c7605

Comment 4 Fedora Update System 2018-05-12 19:35:35 UTC
kernel-4.16.8-300.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-ac3b4c7605

Comment 5 Fedora Update System 2018-05-14 17:55:32 UTC
kernel-4.16.8-300.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.