LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-05-2005, 03:12 PM   #1
rvijay
Member
 
Registered: Aug 2003
Location: Quebec, Canada
Distribution: Debian HD install of Knoppix 5.0.1
Posts: 921
Blog Entries: 24

Rep: Reputation: 64
Question Startup Problem: Binutils


Background Info.:
a). My parent system is Damn Small Linux Version 8.4

b) LFS: Version 5.1.1

c) I read the FAQ but couldn't find direct solutions to my problem. I feel that I am getting stuck a bit at the start and a little assistance at the start will help me proceed further.

I made the directory binutils-build and cd into it.
Then I gave the following command with the following output/error messages:

lfs@5[binutils-build]$ time { ./configure ... && ... && ... && make install; }
bash: ./configure: No such file or directory
real 0m0.032s
user 0m0.000s
sys 0m0.010s
0.010s

lfs@5[binutils-build]$ ../binutils-2.14/configure --prefix=/tools --disable-nls
loading cache ./config.cache
checking host system type... i586-pc-linux-gnuoldld
checking target system type... i586-pc-linux-gnuoldld
checking build system type... i586-pc-linux-gnuoldld
../binutils-2.14/configure: line 2206: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.


Also, I wish to add LFS to the list of SUDOers.

Please Assist.

Thanks.

Vijay
 
Old 02-05-2005, 03:29 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
What is the value of this variable ('echo $CC')? Does it point to gcc?
 
Old 02-05-2005, 03:35 PM   #3
rvijay
Member
 
Registered: Aug 2003
Location: Quebec, Canada
Distribution: Debian HD install of Knoppix 5.0.1
Posts: 921

Original Poster
Blog Entries: 24

Rep: Reputation: 64
I tried it. It doesn't point to anything.

lfs@5[binutils-build]$ echo $CC

lfs@5[binutils-build]$

Also what about the first error ?

Please assist.

Thanks.

Vijay
 
Old 02-05-2005, 03:54 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
First error:
Quote:
lfs@5[binutils-build]$ time { ./configure ... && ... && ... && make install; }
bash: ./configure: No such file or directory
You just made this directory right? So there's nothing in it so "./configure" is going to fail and give you the error that it did. From your second example it appears you need to run "../binutils-2.14/configure" instead of "./configure".

As for CC, just find where gcc is, and make that path the value of CC:
Code:
# export CC=/path/to/gcc
 
Old 02-05-2005, 04:21 PM   #5
rvijay
Member
 
Registered: Aug 2003
Location: Quebec, Canada
Distribution: Debian HD install of Knoppix 5.0.1
Posts: 921

Original Poster
Blog Entries: 24

Rep: Reputation: 64
Error 1.

Tried suggested solution. Comming closer.

lfs@5[binutils-2.14]$ time { ./configure ... && ... && ... && make install; }
./configure: line 422: ./config.log: Permission denied

real 0m0.093s
user 0m0.060s
sys 0m0.030s

Error 2.
Couldn't find gcc. Searched all main directories manually as well used the where is and find commands.
Only thing is that in /lib there is a file called libgcc_s.so.1
Checked my host distro home page to ensure. It does use gcc 3.3.1.

Please assist.

Thanks.

Vijay

Last edited by rvijay; 02-05-2005 at 04:22 PM.
 
Old 02-05-2005, 05:28 PM   #6
rvijay
Member
 
Registered: Aug 2003
Location: Quebec, Canada
Distribution: Debian HD install of Knoppix 5.0.1
Posts: 921

Original Poster
Blog Entries: 24

Rep: Reputation: 64
I added lfs to the sudoers list and tried Command 1 again:
Here is the output:
lfs@8[binutils-2.14]$ sudo time { ./configure ... && ... && ... && make install; }
bash: syntax error near unexpected token `}'

Please assist.

Thanks.

Vijay
 
Old 02-05-2005, 09:13 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Code:
lfs@8[binutils-2.14]$ sudo time { ./configure ... && ... && ... && make install; }
You aren't running this literally are you? It isn't a valid command. I don't understand why you need to time the command anyway. And you shouldn't have to use sudo. Which part of the book are you working on?
 
Old 02-06-2005, 12:18 AM   #8
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
IIRC damn small linux doesn't come with a compiler..
 
Old 02-06-2005, 07:43 AM   #9
rvijay
Member
 
Registered: Aug 2003
Location: Quebec, Canada
Distribution: Debian HD install of Knoppix 5.0.1
Posts: 921

Original Poster
Blog Entries: 24

Rep: Reputation: 64
This was very true. I installed Knoppix to my Hard Drive and this has the gcc compiler.

However, I am having other problems.


lfs@ttyp0[binutils-build]$ { ./configure ... && ... && ... && make install; }
bash: ./configure: No such file or directory
lfs@ttyp0[binutils-build]$ ../binutils-2.14/configure --prefix=/tools --disable-nls
bash: ../binutils-2.14/configure: No such file or directory
lfs@ttyp0[binutils-build]$ cd
lfs@ttyp0[~]$ cd /mnt/hdb5/lfs-packages/binutils-2.14
lfs@ttyp0[binutils-2.14]$ ../binutils-2.14/configure --prefix=/tools --disable-nls
../binutils-2.14/configure: line 422: ./config.log: Read-only file system
lfs@ttyp0[binutils-2.14]$ make configure-host
make: *** No rule to make target `configure-host'. Stop.
lfs@ttyp0[binutils-2.14]$ make LDFLAGS="-all-static"
make: *** No targets specified and no makefile found. Stop.


In my /etc/fstab. other than cdrom, there are no read only file systems. Also there is no file called config.log

I added user lfs to sudoers file. Also gave write permission to directory config in the ../binutils-2.14
Nothing seems to help to change the file from Read only. Please assist.

Vijay
 
Old 02-06-2005, 05:51 PM   #10
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally posted by rvijay
This was very true. I installed Knoppix to my Hard Drive and this has the gcc compiler.

However, I am having other problems.


lfs@ttyp0[binutils-build]$ { ./configure ... && ... && ... && make install; }
bash: ./configure: No such file or directory
lfs@ttyp0[binutils-build]$ ../binutils-2.14/configure --prefix=/tools --disable-nls
bash: ../binutils-2.14/configure: No such file or directory
lfs@ttyp0[binutils-build]$ cd
lfs@ttyp0[~]$ cd /mnt/hdb5/lfs-packages/binutils-2.14
lfs@ttyp0[binutils-2.14]$ ../binutils-2.14/configure --prefix=/tools --disable-nls
../binutils-2.14/configure: line 422: ./config.log: Read-only file system
lfs@ttyp0[binutils-2.14]$ make configure-host
make: *** No rule to make target `configure-host'. Stop.
lfs@ttyp0[binutils-2.14]$ make LDFLAGS="-all-static"
make: *** No targets specified and no makefile found. Stop.


In my /etc/fstab. other than cdrom, there are no read only file systems. Also there is no file called config.log

I added user lfs to sudoers file. Also gave write permission to directory config in the ../binutils-2.14
Nothing seems to help to change the file from Read only. Please assist.

Vijay
I'm assuming this is the first pass.

As has been pointed out, the '{ ./configure ... && ... && ... && make install; }' is incorrect even as a copy and paste. That's simply an example of the fact that you're supposed to wrap the build sequence in braces to execute as a single command for the 'time' command to time. The reason you want to do that is to find out what your SBU is, just so the later packages' build time will let you know what you're in for. So you need to issue the literal command:
Code:
time { ../binutils-2.14/configure --prefix=/tools --disable-nls && \
make configure-host && \
make LDFLAGS="-all-static" && \
make install; }
You also should have set the $LFS variable for simplicity's sake. So, assuming /mnt/hdb5 was $LFS, you could 'cd $LFS'. However, that's probably not what it is, or should be. I'd figure you'd make a '/mnt/lfs' and mount /dev/hdb5 to that.

If binutils is version 2.14 and you unpacked that in /mnt/hdb5/linux-packages, then it's likely you created your binutils-build directory in the root - so the proper command might be '../linux-packages/binutils-$VER/configure' or something. And you shouldn't be configuring in the source directory, regardless.

I'm not sure how far you need to back up, but I'd at least keep my source tarball and *assuming this is the first shot at binutils*, rm -rf the binutils and binutils-build dir, and start that much over. The point is that you want to have an unpacked source and a build-dir (preferably right next to it) and then get into the build-dir and configure from there - so the command needs to find that file from where you are. You should not need sudo or any special perms - you're 'lfs' and the files are owned by you.

So, like I say:

Code:
tar xzf binutils-2.14

mkdir binutils-build

cd binutils-build

time { ../binutils-2.14/configure --prefix=/tools --disable-nls && \
make configure-host && \
make LDFLAGS="-all-static" && \
make install; }
(Normally, you're supposed to 'cd' into the source dir and issue commands but, in this case, it's stupid because you're just going to 'cd' back out again. So just make the build-dir and 'cd' into it directly.)

HTH
 
Old 06-15-2007, 09:54 AM   #11
finferflu
LQ Newbie
 
Registered: Jun 2006
Location: Manchester, UK
Distribution: Debian Etch / Ubuntu Feisty Fawn
Posts: 26

Rep: Reputation: 15
Thumbs up

I know this is quite a late reply, but I just wanted to say thank you for the help. I was facing this problem as well, and your reply was much more clearer than the LFS book, thanks a lot
 
  


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
LFS-5.0 GCC problem with binutils-2.14 pass 1 NCappaZoo Linux From Scratch 6 06-14-2009 04:47 AM
5.3 Binutils problem dupree Linux From Scratch 2 07-20-2005 08:36 PM
binutils problem?? alaios Linux From Scratch 4 01-17-2005 10:17 AM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 05:07 AM
LFS 5.1.1: another problem after binutils pass 2 7.e.Q Linux From Scratch 1 07-12-2004 05:37 AM

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

All times are GMT -5. The time now is 10:20 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