Binutils compilation: mkdir: cannot create directory `/tools': Permission denied

jaredp webonomic at
Thu Feb 12 12:58:00 PST 2009

I appreciate the feedback.

I didn't mess up the first package.  The book never distinctly says to
cd into ../binutils-2.18 and run configure
It's not even implicitly stated.

I see now that I did run ./configure during the command
CC="gcc -B/usr/bin/" ../binutils-2.18/configure \
--prefix=/tools --disable-nls --disable-werror

I did the following:
0) currently in the untarred binutils-2.18 directory
1) patch -Np1 -i ../binutils-2.18-configure-1.patch
2) make the directory ../binutils-build
3) cd ../binutils-build
4) CC="gcc -B/usr/bin/" ../binutils-2.18/configure \
--prefix=/tools --disable-nls --disable-werror
5) make (while still in binutils-build directory)
6) make install

(when I first did it, I did time { make && make install }
I re-did everything but ran make and make install separately.
Make runs ok, but make install has the same errors:

make[1]: Entering directory `/mnt/lfs/sources/binutils-build'
/bin/bash ../binutils-2.18/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

Is it trying to create a directory in /tools?
I would think it was trying to make a directory in /mnt/lfs/tools ?


On Thu, Feb 12, 2009 at 1:02 PM, Randy McMurchy <lfs.user at> wrote:
> jaredp wrote these words on 02/12/09 13:48 CST:
>> Received a permission error while following the Binutils compilation from ch5:
>> The problem seems similar to the thread
>> What differed from the book was that the command time { ./configure
>> ... && make && make install; }.
>> wouldn't work because there was no ./configure script.  So I just did
>> the following:
>> time { make && make install; }
> Well, that's not going to work. I'll disregard all the sudo/su stuff
> you say later, as you've screwed up already without even having to
> worry about the other stuff.
> In binutils you should be in a binutils-build directory and then follow
> the book where it says to
> ../binutils-(version)/configure
> You've messed up the first package, hopefully this will be a lesson for
> you else you're in for a long, long road.
> Just follow the book for now, line by line without deviation. Once you
> learn the basics, then go back and try to do SBU calcs and other
> customizations.
> --
> Randy
> rmlscsi: [bogomips 1003.24] [GNU ld version 2.16.1] [gcc (GCC) 4.0.3]
> [GNU C Library stable release version 2.3.6] [Linux i686]
> 13:59:00 up 5 days, 6:22, 1 user, load average: 0.22, 0.23, 0.14
> --
> FAQ:
> Unsubscribe: See the above information page

More information about the lfs-support mailing list