Following LFS 7.4 instruction to build gcc,encountering problem during configuration.
According to the instruction i extracted mpc,gmp and mpfr in gcc source directory and renamed them as instructed.
But i am getting following error Code:
checking build system type... x86_64-unknown-linux-gnu and here is config.log Code:
This file contains any messages produced by compilers while Also do i have to configure and make gmp,mpfr and mpc?If so,in which order? |
configure:4201: x86_64-monty-linux-gnu-gcc --version >&5
../gcc-4.8.1/configure: line 4203: x86_64-monty-linux-gnu-gcc: command not found it seems he can't find where gcc is |
Is you host made compliant?
vii. Host System Requirements : Run the version-check.sh script and post the output it produces. |
Version Check script result
root@abhinav-Aspire-5745G:/# bash version-check.sh
bash, version 4.2.45(1)-release /bin/sh -> /bin/bash Binutils: (GNU Binutils for Ubuntu) 2.23.52.20130913 bison (GNU Bison) 2.7.12-4996 /usr/bin/yacc -> /usr/bin/bison.yacc bzip2, Version 1.0.6, 6-Sept-2010. Coreutils: 8.20 diff (GNU diffutils) 3.2 find (GNU findutils) 4.4.2 GNU Awk 4.0.1 /usr/bin/awk -> /usr/bin/gawk gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1 g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1 (Ubuntu EGLIBC 2.17-93ubuntu4) 2.17 grep (GNU grep) 2.14 gzip 1.6 Linux version 3.11.0-15-generic (buildd@batsu) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) ) #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 m4 (GNU M4) 1.4.16 GNU Make 3.81 GNU patch 2.7.1 Perl version='5.14.2'; sed (GNU sed) 4.2.2 tar (GNU tar) 1.26 Texinfo: makeinfo (GNU texinfo) 5.1 xz (XZ Utils) 5.1.0alpha g++ compilation OK |
The output shown looks OK.
I just noticed this: /mnt/monty. Why did you change the convention that is in the book (/mnt/lfs)? And I immediately start wondering what else you might have changed.... You really need to follow the book to the letter, especially if this is your first LFS build. Did you change the .bashrc file? (4.4. Setting Up the Environment) Especially this one: LFS_TGT=$(uname -m)-lfs-linux-gnu If you start changing things it will be rather hard for us to help you trouble shoot possible problems you run into. |
Reply
To druuna,
Thanks for your reply and support,i really appreciate it.And yes,it is my first lfs build. Now,regarding the topic, I did't thought that renaming would affect it, after all it was just a variable. And i only changed the name 'lfs' up until now.I did not made any changes in configure or added any option anywhere,from what was given in the book. But,i did change .bashrc file accordingly(where i renamed LFS_TGT to MONTY_TGT and any instances with word 'lfs' with it.) But if it has so much adverse effect then i think, i can start again from the start. Please also mention what you suggest i do. Thanks |
Quote:
Changing LFS=/mnt/lfs to LFS=/mnt/monty is probably harmless, but why do you want to do so? This directory won't even be part of the final LFS build. Changing the variable name LFS_TGT to MONTY_TGT is not a smart move. The content of this variable is used in multiple chapters and you have to change all those chapters to accommodate the new variable name. Forget it once and you might have to start from scratch again. Building and understanding LFS when doing this for the first time is hard enough as it is. Stick to the book. |
I again started started from scratch and strictly followed the book,without changing anything.
Now,i have encountered new errors in gcc. Before configuration of GCC we run the following code which is not showing any output for file in \ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do cp -uv $file{,.orig} sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ -e 's@/usr@/tools@g' $file.orig > $file echo ' #undef STANDARD_STARTFILE_PREFIX_1 #undef STANDARD_STARTFILE_PREFIX_2 #define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/" #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file touch $file.orig done I saw this step in a youtube LFS video and it is showing some processing and output, what is the problem here? After this, i did the configure steps, which executed successfully without any errors. But,when i ran make,it showed followings errors. bgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1 32/libgcc_s.so.1.backup; else true; fi && mv 32/libgcc_s.so.1.tmp 32/libgcc_s.so.1 && ln -s libgcc_s.so.1 32/libgcc_s.so /tools/bin/x86_64-lfs-linux-gnu-ld: cannot find crti.o: No such file or directory /tools/bin/x86_64-lfs-linux-gnu-ld: cannot find -lc /tools/bin/x86_64-lfs-linux-gnu-ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status make[4]: *** [libgcc_s.so] Error 1 make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/32/libgcc' make[3]: *** [multi-do] Error 1 make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc' make[2]: *** [all-multi] Error 2 make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' make: *** [all] Error 2 Can someone help? |
Quote:
Quote:
1 - Did you clean up everything when you started again? 2 - Is the tools symlink set correctly? (ls -l /tools should output something like this: tools -> /mnt/lfs/tools/) 3 - crti.o and crtn.o are part of libc (glibc) and at this stage it must be provided by the host. You might need to install the dev version. I'm not an ubuntu user, but look for and install libc6-dev BTW: You need to provide specific information in order for us to be able to help you. - The version of the book being used, (I'm assuming LFS 7.4 stable) - The host distribution being used, (I'm assuming Ubuntu, but which version) - The output from the Host System Requirements section, (already provided) - The package and section the problem was encountered in, (I'm assuming 5.5. GCC-4.8.1 - Pass 1) EDIT: I just noticed this isn't posted in the LFS sub-forum. I've ask a moderator to move it. This way you get the exposure it needs. |
Moved: This thread is more suitable in Linux From Scratch and has been moved accordingly to help your thread/question get the exposure it deserves.
|
Reply
Sorry for the late reply, i had my exams.
Quote:
1.I formatted the entire lfs partition before starting again. 2.The tools symlink was broken after i had formatted the partition, but i unlinked it and then made a new symlink when it was required and its working. 3.I installed libc6-dev but there are many other libc6-dev packages like libc6-dev-amd64:i386, libc6-dev-1386, libc6-dev-x32, are those also neccessary? Quote:
-Using LFS-7.4 stable -Ubuntu 13.10 -output already provided -5.5. GCC-4.8.1 - Pass 1, 5.5.1. Installation of Cross GCC(just after unpacking and renaming). |
Multilib packages aren't required. Just get the listed packages as directed and make sure Bash is the default shell.
|
Do you understand what that command does?
For example, this part Code:
for file in \ Note that you must be in the gcc-4.8.1 directory when you run that command. |
Reply
Quote:
I understand the meaning of the command and i checked linx.h had orig extension but when i checked its content, "lib/ld" or or "lib64/ld" or "lib32/ld" wasn't replaced with "tools". Also, i checked the subdirectories for files named linux.h and linux64.h, but they didn't had ".orig" extension, only the linux.h in the immediate directory i.e in gcc/config was affected, please clarify that the subdirectory in gcc/config should be affected or not? Please suggest a solution. Thanks in advance. |
Actually I explained that incorrectly. It doesn't replace the path with "tools". Instead, it adds "/tools" to the beginning of each path. So for example, /lib/ld becomes /tools/lib/ld, /lib64/ld becomes /tools/lib64/ld, and so on.
Then the next line replaces "/usr" with "/tools" in a couple of these files. This command definitely affects files in the subdirectories under gcc/config. This is the output you should get, listing all of the files that are affected: Code:
'gcc/config/frv/linux.h' -> 'gcc/config/frv/linux.h.orig' Code:
for file in $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) If you don't get that output: maybe you're not in the correct directory [gcc-4.8.1] when you ran the command, or maybe your copy of gcc-4.8.1.tar.bz2 was corrupted & must be downloaded again Are you sure that your user's shell is bash? To check that: Code:
echo $SHELL Code:
ls -l /bin/sh |
All times are GMT -5. The time now is 05:17 PM. |