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
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
Can you use shorter lines, please (about 70 characters) ? I was
going to add a comment in the middle of that paragraph, but I would
have to scroll back through about 220 characters to add a line
break.

The comment is about allmodconfig - that is used for distro kernels,
and by kernel developers. On less-powerful hardware it takes for
ever and a day, any you really do not want to fill up your root
filesystem with kernel modules you will never use.

Also, in LFS the root filesystem driver and the disk driver(s) for
your hardware need to be compiled in, not modules.
Post by Joshua Huffman
cp: cannot stat './modules.builtin': No such file or directory
Makefile:1125: recipe for target '_modinst_' failed
make: *** [_modinst_] Error 1
I'm not sure about mixing allmodconfig and menuconfig - I vaguely
recall there is some way of overriding allmodconfig so that a few
specific things can forced to 'Y' (or 'N'), but in general for LFS
you should strip out the rubbish (specifically, things you never
use, drivers for hardware you do not have). If I get a new machine,
it usually takes me a couple of hours to go through menuconfig, and
then perhaps 2 or 3 builds to get a kernel which boots and is
useful.

The results that google found for me suggest you do not have any
compiled modules (.ko files).
Post by Joshua Huffman
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.
At this stage, it seems unlikely that host versions will be a
problem, and anyway slackware is not known for shipping the things
which cause pain when building LFS.
Post by Joshua Huffman
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
From time to time, a stable kernel introduces a problem - that
happened in the last week or so, except that both 4.3.0 and 4.3.1
were affected (something to do with X509, I think) and almost nobody
noticed because they did not enable the relevant code. At the
moment, it seems unlikely that reverting to an earlier 4.2 version
will help your problem.

If it was me, I would reduce the config (probably, ALL the SATA
libata disk drivers), most or all USB, keyboard stuff (I can't
remember if PS/2 needs a separate driver), processor-specific
choices, filesystems you care about (ext4, anything else you use),
wired network - identify your chipset, build that and any variations
*as modules* (to check the module part of the system), for video
start with normal VGA. If you do not have a wired network, you
could build something simple as a module and eventually modprobe it
(unless udev loads it automatically) to check the module side.

Oh, and put the config into /proc/config.gz (two options to do the
whole job there, if my memory is right : google). To solve lockup
type problems, the kernel hacking menu lets you enable Alt-SysRQ [
ctrl-alt-PrintScreen letter ] to e.g. Sync, Unmount, Boot or Off.

At this stage, the first problem is to get the LFS system to boot
into runlevel 3. When that is sorted, you can look at making it
more useful - for a desktop, that would probably include sound and
a framebuffer console with KMS [ depending on your hardware - modern
radeons need firmware ]. For laptops, or if you need wifi, there
are more things covered in BLFS and you might need to install
firmware.

Summary: break the kernel build into meaningful chunks, get it to
boot - or fix it, check the functionality, tune the build, rinse,
repeat.

ĸen
--
This email was written using 100% recycled letters.
--
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/Posting
Loading...