Bug 117645
| Summary: | external kernel modules can't build as normal user | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Gary Peck <gbpeck> |
| Component: | kernel | Assignee: | Arjan van de Ven <arjanv> |
| Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | patpertusus, wtogami |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i686 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-04-19 03:16:42 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 114963 | ||
slight mistake in one of the commands above. sed -ie should be sed -i -e I would let the kernel developers correct me if I am completely misunderstanding the situation, but I believe this is NOTABUG for Fedora but rather external Makefiles. There are also further complications like Bug #121132 that prevent external module building, which should be fixed soon in rawhide. If this is still an issue with 327+ or later kernels please take it up on fedora-devel-list. it is solved for me in 2.6.5-1.349 |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040211 Firefox/0.8 Description of problem: With the 2.6 kernel, external modules should be buildable using just the files in the kernel package without kernel-source (as in 2.4). Doing a "make -C /lib/modules/VER/build SUBDIRS=. modules" in the module source directory should work. However, some errors prevent this from being possible unless you build the module as root. Specifically, intermediate files in scripts/ and scripts/genksyms/ (all directories relative to /lib/modules/VER/build), aren't packaged in kernel. As a result, the above make command tries to rebuild them even though the final binary IS in kernel. The make fails because a regular user doesn't have write access to the /lib/modules/VER/build directory. The following command provides a workaround for the problem by commenting out the final product in the Makefile (though a better solution would probably be good): sed -ie 's/^always/#always/' \ /lib/modules/VER/build/scripts/Makefile \ /lib/modules/VER/build/scripts/genksyms/Makefile Also, some file timestamps are wrong, causing make once again to try to rebuild files which are already built. The timestamps for /lib/modules/VER/build/include/config/MARKER and /lib/modules/VER/build/include/asm-i386/asm_offsets.h should be updated using the following commands (though just touching all the files before packaging would probably be best to avoid these problems in the future): touch -r `ls -t /lib/modules/VER/build/scripts/split-include \ /lib/modules/VER/build/include/linux/autoconf.h \ /lib/modules/VER/build/include/config/MARKER | head -1` \ /lib/modules/VER/build/include/config/MARKER touch -r /lib/modules/VER/build/arch/i386/kernel/asm-offsets.s \ /lib/modules/VER/build/include/asm-i386/asm_offsets.h Lastly, module compilation tries to write to /lib/modules/VER/build/.__modpost.cmd. As far as I can tell, this file isn't actually needed for the module to function. The following command fixed this problem for me: ln -s /dev/null /lib/modules/VER/build/.__modpost.cmd After the above set of commands, building modules as a normal user is once again possible. As an example, I'm trying to build the modules from ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/. Version-Release number of selected component (if applicable): kernel-2.6.3-2.1.238 How reproducible: Always Steps to Reproduce: 1. Download, untar, and configure the linux-wlan-ng module. 2. Run make on the module 3. Actual Results: The make fails when it gets to the "make -C /lib/modules/VER/build SUBDIRS=.../linux-wlan-ng-0.2.1-pre20/src/p80211 modules" command with a permission denied error trying to write to /lib/modules/VER/build/scripts. Expected Results: The module should build successfully. Additional info: I've seen this problem ever since kernel 2.6 was introduced into RawHide. The above set of commands has always fixed it.