LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Cannot build C executables (https://www.linuxquestions.org/questions/linux-from-scratch-13/cannot-build-c-executables-4175731986/)

nomadunix_ 12-20-2023 04:28 AM

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?

pan64 12-20-2023 04:36 AM

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

nomadunix_ 12-20-2023 04:38 AM

but the needed lib is installed
Code:

libc6-dev is already the newest version (2.36-9+deb12u3).
what else is incorrect?

pan64 12-20-2023 04:39 AM

that's why you need to check that log and find the real issue

nomadunix_ 12-20-2023 04:42 AM

here's the log
log

nomadunix_ 12-20-2023 04:55 AM

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!!!

nomadunix_ 12-20-2023 06:38 AM

UPDATE:
It does not worked, still error.
Here is the link to output of make

pan64 12-20-2023 07:48 AM

first remove config.cache, restart configure and check the file named config.log (as it is written in the output of make).

nomadunix_ 12-20-2023 03:47 PM

config.cache does not exist

pan64 12-21-2023 12:45 AM

that is not a problem, in that case you don't need to remove that.

coltson 12-25-2023 11:06 AM

What config.log says?

nomadunix_ 12-26-2023 07:30 AM

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?

wiigelec 12-27-2023 10:30 AM

mine works fine


All times are GMT -5. The time now is 04:35 AM.