Hey Ken, Thank you for your timely reply.
I tried compiling the a small hello world program in my lfs environment with x86...gnu-gcc compiler. It did produce an "a.out" but when I tried to execute it, it again gave a segmentation fault. Another observation of mine is that - we usually have a "GCC" executable binary in /usr/bin to execute our code normally. But in my $LFS/tools/bin folder, only x86..gnu-gcc compiler is there and not "GCC". So does that make any difference? If not, then what should I do to overcome the problem? Apologies for troubling you but I'm a total newbie to this. On 10/29/16, Ken Moffat <zarniwh...@ntlworld.com> wrote: > On Sat, Oct 29, 2016 at 08:58:46AM +0530, Aditya Dixit wrote: >> Please help me in fixing this issue. I'm following v.7.10 of >> LinuxFromScratch on Fedora 64-bit device. >> >> The problem is: >> >> configure:4496: checking whether the C compiler works >> configure:4505: ./a.out >> ../binutils-2.27/configure: line 4507: 2249 Segmentation fault >> (core dumped) ./$ac_file >> configure:4509: $? = 139 >> configure:4516: error: in `/mnt/lfs/sources/binutils-2.27': >> configure:4520: error: cannot run C compiled programs. > > Bad hardware | bad memory | over-temperature | power-supply problem > (including irregular mains power). > > Does it reliably compile other things ? One of my machines is an > AMD Phenom of some sort - it has always had a tendency to segfault, > possibly a BIOS problem, dropping the caches with > echo 3 >/proc/sys/vm_drop_caches > *mostly* helps - before I added that to my bootscripts, I used to > find that using make -j3 instead of make -j4 was more reliable > (somebody else also found that on a phenom). > > For memory, memtest86+ : many motherboards will NOT run for more > than a few minutes with the "all cores" (F2) option - but if it > locks up within 5 minutes you should reboot, select that again, then > immediately use the option to configure it and choose round-robin or > sequential for cores. Leave it running for a few hours, checking it > from time to time. > > At one time, over-temperature used to be a common problem, with > gummed-up fans - modern hardware tends to throttle the CPU if the > temperature goes up. But if the BIOS lets you see temperatures, > check them. > > Oh, and overclocking can cause this. And sometimes, it's just one of > those things (alpha particles ?) and works fine next time. > > ĸen > -- > `I shall take my mountains', said Lu-Tze. `The climate will be good > for them.' -- Small Gods > -- > http://lists.linuxfromscratch.org/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/blfs/faq.html > Unsubscribe: See the above information page > > Do not top post on this list. > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > http://en.wikipedia.org/wiki/Posting_style > -- *Thank You* *Aditya Dixit* -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style