LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-19-2010, 12:55 PM   #1
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Rep: Reputation: 0
mkdir: permission denied during binutils make install


Hello, I'm trying for the second time to build lfs and I'm using the development version of LFS: SVN-20100923.

In chapter 5.4 begins the compiling operation and I'm sure enough to have followed the book so far.

the configure and the make parts went well, but the creation of a symlink to ensure the sanity of the toolchain, and the "make install" command not.

Code:
lfs@Slevin:/mnt/lfs/sources/binutils-build$ case $(uname -m) in
> x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;;
> esac
mkdir: cannot create directory `/tools/lib': No such file or directory
lfs@Slevin:/mnt/lfs/sources/binutils-build$
Code:
lfs@Slevin:/mnt/lfs/sources/binutils-build$ make install
make[1]: Entering directory `/mnt/lfs/sources/binutils-build'
/bin/bash ../binutils-2.20.1/mkinstalldirs /tools /tools
mkdir -p -- /tools /tools
mkdir: cannot create directory `/tools': Permission denied
mkdir: cannot create directory `/tools': Permission denied
make[1]: *** [installdirs] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build'
make: *** [install] Error 2
lfs@Slevin:/mnt/lfs/sources/binutils-build$
As you can see all the packages are in $LFS/sources

 
Old 10-19-2010, 01:42 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Did you use any of the advise given in your previous thread/try?

Looking at the errors from both commands it looks like you skipped 4.2. Creating the $LFS/tools Directory or the chown commands from 4.3. Adding the LFS User.

Similar to my previous reply. I do hope your not still using sudo......

Hope this helps.
 
Old 10-19-2010, 02:37 PM   #3
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

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

Did you use any of the advise given in your previous thread/try?

Looking at the errors from both commands it looks like you skipped 4.2. Creating the $LFS/tools Directory or the chown commands from 4.3. Adding the LFS User.

Similar to my previous reply. I do hope your not still using sudo......

Hope this helps.
I completely forget that messages.. You're right druuna, I used againg sudo. I've got other 2 questions.. considering that i've used only sudo as root, what's the best thing I can do to remedy?? (ex delete something or restart from a point).. when I restart to work with lfs I have to give again the command to use the bash of the user lfs??
Code:
source ~/.bash_profile
Thanks again druuna!!

Last edited by andrea_g90; 10-19-2010 at 02:42 PM.
 
Old 10-19-2010, 03:06 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You first need to redo chapter 4.
Become root (su - and not sudo su or sudo su -!) and start from chapter 4.1. You might get some "already exist" messages, ignore those. At the end of chapter 4.3 you start using the lfs user and can do chapters 4.4 and 4.5.

Now you can start with 5.4 (still as user lfs).

If you want to stop anywhere during chapter 5 and continue later on: Become user lfs again and continue where you left off. No need to parse any file (the environment is set when you become the lfs user).

BTW: Restarting during chapter 6 is a different story. We'll tackle that once you get there.

Hope this helps.
 
Old 10-19-2010, 03:16 PM   #5
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
I've got one other problem, I haven't set already the root user in fact i haven't got any password for "su", but I've got one for "sudo su" that it's the same of main user!! There is a way to set the root user or i can simply give "sudo su"???
 
Old 10-19-2010, 03:26 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I would strongly suggest you use the LFS liveCD instead of ubuntu. A tip that was also given in your previous thread.

If you still do want to continue with ubuntu make sure it complies to build LFS (vii. Host System Requirements). Deviating from these requirements will get you into trouble later on.

Enabling ubuntu root account: Enable and Disable Ubuntu Root Password.

Hope this helps.
 
Old 10-19-2010, 03:46 PM   #7
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
I've taken all the precautions ("Believe/Hope") for ubuntu.. the only thing that could cause me some problems is gcc, even if it's regular for the book..

Code:
andrea@Slevin:~$ gcc --version
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
andrea@Slevin:~$
Anyway thanks for your help I have appreciated very much. I hope that it's all for the moment... bye
 
Old 10-20-2010, 06:30 AM   #8
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Root account works very well, and I've just compiled binutils, gcc and api headers but I don't understand one thing.

cap 5.7.1
Code:
case `uname -m` in
i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;;
esac
I haven't given this command cause I don't know what I have to replace in this text for my architecture. I suppose :
Code:
case `uname -m` in
i?86) echo "CFLAGS += -march=i686 -mtune=native" > configparms ;;
esac


intel core 2 duo..on ubuntu 64 bits and i want to compile a pure 64 bits lfs system!!
 
Old 10-20-2010, 06:57 AM   #9
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by andrea_g90 View Post
Root account works very well, and I've just compiled binutils, gcc and api headers but I don't understand one thing.

cap 5.7.1
Code:
case `uname -m` in
i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;;
esac
I haven't given this command cause I don't know what I have to replace in this text for my architecture. I suppose :
Code:
case `uname -m` in
i?86) echo "CFLAGS += -march=i686 -mtune=native" > configparms ;;
esac


intel core 2 duo..on ubuntu 64 bits and i want to compile a pure 64 bits lfs system!!
Hi,

you are not supposed to replace anything in that command. Just issue it as is.

Also, you are not supposed to work as root in chapter 5. You are supposed to do the complete chapter as user 'lfs'.
 
Old 10-20-2010, 07:05 AM   #10
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
so "-march=i486"?? It seems strange but.. ok thanks I'll do it, however I haven't used root account for 5th cap.
 
Old 10-20-2010, 07:19 AM   #11
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Then I misunderstood. This
Quote:
Root account works very well, and I've just compiled binutils, gcc and api headers
sounded like you compiled the packages as root.
 
Old 10-20-2010, 07:41 AM   #12
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by crts View Post
Then I misunderstood. This

sounded like you compiled the packages as root.
Yes..... You're right
 
Old 10-20-2010, 08:46 AM   #13
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
cap 5.11 Tcl compilation: "./config" and "make" goes well, but the test exits with errors:
Code:
Test files exiting with errors:  

  http.test

  httpold.test

  socket.test
Is it a big mistake or can I continue??? Thanks for your patience..
 
Old 10-20-2010, 08:52 AM   #14
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
As the book says, running the test suites on the toolchain is not mandatory. Some failures are even expected. If there weren't any failures during configure and make then you should be OK.
 
Old 10-20-2010, 08:59 AM   #15
andrea_g90
Member
 
Registered: Mar 2010
Posts: 34

Original Poster
Rep: Reputation: 0
thanks
 
  


Reply



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
mkdir permission denied rmorgan1016 Linux - Newbie 2 07-30-2005 08:46 PM
mkdir ../binutils-build gives me "Permission Denied"!!! matthewa Linux From Scratch 16 06-29-2005 07:00 AM
MPlayer "make install" Permission denied. Belgium! Chrax Linux - General 2 09-09-2004 07:22 PM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 04:07 AM
mkdir ../binutils-build permission denied TheBman Linux From Scratch 11 02-16-2004 08:39 AM

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

All times are GMT -5. The time now is 07:22 AM.

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