Installation of binutils....can't mkdir...../binutils-build
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.
Installation of binutils....can't mkdir...../binutils-build
Hey all
trouble at first command of chapter 5
Have followed the book all the way, w/ a prompt of
lfs:~$
pwd= /home/lfs
error= mkdir: cannot create directory '../binutils-build': Permission denied
last completed command was source ~/.bash_profile
way to early to be screwing up!
ps just noticed that /home/lfs is on host system...if that right?
The build instructions assume that you are using the bash shell. There is also a general expectation that you have already unpacked the sources for a package and have performed a cd into the unpacked source directory before issuing the build commands.
For each of the sections, you must first extract the package and cd into the directory that is created. So you should be in /home/lfs/binutils-### when you issue the 'mkdir ../binutils-build' command.
Quote:
ps just noticed that /home/lfs is on host system...if that right?
That depends on the value of $LFS. If you follow the book, then $LFS=/mnt/lfs, so having /home/lfs on the host system (partition) is no problem. If you're going out on your own and have set $LFS=/home/lfs, then this should be the mount point for your new partition. Read back through Chap.3 'Mounting the New Partition'.
>>For each of the sections, you must first extract the package and cd into the directory that is created. So you should be in /home/lfs/binutils-### when you >issue the 'mkdir ../binutils-build' command.
Since I got an error about permissions in /home/lfs on my host, and I figured I was in the wrong place anyway, I went to /mnt/lfs/sources (where i had DL'd the sources, I made directories off there. (still am not sure if I should of untar'd from /mnt/lfs/sources, as your responce suggests, or untar into the directories the book said to make, ie ../binutils-build, ../gcc-build, and so on.) which is what I did.
>>That depends on the value of $LFS. If you follow the book, then $LFS=/mnt/lfs, so having /home/lfs on the host system (partition) is no problem. If you're going >out on your own and have set $LFS=/home/lfs, then this should be the mount point for your new partition. Read back through Chap.3 'Mounting the New >Partition'.
I may have done an 'export $LFS=/mnt/lfs', which I see now should of been 'export LFS=/mnt/lfs', wherein may lie the problem.
At Part II: Preparing the build, it read," you are expected to have already unpacked it (explained shortly) as user lfs." I still of yet haven't seen the 'explained shortly' part, so having some familarity with GNU/OS, tried to read the authors mind, I was reading from 5.1.1, but went back to 5.0 which clarified things a little,
and am going back further.
You're a little closer, but just shy of the mark. You do want to extract the packages within /mnt/lfs/sources and then cd to the directory that this extraction will create, namely: /mnt/lfs/sources/binutils-2.14.
That is where you execute the command 'mkdir ../binutils-build' which will create /mnt/lfs/sources/binutils-build.
Then the next command is 'cd ../binutils-build', so you should then be in /mnt/lfs/sources/binutils-build which is where you run the configure, make, and make install, etc.
Notice that the actual configure command is:
../binutils-2.14/configure --prefix=/tools --disable-nls
Since you are executing this from within /mnt/lfs/sources/binutils-build, this is the same as:
/mnt/lfs/sources/binutils-2.14/configure --prefix=/tools --disable-nls
The /mnt/lfs/sources/binutils-build directory is where the actual build will take place, but it will be building from the source which you extracted to /mnt/lfs/sources/binutils-2.14.
I hope this makes things clearer. Sometimes when I finish an explanation, even I'm more confused than when I began :-)
Thanks,
Sometimes I really doubt my reading comprehension skills, your explaination makes it more than clear.
>> You do want to extract the packages within /mnt/lfs/sources and then cd to the directory that this extraction will create, namely: /mnt/lfs/sources/binutils-2.14.
>>That is where you execute the command 'mkdir ../binutils-build' which will create /mnt/lfs/sources/binutils-build.
>>Then the next command is 'cd ../binutils-build', so you should then be in /mnt/lfs/sources/binutils-build which is where you run the configure, make, and make install, etc.
Originally posted by Cerbere
From Chapter 5 Introduction:
Quote:
The build instructions assume that you are using the bash shell. There is also a general expectation that you have already unpacked the sources for a package and have performed a cd into the unpacked source directory before issuing the build commands.
That's from LFS Book 5.0.
In 5.1.1, Chapter 5 Introduction:
Quote:
Before issuing the build instructions for a package, you are expected to have already unpacked it (explained shortly) as user lfs, and to have performed a cd into the created directory. The build instructions assume that you are using the bash shell.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.