Discussion:
[lfs-support] cannot stat './modules.builtin', kernel make error
Joshua Huffman
2015-12-20 17:18:04 UTC
Permalink
Greetings. This is my 3rd attempt at LFS. I will actually finish it this time.
I have encountered trouble during my build, and despite google searches, I haven't been able to work around the issue.

LFS version 7.8
I am building linux kernel version 4.2.8, as per the note in section 3.2, which states to use the latest 4.2.x version number. The entire build has gone very smoothly up until section 8.3.1 - Installation of Kernel. I began with "make mrproper". I then ran "make allmodconfig", thinking extra modules won't hurt anything. "make LANG=en_US LC_ALL= menuconfig" as per the book to double check and make adjustments. "make" completed successfully, but when I run "make modules_install", I get the following error:

cp: cannot stat './modules.builtin': No such file or directory
Makefile:1125: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 1


Here is the referenced portion of the Makefile:
1123 PHONY += _modinst_
1124 _modinst_:
1125 @rm -rf $(MODLIB)/kernel
1126 @rm -f $(MODLIB)/source
1127 @mkdir -p $(MODLIB)/kernel
1128 @ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source
1129 @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \
1130 rm -f $(MODLIB)/build ; \
1131 ln -s $(CURDIR) $(MODLIB)/build ; \
1132 fi

My host system is a Slackware 14.1 full install (minus KDE).
I can post the output of the host version script from the book's section vii if anyone would like to see it. Any other relevant information can be provided upon request.

I have tried several times with no success. Makefiles and make errors confuse me very badly. If I have read & interpreted correctly, though, the make command exits when it doesn't find the file modules.builtin. I tried "touch"-ing the file, but that doesn't work either. I am at a loss. Has anyone experienced this? Should I just start over using the kernel from the standard wget-list? Anyone's thoughts are appreciated.

Joshua
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Postin
Thanos Baloukas
2015-12-20 18:52:16 UTC
Permalink
Post by Joshua Huffman
Greetings. This is my 3rd attempt at LFS. I will actually finish it this time.
I have encountered trouble during my build, and despite google searches, I haven't been able to work around the issue.
LFS version 7.8
cp: cannot stat './modules.builtin': No such file or directory
Makefile:1125: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 1
1123 PHONY += _modinst_
1130 rm -f $(MODLIB)/build ; \
1131 ln -s $(CURDIR) $(MODLIB)/build ; \
1132 fi
My host system is a Slackware 14.1 full install (minus KDE).
I can post the output of the host version script from the book's section vii if anyone would like to see it. Any other relevant information can be provided upon request.
I have tried several times with no success. Makefiles and make errors confuse me very badly. If I have read & interpreted correctly, though, the make command exits when it doesn't find the file modules.builtin. I tried "touch"-ing the file, but that doesn't work either. I am at a loss. Has anyone experienced this? Should I just start over using the kernel from the standard wget-list? Anyone's thoughts are appreciated.
Joshua
Looking in the Makefile of my linux-3.19.1 I see that there is a
modules.builtin target
that should be done with make. I would try to see what happens with

make modules.builtin

Also, a

find . -name "modules.builtin"

from the top source directory here, finds a ./modules.builtin that you
probably don't have,
and many others in various module directories. Do you have them?
And a last thought, did you use -jx with make? If you did, did you try
without it?
HTH
--
Thanos
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/w
Pierre Labastie
2015-12-20 18:59:30 UTC
Permalink
Post by Joshua Huffman
Greetings. This is my 3rd attempt at LFS. I will actually finish it this time.
I have encountered trouble during my build, and despite google searches, I haven't been able to work around the issue.
LFS version 7.8
I am building linux kernel version 4.2.8, as per the note in section
3.2, which states to use the latest 4.2.x version number. The entire
build has gone very smoothly up until section 8.3.1 - Installation
of Kernel. I began with "make mrproper". I then ran
"make allmodconfig", thinking extra modules won't hurt anything.
"make LANG=en_US LC_ALL= menuconfig" as per the book to double
check and make adjustments. "make" completed successfully, but
cp: cannot stat './modules.builtin': No such file or directory
Makefile:1125: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 1
Hi Joshua,

The file modules.builtin contains the list of modules built in the kernel.
If you use "make allmodconfig", nothing is built in, and it looks like this
file does not even exist in this case. But having no built in module cannot
work:
- with "make allmodconfig", modules are stored on disk, specially, modules
allowing disk access
- at boot, the kernel is loaded to memory, but not the external modules.
- so the kernel needs to access disk for reading modules allowing disk access...

That can be worked around with an initramfs, but it is an advanced topic.
So, at least modules for accessing disks should be built in. Not sure, but I
think a few others like keyboard and console access should be built in too.

Why didn't you run "make defconfig", as advised? It is a good start (be sure
also to tick the options as advised). Then configuring kernel is a bit of
black art. You may have to build and boot a couple of times before it works.
You may wish to see which modules are loaded by your host distribution (using
"lsmod").

Good luck,

Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org
Ken Moffat
2015-12-20 19:16:30 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...