LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-20-2021, 08:46 AM   #1
Luxvoo
LQ Newbie
 
Registered: Aug 2021
Posts: 1

Rep: Reputation: Disabled
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!
 
Old 08-22-2021, 04:32 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,588
Blog Entries: 19

Rep: Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455
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.
 
1 members found this post helpful.
Old 08-22-2021, 12:53 PM   #3
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
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.
https://www.linuxfromscratch.org/lfs/faq.html
 
1 members found this post helpful.
Old 02-08-2024, 02:52 PM   #4
CopBlockDev
LQ Newbie
 
Registered: Mar 2022
Posts: 2

Rep: Reputation: 0
Well, looks like it is back to ch5 for me.

Thanks for posting this. I'm glad I'm doing this as a docker project so I don't have to do all that crap by hand again ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Packet Filter to redirect a packet to a user level process akawale Linux - Networking 3 09-01-2006 12:06 PM
how do i read the data in the packet that i have captured after packet capture? gajaykrishnan Programming 23 04-19-2006 05:09 AM
packet fragmentation in packet forwarding code cranium2004 Linux - Networking 0 05-16-2005 04:05 AM
How to change Packet to look like a Windows packet? TimeFade Linux - Networking 10 08-28-2003 08:08 AM
Suggestions for packet sniffer w/ packet viewing? TruckStuff Linux - Networking 5 05-31-2002 09:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration