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.
please always post which version you are trying to build and which chapter you are. I assume LFS 6.6 chapter 5.5.1? Also post which commands you issued, i.e. as you typed them into the console. Do not just copy+paste them from the book. It is also better to just post the last 20 lines of the log before the error occurred. The rest of the log can be uploaded as attachment if necessary.
As for your problem it appears that you used /mnt/lfs/tools/ as build directory. You are not supposed to do that. You should keep the source in /mnt/lfs/sources/gcc/ and compile gcc in /mnt/lfs/sources/gcc-build/.
Oh okay, sorry about all the text... So I tried it again, would what directory I have it in really change if it works or not? Anyways this is what I typed
and so far that worked, than I tried just make and this is now the output
Quote:
c-linux-gnu/gcc/xgcc -B/mnt/lfs/sources/gcc-build/host-i686-pc-linux-gnu/gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include -E
checking whether decimal floating point is supported... no
checking whether fixed-point is supported... no
checking for __attribute__((visibility("hidden")))... yes
checking whether the target assembler supports thread-local storage... yes
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: executing default commands
make[2]: Entering directory `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc'
Makefile:143: ../.././gcc/libgcc.mvars: No such file or directory
make[2]: *** No rule to make target `../.././gcc/libgcc.mvars'. Stop.
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2
And yes I am in chapter 5.5.1 of the 6.6 version. Also for where to build it the book says outside the source directory in it's own directory and well, I did that one too and it still didn't work, I had tried different three directories and none worked.
did you also untar mpfr and gmp in gcc's source directory before you executed configure? Which host system are you using? If it is not the liveCD, have you checked all the requirements?
Also, when you build binutils in the previous chapter, did you also use /mnt/lfs/tools as build directory?
did you also untar mpfr and gmp in gcc's source directory before you executed configure? Which host system are you using? If it is not the liveCD, have you checked all the requirements?
Also, when you build binutils in the previous chapter, did you also use /mnt/lfs/tools as build directory?
No I didn't use that as the build directory, I'm using Slackware 13 as the host system and I did check and yes gmp and mpfr are in the gcc directory
No I didn't use that as the build directory, I'm using Slackware 13 as the host system and I did check and yes gmp and mpfr are in the gcc directory
Ok, however since you used /mnt/lfs/tools as build directory it is probably corrupted. So it is best to start completely over with chapter 5, reformating the build partition. Make sure you have a copy of the source-tars on another partition available.
Only use /lfs/mnt/sources/ to keep your source and build directories in, e.g. binutils's source resides in
/mnt/lfs/binutils-2.20/
and the build directory
/mnt/lfs/binutils-build/
If you make a mistake always start with a fresh untarred source of the package and a fresh build directory - if one is needed for that package.
In the meantime you can upload the output of the configure script as attachment. Not sure if your error is a follow-up of trying to recompile gcc from a 'used' source or if something else is up.
build/genmodes not found error while compiling gcc
After extracting gcc the folder structure will be as follows
gcc-4.4.6
gcc-4.4.6/gcc
If you directly go inside gcc-4.4.6/gcc and try to do ./configure and compile(make) from there then you will encounter below problem
build/genmodes -h > tmp-modes.h
/bin/sh: build/genmodes: No such file or directory
Solution is do ./configure and make from gcc-4.4.6 and no errors will be shown related to genmodes. This will compile all modules including gcc. You may have to install mpfr and gmp modules which are needed by gcc if any error shown by ./configure
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.