LinuxQuestions.org
Visit Jeremy's Blog.
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 12-20-2023, 04:28 AM   #1
nomadunix_
LQ Newbie
 
Registered: Dec 2023
Location: Information unavailable
Posts: 16

Rep: Reputation: 0
Question Cannot build C executables


Hi everyone! I decided to build LFS and in gcc build pass 1 i encourted an error
Code:
done
make[4]: Leaving directory '/mnt/lfs/sources/gcc-13.2.0/build/x86_64-pc-linux-gnu/libgcc'
make[3]: Leaving directory '/mnt/lfs/sources/gcc-13.2.0/build/x86_64-pc-linux-gnu/libgcc'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-13.2.0/build'
make[2]: Entering directory '/mnt/lfs/sources/gcc-13.2.0/build'
make[3]: Entering directory '/mnt/lfs/sources/gcc-13.2.0/build'
rm -f stage_current
make[3]: Leaving directory '/mnt/lfs/sources/gcc-13.2.0/build'
make[2]: Leaving directory '/mnt/lfs/sources/gcc-13.2.0/build'
make[2]: Entering directory '/mnt/lfs/sources/gcc-13.2.0/build'
Configuring stage 2 in ./intl
configure: loading cache ./config.cache
checking for x86_64-pc-linux-gnu-gcc...  /mnt/lfs/sources/gcc-13.2.0/build/./prev-gcc/xgcc -B/mnt/lfs/sources/gcc-13.2.0/build/./prev-gcc/ -B/mnt/lfs/tools/x86_64-pc-linux-gnu/bin/ -B/mnt/lfs/tools/x86_64-pc-linux-gnu/bin/ -B/mnt/lfs/tools/x86_64-pc-linux-gnu/lib/ -isystem /mnt/lfs/tools/x86_64-pc-linux-gnu/include -isystem /mnt/lfs/tools/x86_64-pc-linux-gnu/sys-include   -fno-checking
checking whether the C compiler works... no
configure: error: in `/mnt/lfs/sources/gcc-13.2.0/build/intl':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[2]: *** [Makefile:6551: configure-stage2-intl] Error 77
make[2]: Leaving directory '/mnt/lfs/sources/gcc-13.2.0/build'
make[1]: *** [Makefile:21586: stage2-bubble] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-13.2.0/build'
make: *** [Makefile:1027: all] Error 2
Can you help me solving this issue?
 
Old 12-20-2023, 04:36 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,854

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
usually it has a log
Code:
checking whether the C compiler works... no
And you will see what was the real problem. Looks like somewhat similar to this: https://askubuntu.com/questions/6475...te-executables
 
Old 12-20-2023, 04:38 AM   #3
nomadunix_
LQ Newbie
 
Registered: Dec 2023
Location: Information unavailable
Posts: 16

Original Poster
Rep: Reputation: 0
but the needed lib is installed
Code:
libc6-dev is already the newest version (2.36-9+deb12u3).
what else is incorrect?
 
Old 12-20-2023, 04:39 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,854

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
that's why you need to check that log and find the real issue
 
1 members found this post helpful.
Old 12-20-2023, 04:42 AM   #5
nomadunix_
LQ Newbie
 
Registered: Dec 2023
Location: Information unavailable
Posts: 16

Original Poster
Rep: Reputation: 0
here's the log
log
 
Old 12-20-2023, 04:55 AM   #6
nomadunix_
LQ Newbie
 
Registered: Dec 2023
Location: Information unavailable
Posts: 16

Original Poster
Rep: Reputation: 0
Ok, i managed this. I installed missing packages and retried configure and make and...it worked! Thanks to stackoverflow community and forums. They are helped me very well!!!
 
Old 12-20-2023, 06:38 AM   #7
nomadunix_
LQ Newbie
 
Registered: Dec 2023
Location: Information unavailable
Posts: 16

Original Poster
Rep: Reputation: 0
UPDATE:
It does not worked, still error.
Here is the link to output of make
 
Old 12-20-2023, 07:48 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,854

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
first remove config.cache, restart configure and check the file named config.log (as it is written in the output of make).
 
Old 12-20-2023, 03:47 PM   #9
nomadunix_
LQ Newbie
 
Registered: Dec 2023
Location: Information unavailable
Posts: 16

Original Poster
Rep: Reputation: 0
config.cache does not exist
 
Old 12-21-2023, 12:45 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,854

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
that is not a problem, in that case you don't need to remove that.
 
Old 12-25-2023, 11:06 AM   #11
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
What config.log says?
 
Old 12-26-2023, 07:30 AM   #12
nomadunix_
LQ Newbie
 
Registered: Dec 2023
Location: Information unavailable
Posts: 16

Original Poster
Rep: Reputation: 0
I've already given up on building linux from scratch and switched to debian. Why? Because why would I waste my time building a system that is not likely to work at all?
 
Old 12-27-2023, 10:30 AM   #13
wiigelec
Member
 
Registered: Nov 2021
Distribution: Devuan
Posts: 65

Rep: Reputation: Disabled
mine works fine
 
  


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
[SOLVED] Linux 4.4 seems to refuse to build IPv6 for the 64-bit build - 32-bit build works fine GameCodingNinja Linux From Scratch 2 02-07-2016 06:40 PM
Build win32 executables in Arch Alexvader Arch 3 02-27-2010 01:37 PM
LXer: Build 'em Right, Build 'em Strong, Build 'em Linux LXer Syndicated Linux News 0 10-01-2007 09:51 PM
Cannot compile Seamonkey: "cannot create executables" yozhhh Linux - Software 0 12-29-2005 09:11 AM
C compiler cannot create executables... Sfpiano Linux - Software 9 12-11-2003 10:28 AM

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

All times are GMT -5. The time now is 11:01 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