LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 01-03-2008, 02:13 PM   #1
jwsawyer
LQ Newbie
 
Registered: Apr 2005
Location: Katrina refugee in Iowa
Distribution: Ubuntu & Debian - Lenny
Posts: 10

Rep: Reputation: 0
Installation of Binutils error


lfs:~$ mkdir -v ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied

I followed all the directions up to this point and had no problems.
 
Old 01-03-2008, 02:47 PM   #2
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Hi,


I think that you missed the part where it says that the books assumes that you enter the source directory after decompress something, let me clarify that:
Code:
# This is what the book hopes you do everytime
tar -xvf package-1.2.tar.gz
cd package-1.2
And this is important because the if you've followed every instruction of the book, you should have a tools directory owned by the user you use to work with lfs but the same user doesn't own the root tree. So, let say you have this:
Code:
/media/lfs/tools
And 'tools' is owned by lfsuser (is an example), but 'lfs' is not owned by the same user, so, if you do this:
Code:
[root@localhost:/media/lfs/tools]: tar -xvf package-1.2.tar.gz
#and then you do this:
[root@localhost:/media/lfs/tools]: mkdir ../package-build
You'll get the permission denied error because your telling the system that it has to create the directory above the current directory, that with the above examples will be /media/lfs and not /media/lfs/tools where it should be.

So, this is what you have to do:
Code:
[root@localhost:/media/lfs/tools]: tar -xvf binutils-version.tar.gz
[root@localhost:/media/lfs/tools]: cd binutils-version
[root@localhost:/media/lfs/tools/binutils-version]: mkdir ../binutils-build
Change 'version' with the version of the package



Regards

Last edited by Acron_0248; 01-03-2008 at 02:49 PM.
 
Old 01-03-2008, 03:26 PM   #3
jwsawyer
LQ Newbie
 
Registered: Apr 2005
Location: Katrina refugee in Iowa
Distribution: Ubuntu & Debian - Lenny
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Acron_0248 View Post
Hi,


I think that you missed the part where it says that the books assumes that you enter the source directory after decompress something, let me clarify that:
Code:
# This is what the book hopes you do everytime
tar -xvf package-1.2.tar.gz
cd package-1.2
And this is important because the if you've followed every instruction of the book, you should have a tools directory owned by the user you use to work with lfs but the same user doesn't own the root tree. So, let say you have this:
Code:
/media/lfs/tools
And 'tools' is owned by lfsuser (is an example), but 'lfs' is not owned by the same user, so, if you do this:
Code:
[root@localhost:/media/lfs/tools]: tar -xvf package-1.2.tar.gz
#and then you do this:
[root@localhost:/media/lfs/tools]: mkdir ../package-build
You'll get the permission denied error because your telling the system that it has to create the directory above the current directory, that with the above examples will be /media/lfs and not /media/lfs/tools where it should be.

So, this is what you have to do:
Code:
[root@localhost:/media/lfs/tools]: tar -xvf binutils-version.tar.gz
[root@localhost:/media/lfs/tools]: cd binutils-version
[root@localhost:/media/lfs/tools/binutils-version]: mkdir ../binutils-build
Change 'version' with the version of the package



Regards
It gives me an error message saying no such file or directory. The file is binutils-2.17.tar.bz2

I used tar xzvf instead of -xvf since it was bz2

lfs:~$ tar xzvf binutils-2.17.tar.bz2
tar: binutils-2.17.tar.bz2: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors

Last edited by jwsawyer; 01-03-2008 at 03:28 PM. Reason: Added command and error message
 
Old 01-03-2008, 03:34 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You're in the lfs directory (your prompt shows lfs as the current directory), instead of the tools directory. Can you try this:
Code:
cd tools
tar -xjf binutils-2.17.tar.bz2
or
tar -xjvf binutils-2.17.tar.bz2
Then you'd use the steps that Acron_0248 describes:
Code:
cd binutils-2.17
mkdir ../binutils-build
 
Old 01-03-2008, 03:47 PM   #5
jwsawyer
LQ Newbie
 
Registered: Apr 2005
Location: Katrina refugee in Iowa
Distribution: Ubuntu & Debian - Lenny
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by gilead View Post
You're in the lfs directory (your prompt shows lfs as the current directory), instead of the tools directory. Can you try this:
Code:
cd tools
tar -xjf binutils-2.17.tar.bz2
or
tar -xjvf binutils-2.17.tar.bz2
Then you'd use the steps that Acron_0248 describes:
Code:
cd binutils-2.17
mkdir ../binutils-build
Got past this. I'm on the next step with a new error. LOL

lfs:/mnt/lfs/binutils-build$ CC="gcc -B/usr/bin/" ../binutils-2.17/configure --prefix=/tools --disable-nls --disable-werror
bash: ../binutils-2.17/configure: No such file or directory
 
Old 01-03-2008, 04:11 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The two things are related. You have created /mnt/lfs/binutils-build instead of /mnt/lfs/tools/binutils-build so the command you're running can't find /mnt/lfs/tools/binutils-2.17. If you don't have a /mnt/lfs/tools/binutils-2.17 directory then something has gone wrong and you may have missed a step from the docs.
 
Old 01-03-2008, 06:15 PM   #7
Acron_0248
Member
 
Registered: Feb 2006
Location: Venezuela
Distribution: Gentoo
Posts: 453

Rep: Reputation: 33
Use this:
Code:
CC="gcc -B/usr/bin/" ../tools/binutils-2.17/configure --prefix=/tools --disable-nls --disable-werror
You should pay more attention to directory paths while you read the book and read (and understand) the commands you're using, I'm not saying this to annoy you, but is true, the errors you're having are because you're not paying attention to directory paths




Regards
 
  


Reply

Tags
binutils



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC doesn't work Binutils configuration or installation error fadelhomsi Linux From Scratch 2 09-20-2007 08:00 AM
Installation of Binutils(configure:error:installation or configuration problem:C ...) h_r0019 Linux From Scratch 1 05-05-2007 07:40 AM
<n00b Q> 5.3.1 installation of binutils LDJ Linux From Scratch 8 03-23-2007 06:36 AM
5.3.1 Installation of Binutils microsoft/linux Linux From Scratch 8 10-22-2005 12:41 PM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration