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.
I don't know what's going wrong, it could be anything. Trace it down to the exact command that's causing the error and figure out how to fix it. Then either edit the header file causing the error or the makefile.
and are you sure you don't want to 'make bootstrap'?
Additionally, the LFS book recommends a different directory structure than you're using to build the toolchain... perhaps investigate the early chapters of the LFS book again, where it instructs you on how to set things up..
When I gave make bootstrap, though it compiled properly, when I tried to install it using
make install
it asked for root permission. Wehn I issued same command as root, though it seems to install,when I look into bin dir(it is in my toolchain dir)I find -gcc.
Moreover, I fear that gcc version of the host might be corrupted.
What does that - imply in bin/-gcc ?
What to do for this ?
I'm following LFS-6.1.1
In LFS I have Binutils-2.15.94.0.2.2
Then I try to build GCC-3.4.3 as described in the book, but get the following error:
Code:
- - - -
SHLIB_EXT='.so' \
SHLIB_MULTILIB='' \
SHLIB_MKMAP='../../gcc-3.4.3/gcc/mkmap-symver.awk' \
SHLIB_MKMAP_OPTS='' \
SHLIB_MAPFILES='../../gcc-3.4.3/gcc/libgcc-std.ver ../../gcc-3.4.3/gcc/config/libgcc-glibc.ver' \
SHLIB_NM_FLAGS='-pg' \
MULTILIB_OSDIRNAMES='' \
mkinstalldirs='/bin/sh ../../gcc-3.4.3/gcc/mkinstalldirs' \
/bin/sh mklibgcc > tmp-libgcc.mk
mv tmp-libgcc.mk libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="ansidecl.h" DEFINES="" \
/bin/sh ../../gcc-3.4.3/gcc/mkconfig.sh tconfig.h
./xgcc -B./ -B/tools/i686-pc-linux-gnu/bin/ -isystem /tools/i686-pc-linux-gnu/include -isystem /tools/i686-pc-linux-gnu/sys-include -L/home/lfs/lfs/sources/gcc-build/gcc/../ld -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc-3.4.3/gcc -I../../gcc-3.4.3/gcc/. -I../../gcc-3.4.3/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer \
-c ../../gcc-3.4.3/gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
In file included from ../../gcc-3.4.3/gcc/crtstuff.c:62:
../../gcc-3.4.3/gcc/tsystem.h:79:19: stdio.h: No such file or directory
../../gcc-3.4.3/gcc/tsystem.h:82:23: sys/types.h: No such file or directory
../../gcc-3.4.3/gcc/tsystem.h:85:19: errno.h: No such file or directory
../../gcc-3.4.3/gcc/tsystem.h:92:20: string.h: No such file or directory
../../gcc-3.4.3/gcc/tsystem.h:93:20: stdlib.h: No such file or directory
../../gcc-3.4.3/gcc/tsystem.h:94:20: unistd.h: No such file or directory
In file included from ./include/syslimits.h:7,
from ./include/limits.h:11,
from ../../gcc-3.4.3/gcc/tsystem.h:97,
from ../../gcc-3.4.3/gcc/crtstuff.c:62:
./include/limits.h:122:61: limits.h: No such file or directory
In file included from ../../gcc-3.4.3/gcc/crtstuff.c:62:
../../gcc-3.4.3/gcc/tsystem.h:100:18: time.h: No such file or directory
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2
lfs:~/lfs/sources/gcc-build$
This is really stupid, because I don't understand why does it look in ../../gcc
I'm building outside sources, I also have tried to build within gcc-3.4.3/BUILD dir (created by myself), but there was the same error.
Use binutils 2.16.1 instead. the 2.15.94.0.2.2 one causes a lot of problems according to my experiences.
For you problem, I suggest to start again. I had this problem before and after I repeat , the problem is not there anymore. I must mistype something in my first time.
I've tried binutils-2.6.1, but still get the same error!
I even tried just to do "make" instead of "make bootstrap", but the same error occurs!
What to do?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.