Unable to compile linux-kernel pulled from nf-next tree
Hello, I'm working on a task in netfilter and trying to compile linux-kernel pulled from nf-next tree. https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git but fail with these errors. make-- Kernel: arch/x86/boot/bzImage is ready (#4) MODPOST 4905 modules fs/ufs/ufs.o: Invalid argument scripts/Makefile.modpost:92: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1 Makefile:1211: recipe for target 'modules' failed make: *** [modules] Error 2 sudo make modules_install install-- cp: cannot stat 'net/nsh/nsh.ko': No such file or directory At main.c:291: - SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175 - SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178 sign-file: /lib/modules/4.14.0-rc8+/kernel/net/nsh/nsh.ko: No such file or directory scripts/Makefile.modinst:36: recipe for target 'net/nsh/nsh.ko' failed make[2]: *** [net/nsh/nsh.ko] Error 1 Makefile:1232: recipe for target '_modinst_' failed make[1]: *** [_modinst_] Error 2 Makefile:527: recipe for target '__build_one_by_one' failed make: *** [__build_one_by_one] Error 2 Any help will be appreciated. Thanks. Regards, Harsha Sharma
On Tue, Dec 19, 2017 at 06:33:51PM +0530, Harsha Sharma wrote:
Hello, I'm working on a task in netfilter and trying to compile linux-kernel pulled from nf-next tree. https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git but fail with these errors. make-- Kernel: arch/x86/boot/bzImage is ready (#4) MODPOST 4905 modules fs/ufs/ufs.o: Invalid argument scripts/Makefile.modpost:92: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1 Makefile:1211: recipe for target 'modules' failed make: *** [modules] Error 2
You should let the netfilter developers know this, not much we can do here, perhaps their branch is broken at the moment :( thanks, greg k-h
On Tue, Dec 19, 2017 at 8:23 PM, <valdis.kletnieks@vt.edu> wrote:
On Tue, 19 Dec 2017 18:33:51 +0530, Harsha Sharma said:
cp: cannot stat 'net/nsh/nsh.ko': No such file or directory
There was almost certainly a compile error for this. Go back and look at the 'make' output.
make |& tee build.output is your friend.
This is the output of make. CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHK include/generated/timeconst.h CHK include/generated/bounds.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CHK scripts/mod/devicetable-offsets.h CHK include/generated/compile.h SKIPPED include/generated/compile.h LD arch/x86/boot/compressed/vmlinux ZOFFSET arch/x86/boot/zoffset.h AS arch/x86/boot/header.o LD arch/x86/boot/setup.elf OBJCOPY arch/x86/boot/setup.bin OBJCOPY arch/x86/boot/vmlinux.bin BUILD arch/x86/boot/bzImage Setup is 17116 bytes (padded to 17408 bytes). System is 7617 kB CRC 1ff44e6e Kernel: arch/x86/boot/bzImage is ready (#4) Building modules, stage 2. MODPOST 4905 modules fs/ufs/ufs.o: Invalid argument scripts/Makefile.modpost:92: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1 Makefile:1211: recipe for target 'modules' failed make: *** [modules] Error 2 I have forwarded this to netfilter-devel mailing list. Thanks a lot for your time.
On Tue, 19 Dec 2017 22:15:02 +0530, Harsha Sharma said:
This is the output of make.
Building modules, stage 2. MODPOST 4905 modules fs/ufs/ufs.o: Invalid argument scripts/Makefile.modpost:92: recipe for target '__modpost' failed
You didn't fill up the filesystem you were building in, did you? If you're using a .config that builds 4,900+ modules, that's going to chew disk like crazy, especially if you have CONFIG_DEBUG_KERNEL=y so all of them are built with 'gcc -g'.... (You may want to consider doing a 'make localmodconfig' so it bypasses the 3,500 or more modules that don't apply to your hardware/software config...)
On Tue, Dec 19, 2017 at 10:59 PM, <valdis.kletnieks@vt.edu> wrote:
On Tue, 19 Dec 2017 22:15:02 +0530, Harsha Sharma said:
This is the output of make.
Building modules, stage 2. MODPOST 4905 modules fs/ufs/ufs.o: Invalid argument scripts/Makefile.modpost:92: recipe for target '__modpost' failed
You didn't fill up the filesystem you were building in, did you? If you're using a .config that builds 4,900+ modules, that's going to chew disk like crazy, especially if you have CONFIG_DEBUG_KERNEL=y so all of them are built with 'gcc -g'....
(You may want to consider doing a 'make localmodconfig' so it bypasses the 3,500 or more modules that don't apply to your hardware/software config...)
Using `make localmodconfig` doesn't load module nfnetlink in which I'm making the changes. What can be the best way to have a config that builds least but all required modules ? Using `make localmodconfig` don't produces these errors as these modules are no more build. Thanks for your time :)
On Wed, 20 Dec 2017 02:28:40 +0530, Harsha Sharma said:
Using `make localmodconfig` doesn't load module nfnetlink in which I'm making the changes.
'make localmodconfig' simply uses the output of 'lsmod' - so if you want nfnetlink included, simply modprobe a module called nfnetlink before you run it. If you're doing a totally new module, it doesn't have to *work*, it just has to modprobe or insmod successfully. Also, make sure you plug in all your USB widgets and devices to make sure they get modprobe'd as well.
participants (3)
-
Greg KH -
Harsha Sharma -
valdis.kletnieks@vt.edu