Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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?
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.