LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 05-12-2012, 11:46 PM   #1
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Rep: Reputation: Disabled
binutils cannot open: Permission denied error.


Though I am a newbie, I am in the task of building my own Linux using the book LFS.
I met with the following error in chapter 5.4.1 . When I did the code
Code:
mkdir -v ../binutils-build
The error was:
Code:
lfs@debian:/mnt/lfs/sources$ tar -jxf binutils-2.22.tar.bz2
tar (child): binutils-2.22.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
When I checked ls -l, the permissions was set to root. But I have already done the codes
Code:
chown -v lfs $LFS/tools
chown -v lfs $LFS/sources
Why is it that the permissions are set to root ?

Why is it that I cannot continue ?
 
Old 05-13-2012, 01:26 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,642
Blog Entries: 1

Rep: Reputation: 229Reputation: 229Reputation: 229
Hi

What version of LFS are you doing?
You should also be in the binutiles-build dir

Code:
mkdir -v ../binutils-build
cd ../binutils-build
When you untar you then cd into the created dir before continuing with the chapter

Sorry misread your post, Did you do all of chapter4.3

the chown of LFS/tools and LFS/sources

Last edited by spiky0011; 05-13-2012 at 01:32 AM. Reason: Misread OP
 
Old 05-13-2012, 02:20 AM   #3
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

What version of LFS are you doing?
You should also be in the binutiles-build dir

Code:
mkdir -v ../binutils-build
cd ../binutils-build
When you untar you then cd into the created dir before continuing with the chapter

Sorry misread your post, Did you do all of chapter4.3

the chown of LFS/tools and LFS/sources

yes, I rectified that error.
I am using version 7.1
Now I got another problem...
My problem is, when in chapter 5.4.1, when running
Code:
../binutils-2.22/configure \--target=$LFS_TGT --prefix=/tools \--disable-nls --disable-werror
I get the following output
Code:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... no
checking for mawk... mawk
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/mnt/lfs/sources/binutils-build':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
If i ignore the warnings and continue with 'make', I get the following error
Code:
make: *** No targets specified and no makefile found.  Stop.
 
Old 05-13-2012, 02:49 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,642
Blog Entries: 1

Rep: Reputation: 229Reputation: 229Reputation: 229
Hi

Did you make sure your host system was compatible
here
 
Old 05-13-2012, 03:00 AM   #5
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

Did you make sure your host system was compatible
here

The prerequisites aren't met. How to install all those files at once ? Will it be possible to do it just by running sudo apt-get update && apt-get upgrade ?
 
Old 05-13-2012, 03:05 AM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,642
Blog Entries: 1

Rep: Reputation: 229Reputation: 229Reputation: 229
Hi

I take it your using Ubuntu as host, I had trouble with make info failing on Ubuntu, Debain was easier to use.

FYI

Just installed texinfo from software manager it cleared version-check
(maybe something went wrong last time)

Last edited by spiky0011; 05-13-2012 at 03:22 AM. Reason: Aded info to help
 
Old 05-14-2012, 01:12 AM   #7
roshgorg
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
I abandoned that project, and started with a fresh LFS.

Now I am at Binutils-2.22 - Pass 1 , that is at chapter 5.4.1
After creating the directory binutils-build, ans issueing the command
Code:
../binutils-2.22/configure \
--target=$LFS_TGT --prefix=/tools \
--disable-nls --disable-werror
I get the following error
Code:
lfs@debian:/mnt/lfs/sources/binutils-build$ ../binutils-2.22/configure \
> --target=$LFS_TGT --prefix=/tool \
> --disable-nls --disable-werror
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: in `/mnt/lfs/sources/binutils-build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
1) Why is this? I didn't met with such an error in my previous attempt.

2) Also, when running commands that extend to multiple lines with \ at the end, what am I supposed to do ? That is, whether, I should press enter key and continue with the next line, ar put no space between (\) and the enxt character ?
 
Old 05-14-2012, 12:49 PM   #8
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,642
Blog Entries: 1

Rep: Reputation: 229Reputation: 229Reputation: 229
Hi

I dont know whats wrong with your build, Maybe pastebin the config file might help.
Also can you post the output of the version-check.
Yes with the \ that is correct a space then \ then enter which will let you continue on next line
--target=$LFS_TGT --prefix=/tools \
A space between tools and \
 
Old 05-14-2012, 05:15 PM   #9
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 465

Rep: Reputation: 133Reputation: 133
When I searched for "configure: error: C compiler cannot create executables", I saw it discussed fairly often. A common issue that I saw was some compiler component missing from the host system. Try confirming that you've installed the things you need to compile source in Debian. I haven't used Debian in a while, so I don't remember what those things are. In Fedora, for example (since I know it better), it's things like the Development Tools group, Development Libraries group, kernel-devel, kernel-headers. Those aren't installed by default in Fedora. The idea will probably be similar in Debian but the things will called something else. It might be things like build-essential, dpkg-dev, fakeroot, etc. Maybe a Debian expert will show up with the precise details. Anyway, this is what I would at least investigate. I predict that until you do that, you couldn't compile anything in your Debian system whether it be for LFS or the Debian system itself.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 -v ../binutils-build' : Permission denied mich04 Mandriva 3 12-18-2011 02:27 PM
[SOLVED] mkdir: permission denied during binutils make install andrea_g90 Linux From Scratch 36 11-06-2010 03:31 PM
Apache 2 - RHEL4u5 - Permission denied: httpd: could not open error file vishwakumarbg Other *NIX 4 09-15-2008 02:36 PM
mkdir ../binutils-build gives me "Permission Denied"!!! matthewa Linux From Scratch 16 06-29-2005 07:00 AM
mkdir ../binutils-build permission denied TheBman Linux From Scratch 11 02-16-2004 08:39 AM


All times are GMT -5. The time now is 09:06 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration