Problems with compiling the M4 packet for my LFS system (LFS 10.1)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Problems with compiling the M4 packet for my LFS system (LFS 10.1)
Hello.
I'm quite new to LFS systems and this is my second one. When I try to compile the M4 packet I get this error:
mnt/sys/usr/include/bits/stdlib.h: In function 'wctomb':
/mnt/sys/usr/include/bits/stdlib.h:94:3: error: #error "Assumed value of MB_LEN_MAX wrong"
94 | # error "Assumed value of MB_LEN_MAX wrong"
| ^~~~~
Can you explain what this error is and how to fix it?
Thank you!
The stdlib.h header is part of glibc, so you have a glibc incompatibility there. The first question to ask is what chapter are you on? That's the first thing you always have to tell us if you want help with LFS because most LFS software gets built twice: once as part of the toolkit and then a final build using the tools.
My guess is that this is the first build of M4 in Chapter 6, because that comes immediately after building glibc but I could be wrong. If you are already on Chapter 8, then something is badly wrong with your build and you will have to scrap it and start again.
If you are in Chapter 6, the likeliest thing is that you have skipped setting limits.h at the end of the gcc chapter 5.3. It's rather easy to do that. I did it once. You could try setting it now, then rebuild M4 and hope it works this time, but it would probably be safer to start again from the beginning.
Welcome to LQ! I know zero about this, but web-searching your quoted error with intitle:lfs finds:
Quote:
Package-specific errors
M4: Assumed value of MB_LEN_MAX wrong
This error message usually indicates that limits.h provided by GCC isn't including limits.h from Glibc as it should be. There are two commands as a workaround for limits.h in Chapter 5, one in GCC Pass 1 and another in Glibc. Forgetting any of them will lead to this issue. You can rerun the forgotten commands (untar GCC tarball if necessary) and retry to build M4. Note that if you forgot the command in GCC Pass 1, you'll have to rerun both of these two workarounds, as the workaround in Glibc copies from the file created in the workaround in GCC Pass 1.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.