Problem in LFS chapter 5.4. Binutils-2.31.1 - Pass 1
After I type in the terminal
Code:
lfs@ephraimb-STK2M364CC:/mnt/lfs/sources/binutils-2.31.1/build$ ../configure --prefix=/tools \ Code:
lfs@ephraimb-STK2M364CC:/mnt/lfs/sources/binutils-2.31.1/build$ ../configure --prefix=/tools \ |
Since gcc was not found on your command path, the first thing you need to check is the value of $PATH. Remember that this environmental variable is set when you log in as the lfs user.
What is the output of "echo $PATH"? It should show /tools/bin at the beginning followed by /bin and /usr/bin. /usr/bin is where your current gcc should be. You did install the build-essential package before you started, didn't you? By the way, I see that you don't have gawk; you have mawk instead. This is usual on Debian derivatives like Ubuntu, but you can't build LFS with that setup. You need to install gawk as well as build-essential, and to make sure that the /bin/sh symbolic link points to /bin/bash and not /bin/dash. Have you run the requirements script to check on all that stuff? |
Quote:
Code:
lfs@ephraimb-STK2M364CC:/mnt/lfs/sources/binutils-2.31.1/build$ echo $PATH |
So is gcc present in /usr/bin?
|
Quote:
|
@ EphraimB:-
Quote:
I just wanted to say that a few years ago, one of our members on the Puppy Linux Forums built an upgrade package to 'upgrade' the glibc on an elderly, but popular 'Puppy' where members wanted to run the then current Chrome browser. This 'package' consisted of 6 or 7 small 'pets' (as we call them).....and his instructions were also to install binutils BEFORE gcc. I believe this is because the tools in the binutils package are required for building the 'C' compiler itself. I could also be completely wrong, of course..! Just a wee anecdote. Mike. ;) |
Quote:
|
Quote:
|
Quote:
But I think you are misunderstanding something on a basic level. When you start out building LFS, you have to use the build tools on your host system (in your case Ubuntu), because that's all you have to work with. So you need to have both gcc and binutils installed on the host, along with a number of other build tools such as make. All Debian derivatives have a package called build-essential which contains those tools. In chapter 5, you use these host tools to build a set of duplicate tools independent of the host. Then, in chapter 6, you use the toolkit that you have built to build your new system. So it is the host's gcc and binutils that are used to build binutils for the /tools directory. Then the host's gcc and the new binutils are used to build a new gcc. A complicating factor is that most distros do not include build tools in their default install, so you have to install them separately before you embark on LFS. Also Debian derivatives use mauk and dash where the LFS build requires gawk and bash, so that has to be corrected. Early in the book, there is a list of the packages you need to have on your host system and how to test that you have them. You evidently did not go through this section and that is why you are having problems now. |
All times are GMT -5. The time now is 04:49 PM. |