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.
im sure people have been able to do this (get past binutils 2nd pass) on centos somewhere and I should be ok because my host has all the prequisite software installed as version check shows....I really need help I really dont wanna move on to another distro for host.....
Unfortunately it's the distribution. CentOS is based on Red Hat which it and Fedora are known to have problems. We aren't entirely certain, but the way they patch certain packages often affects how the system works and it ends up killing GCC.
The evidence of this can be found by running this:
Code:
cat > library-check.sh << "EOF"
#!/bin/bash
for lib in lib{gmp,mpfr,mpc}.la; do
echo $lib: $(if find /usr/lib* -name $lib|
grep -q $lib;then :;else echo not;fi) found
done
unset lib
EOF
bash library-check.sh
Slackware is one of a few distributions that include the static libraries ".la" of the gmp, mfpr, and mpc libraries required to rebuild GCC and binutils.
lfs:/mnt/lfs/sources/binutils-build$ CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib ../binutils-2.25/configure --prefix=/tools --disable-nls --disable-werror --with-lib-path=/tools/lib --with-sysroot
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... x86_64-lfs-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/mnt/lfs/sources/binutils-build':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
lfs:/mnt/lfs/sources/binutils-build$
run again ls -l $LFS/tools (shows no change):
Quote:
lfs:/mnt/lfs/sources/binutils-build$ ls -l $LFS/tools
total 40
drwxr-xr-x. 2 lfs lfs 4096 Mar 29 20:24 bin
drwxr-xr-x. 2 lfs lfs 4096 Mar 29 20:23 etc
drwxr-xr-x. 33 lfs lfs 4096 Mar 29 20:23 include
drwxr-xr-x. 5 lfs lfs 4096 Mar 29 20:24 lib
drwxr-xr-x. 2 lfs lfs 4096 Mar 29 20:29 lib64
drwxr-xr-x. 4 lfs lfs 4096 Mar 29 17:11 libexec
drwxr-xr-x. 2 lfs lfs 4096 Mar 29 20:24 sbin
drwxr-xr-x. 7 lfs lfs 4096 Mar 29 17:21 share
drwxr-xr-x. 3 lfs lfs 4096 Mar 29 17:12 var
drwxr-xr-x. 5 lfs lfs 4096 Mar 29 17:21 x86_64-lfs-linux-gnu
lfs:/mnt/lfs/sources/binutils-build$
lfs:/mnt/lfs/sources/binutils-build$ bash library-check.sh
find: `/usr/lib64/audit': Permission denied
libgmp.la: not found
find: `/usr/lib64/audit': Permission denied
libmpfr.la: not found
find: `/usr/lib64/audit': Permission denied
libmpc.la: not found
lfs:/mnt/lfs/sources/binutils-build$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.