QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1029|回复: 5

LFS 6.1 -bash: ../binutils-2.1

[复制链接]
发表于 2005-7-18 23:57:26 | 显示全部楼层 |阅读模式
Hi folks,

FC3 Host
LFS 6.1

I deleted LFS 6.0 after encountering several problems without solution during its building.  Then I started LFS 6.1 and still found captioned problem;

Steps performed as follows (in short)
[code:1][satimis@localhost ~]$ su -
Password:
[root@localhost ~]# export LFS=/mnt/lfs
[root@localhost ~]# mount /dev/hda6 $LFS
[root@localhost ~]# mkdir -p $LFS
[root@localhost ~]# mkdir $LFS/sources
[root@localhost ~]# chmod a+wt $LFS/sources
[root@localhost ~]# chown lfs $LFS/sources
[root@localhost ~]# su - lfs
lfs:~$ cd /mnt/lfs/sources/
lfs:/mnt/lfs/sources$ tar jxvf binutils-2.15.94.0.2.2.tar.bz2   
lfs:/mnt/lfs/sources$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied
lfs:/mnt/lfs/sources$ su -
Password:
[root@localhost ~]# cd /mnt/lfs/sources/
[root@localhost sources]# mkdir ../binutils-build
[root@localhost sources]# cd ../binutils-build
[root@localhost binutils-build]# ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls
-bash: ../binutils-2.15.94.0.2.2/configure: No such file ordirectory[/code:1]Please advise how to fix it.

TIA

B.R.
satimis
发表于 2005-7-19 10:08:25 | 显示全部楼层
lfs:~$ cd /mnt/lfs/sources/
lfs:/mnt/lfs/sources$ tar jxvf binutils-2.15.94.0.2.2.tar.bz2   

At this moment, change you work directory to binutils-2.15.94.0.2.2:
lfs:/mnt/lfs/sources$cd binutils-2.15.94.0.2.2
lfs:/mnt/lfs/sources$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied
lfs:/mnt/lfs/sources$ su -
回复

使用道具 举报

 楼主| 发表于 2005-7-19 19:17:56 | 显示全部楼层
Hi blackwolf,

Tks for your advice.

lfs:~$ cd /mnt/lfs/sources/
lfs:/mnt/lfs/sources$ tar jxvf binutils-2.15.94.0.2.2.tar.bz2   
I did it without problom.

At this moment, change you work directory to binutils-2.15.94.0.2.2:
lfs:/mnt/lfs/sources$cd binutils-2.15.94.0.2.2
Also no problem.

The trick is here[code:1]lfs:/mnt/lfs/sources$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied
lfs:/mnt/lfs/sources$ su -[/code:1]"su -" will go to the Root environment of FC3, the Host, not LFS.

The book is incorrect here;
5.3. Binutils-2.15.94.0.2.2 - Pass 1
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass1.html

It suggests to run;
[code:1]mkdir ../binutils-build
cd ../binutils-build[/code:1]
It goes to the Root environment of the Host, FC3.  

The correct command should be;
[code:1]mkdir binutils-build
cd binutils-build/[/code:1]Then following commands worked seamlessly;
[code:1]lfs:/mnt/lfs/sources/binutils-build$ ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls
lfs:/mnt/lfs/sources/binutils-build$ make
lfs:/mnt/lfs/sources/binutils-build$ make install
lfs:/mnt/lfs/sources/binutils-build$ make -C ld clean
lfs:/mnt/lfs/sources/binutils-build$ make -C ld LIB_PATH=/tools/lib[/code:1]
It took me one whole day to figure it out.

B.R.
satimis
回复

使用道具 举报

发表于 2005-7-19 23:26:19 | 显示全部楼层
The trick is here
代码:
lfs:/mnt/lfs/sources$ mkdir ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied
lfs:/mnt/lfs/sources$ su -

The first line shows that you are in the /mnt/lfs/sources

And the second line shows you want to make a dir "../binutils-build", so what is the dir you want to make ? ---------------> /mnt/lfs/binutils-build.  Do you have the correct  MAC (Modifiy Access Control)?  i think is not, heh.

In the handbook of LFS , there is a line said :" When you untar a file , chang dir to the dir you extracted before, and then do the mkdir make make instll"

Good luck
回复

使用道具 举报

发表于 2005-7-20 12:10:17 | 显示全部楼层
run the command as below:

~ $ cd $LFS/sources
/mnt/lfs/sources $ tar xvf binutils....
/mnt/lfs/sources $ cd binutils....
/mnt/lfs/sources/binutils... $ mkdir ../binutils-build
/mnt/lfs/sources/binutils... $ cd ../binutils-build
/mnt/lfs/sources/binutils-build $ ../binutils.../configure ....
/mnt/lfs/sources/binutils-build $ make
/mnt/lfs/sources/binutils-build $ make install
.......
回复

使用道具 举报

 楼主| 发表于 2005-7-20 15:26:02 | 显示全部楼层
Hi blackwolf,

Tks for your advice.

~ $ cd $LFS/sources
/mnt/lfs/sources $ tar xvf binutils....
/mnt/lfs/sources $ cd binutils....
/mnt/lfs/sources/binutils... $ mkdir ../binutils-build
/mnt/lfs/sources/binutils... $ cd ../binutils-build
/mnt/lfs/sources/binutils-build $ ../binutils.../configure ....
/mnt/lfs/sources/binutils-build $ make
/mnt/lfs/sources/binutils-build $ make install
.......

Tks for your advice.

IIRC on LFS 6.0 I ran the above commands and got through without problem.

Now I'm building LFS 6.1 and following its book.  According to;
4.3. Adding the LFS User
http://www.linuxfromscratch.org/lfs/view/stable/chapter04/addinguser.html

I followed the steps as instructed.  After "su - lfs"

lfs:~$
prompted

to proceed other steps in the subsequent Sections upto "5.3. Binutils-2.15.94.0.2.2 - Pass 1" I came to the deadknot as described on my first posting.

Now I have the problme mentioned solved and am prepared to move on to "5.4. GCC-3.4.3 - Pass 1".

B.R.
satimis
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-4 22:27 , Processed in 0.043977 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表