LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-29-2023, 08:45 PM   #1
engineer
Member
 
Registered: Oct 2007
Distribution: LFS
Posts: 69

Rep: Reputation: 2
LFS11.3 Error in ch 6 when building coreutils, unable to run make after ./configure


Hi folks. After many years, I've come back to LFS for another build.

I am in chapter 6, and I've just executed:
Code:
./configure --prefix=/usr                     \
            --host=$LFS_TGT                   \
            --build=$(build-aux/config.guess) \
            --enable-install-program=hostname \
            --enable-no-install-program=kill,uptime
I have downloaded coreutils 9.3 from the sources list provided in the book. The error I get at the end of the configure script is:
Code:
checking whether MB_CUR_MAX is correct... configure: error: in '/mnt/lfs/sources/coreutils-9.3':
configure: error: cannot run test program while cross compiling
See 'config.log' for more details
I have tried deleting the extraction folder for coreutils and starting over again, but I get the same error.

Could someone help point me in the right direction on where I've gone wrong? I note that the book refers to coreutils 9.1, but the sources list uses 9.3. Perhaps I should try to find an older version? Is there a way to bypass this test (assuming it won't break something later)?
 
Old 05-29-2023, 09:10 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
See 'config.log' for more details
 
Old 05-29-2023, 09:25 PM   #3
engineer
Member
 
Registered: Oct 2007
Distribution: LFS
Posts: 69

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by BW-userx View Post
See 'config.log' for more details
Yes, I took a look in there, and the information below was related to the search I made. I am not sure what to do with this information though.
Code:
lfs:/mnt/lfs/sources/coreutils-9.3$ cat config.log | grep MB_CUR
configure:31510: checking whether MB_CUR_MAX is correct
gl_cv_macro_MB_CUR_MAX_good='guessing yes'
REPLACE_MB_CUR_MAX='0'
 
Old 05-29-2023, 10:35 PM   #4
engineer
Member
 
Registered: Oct 2007
Distribution: LFS
Posts: 69

Original Poster
Rep: Reputation: 2
I think I've solved my own problem. The new version of the book (11.3-101) has an extra flag for the ./configure options for coreutils, which eliminates this issue with MB_CUR_MAX:

Code:
./configure --prefix=/usr                     \
            --host=$LFS_TGT                   \
            --build=$(build-aux/config.guess) \
            --enable-install-program=hostname \
            --enable-no-install-program=kill,uptime \
            gl_cv_macro_MB_CUR_MAX_good=y
Then I encountered another error, where I found another post which suggested I had forgotten to do this line (I hadn't):

Code:
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
  `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h
But, I did change that line, because I wanted to make sure it was working properly, so I ran this:
Code:
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/13.1.0/include/limits.h
This seemed to populate the missing limits.h file, and allowed me to continue with compiling coreutils.
 
1 members found this post helpful.
Old 05-30-2023, 07:18 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by engineer View Post
I think I've solved my own problem. The new version of the book (11.3-101) has an extra flag for the ./configure options for coreutils, which eliminates this issue with MB_CUR_MAX: (...)
Good Job! Isn't that the whole reason for LFS? learning hands on how to fix it yourself? Like building anything from scratch. I don't know. I'm not doing that one, but nonetheless, congrats. soon you'll be able to help spaceX get to Mars.

Last edited by BW-userx; 05-30-2023 at 07:19 AM.
 
1 members found this post helpful.
Old 05-30-2023, 09:50 PM   #6
engineer
Member
 
Registered: Oct 2007
Distribution: LFS
Posts: 69

Original Poster
Rep: Reputation: 2
Thank you! Indeed it is what it’s all about. This is more of a hobby for me to teach myself something new.

I’m already working on the Mars part
 
1 members found this post helpful.
  


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
coreutils-8.31 make error chinnadas Linux From Scratch 1 06-30-2020 12:34 PM
coreutils error while running make check adwiteeymauriya Linux From Scratch 2 10-12-2017 11:50 AM
[SOLVED] LFS 7.3 / Chapter 6.27.1 / Page 132 / Error from the Coreutils-8.21 make check Drumachine Linux From Scratch 7 09-18-2013 07:29 AM
[SOLVED] building coreutils... functions already defined frozenQueue Programming 8 09-16-2010 09:24 PM
Coreutils-5.2.1 Configure problem: alihamza Linux - Distributions 2 09-07-2005 11:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 07:29 PM.

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