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 - 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-13-2019, 02:41 PM   #1
garb76767
LQ Newbie
 
Registered: Apr 2019
Posts: 13

Rep: Reputation: Disabled
Gcc-8.2.0 LFS install pass 2.0


Hello I am installing Gcc on the second pass but keep receiving this error.checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/mnt/lfs/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libstdc++-v3':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Makefile:11739: recipe for target 'configure-target-libstdc++-v3' failed
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/gcc-8.2.0/build'
Makefile:911: recipe for target 'all' failed
make: *** [all] Error 2
I am running a boot-able usb with neon on it. As for the version check these are the results
/bin/sh -> /bin/bash
Binutils: (GNU Binutils) 2.32
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.28
diff (GNU diffutils) 3.6
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
(GNU libc) 2.29
grep (GNU grep) 3.1
gzip 1.6
Linux version 4.18.0-17-generic (buildd@lgw01-amd64-021) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12 UTC 2019
m4 (GNU M4) 1.4.18
GNU Make 4.1
GNU patch 2.7.6
Perl version='5.26.1';
Python 3.6.7
sed (GNU sed) 4.4
tar (GNU tar) 1.29
texi2any (GNU texinfo) 6.5
xz (XZ Utils) 5.2.2
g++ compilation OK
 
Old 05-14-2019, 08:24 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,610
Blog Entries: 19

Rep: Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458
I think it's interesting that the error message mentions libstdc++. The last thing you built from this particular tarball was libstdc++. Are you sure you deleted the whole directory (not just the build subdirectory) after that build and started again with freshly unpacked source? You should try doing that now in any case; it will only take a few minutes.

If I were you, I would also (before deleting the directory) look at the last part of config.log as suggested. You might learn more about what went wrong.

In general that's a good procedure to follow with Linux error messages: if they tell you to do a certain thing, then do it.
 
Old 05-15-2019, 02:03 PM   #3
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Rep: Reputation: Disabled
looking at it is bash pointed to /bin/bash or /bin/sh?
 
Old 05-16-2019, 01:30 PM   #4
garb76767
LQ Newbie
 
Registered: Apr 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
I think bash. I still haven't figured out what Ive done wrong I've rebuilt everything from libstdc++-v3 but haven't figure it out. Anyone have any ideas?
 
Old 05-20-2019, 11:52 AM   #5
garb76767
LQ Newbie
 
Registered: Apr 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
I did as hazel suggested and nothing has changed.
 
Old 05-20-2019, 07:00 PM   #6
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Rep: Reputation: Disabled
you deleted the whole gcc tarball and made a new build dir and still this error? What happens if you run make clean in that build dir?
 
Old 05-23-2019, 03:41 PM   #7
garb76767
LQ Newbie
 
Registered: Apr 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
I redid the whole build for lfs following the book step by step and received the same error. I tried make clean and same error occurred.
 
Old 05-23-2019, 07:53 PM   #8
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Rep: Reputation: Disabled
Do the following:

go in config.log and look for the error configure: error: cannot run C compiled programs. lines before that will tell us something.

Please review what you have done (bash history, i.e. as user lfs
'history | less' or just cursor-up to go back (then cursor-down) )
and compare it to the book. Check that you set the environment
variables correctly, then check what you did for each part of the
build. I am thinking you didn't set the environment variable correctly.

Last edited by drillsar; 05-23-2019 at 07:56 PM.
 
Old 05-24-2019, 12:27 PM   #9
garb76767
LQ Newbie
 
Registered: Apr 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
Configured with: ../configure --target=x86_64-lfs-linux-gnu --prefix=/tools --with-glib$
Thread model: single
gcc version 8.2.0 (GCC)
configure:4284: $? = 0
configure:4273: x86_64-lfs-linux-gnu-gcc -V >&5
x86_64-lfs-linux-gnu-gcc: error: unrecognized command line option '-V'
x86_64-lfs-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4284: $? = 1
configure:4273: x86_64-lfs-linux-gnu-gcc -qversion >&5
x86_64-lfs-linux-gnu-gcc: error: unrecognized command line option '-qversion'; did you $
x86_64-lfs-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:4284: $? = 1
configure:4304: checking for C compiler default output file name
configure:4326: x86_64-lfs-linux-gnu-gcc conftest.c >&5
configure:4330: $? = 0
configure:4367: result: a.out
configure:4383: checking whether the C compiler works
configure:4392: ./a.out
../configure: line 4394: ./a.out: No such file or directory
configure:4396: $? = 127
configure:4403: error: in `/mnt/lfs/sources/gcc-8.2.0/build':
configure:4407: error: cannot run C compiled programs.
 
Old 05-24-2019, 07:15 PM   #10
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Rep: Reputation: Disabled
Go into the system, and after you get to the point where you type...

su - lfs

type: printenv and post the results here.
 
Old 06-05-2019, 12:39 PM   #11
garb76767
LQ Newbie
 
Registered: Apr 2019
Posts: 13

Original Poster
Rep: Reputation: Disabled
So I absolutely gave up. I tried everything under the sun so I tried again. New OS Running fedora 30 and all went well when I got the error gcc pass 2 cannot compute sizeof (long long) any ideas?
 
Old 06-05-2019, 07:22 PM   #12
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Rep: Reputation: Disabled
you must be missing a step..

what does printenv give you?
 
Old 06-06-2019, 06:18 AM   #13
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,610
Blog Entries: 19

Rep: Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458
I don't know how current this is, but Fedora always used to have a bad reputation as an LFS build host.
 
Old 06-06-2019, 07:12 AM   #14
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Rep: Reputation: Disabled
I haven’t built LFD in awhile but I think they still have LFS iso you can build from. Another option is to build from JHALFS which is automated. You can pick a package manager from there as well.
 
  


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] LFS: Error during GCC-4.7.1-Pass 1 (LFS 7.2, Section 5.5) erkant Linux From Scratch 7 11-28-2012 06:03 AM
[SOLVED] LFS: Error during Binutils-2.22 - Pass 1 (Section 5.4, LFS 7.2) erkant Linux From Scratch 4 11-26-2012 01:26 PM
LFS-5.0 GCC problem with binutils-2.14 pass 1 NCappaZoo Linux From Scratch 6 06-14-2009 03:47 AM
LFS GCC - first pass install error arnuld Linux From Scratch 2 12-20-2006 07:59 AM
questions on GCC-3.4.3 - Pass 2 and Binutils-2.15.94.0.2.2 - Pass 2 satimis Linux From Scratch 7 12-26-2005 09:23 PM

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

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