LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-14-2009, 08:31 AM   #1
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Rep: Reputation: 16
Getting an error with Binutils, chapter 5.4


I'm doing LFS a second time (it was fun), and I'm getting an error while configuring Binutils for the first time. Actually, it seems like a harmless error, but I'll post it just in case. This is output from the configure script:
Code:
# Lots of stuff
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
./config.status: creating Makefile
rm: cannot remove `*.core': Protocol error
Is this relevant?
 
Old 07-14-2009, 02:12 PM   #2
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
Are you sure this isn't some test that fails?
Configure scripts allways test the complete environment to see what is possible and what not.
Couldn't this be a case in which your platform doesn't support the action?

BTW I'm just guessing here. To realy solve your 'problem' some extra info is needed.
Like what exactly goes wrong, what commands you are running and are you sure all previous packages installed correctly.
 
Old 07-14-2009, 06:32 PM   #3
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
The requirements are fine, but some of the packages in my host are newer than the recommended (for example, Binutils is 2.19.1 and GCC is 4.3.3). Maybe that's the problem. How would I fix this? Downloading an older version from source and compiling? Maybe I can downgrade the OS (I'm running Ubuntu 9.04, I'll have to see what packages 8.04 provides).
 
Old 07-15-2009, 11:06 AM   #4
Trickie
Member
 
Registered: Sep 2004
Posts: 38

Rep: Reputation: 23
You're just guessing; as hoes said: you haven't provided enough information. Usually if something cannot be removed it's a permissions problem.

Richard
 
Old 07-15-2009, 11:15 AM   #5
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
The command is exactly what it says in the book:
Code:
CC="gcc -B/usr/bin/" ../binutils-2.18/configure \
    --prefix=/tools --disable-nls --disable-werror
I applied the patch to the source and then moved to an empty "binutils-build" directory, where I ran that last command. The output of configure was normal until that point. I have 777 permissions on this directory. I really don't know what else to say.

One thing I noticed is the following: If in an empty directory you try to remove files by means of a wildcard (for example, "rm *.py"), you get the Protocol Error. Maybe this has something to do with it?
 
Old 07-17-2009, 08:20 PM   #6
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
Do you need more information?
 
Old 07-18-2009, 11:24 AM   #7
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
I tried configuring too, but didn't get your error.
I'm running a 2.6.26-2-686 Debian kernel.
Could you check what your version of binutils and coreutils is?
Mine are version 2.18.0.20080103 of binutils and version 6.10 of coreutils.

The problem you have also appeared in a different context.
Maybe you should have a look at that:
http://forums.virtualbox.org/viewtopic.php?f=3&t=12274
 
Old 07-18-2009, 06:43 PM   #8
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
Binutils: 2.19.1
Coreutils: 6.10
Xubuntu 9.04

And actually, it's exactly the same context. I'm running this in a VM, using a shared folder for the "sources" directory. It only happens if you use a wildcard and no files that match it are present. I guess I can live with this (doesn't seem to be too bad).
 
Old 07-18-2009, 07:34 PM   #9
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
However, make doesn't like it:

Code:
lfs@javier:/mnt/lfs/sources/binutils-build$ make -C ld clean
make: Entering directory `/mnt/lfs/sources/binutils-build/ld'
Making clean in po
make[1]: Entering directory `/mnt/lfs/sources/binutils-build/ld/po'
rm -f core core.* *.pox ld.po *.old.po cat-id-tbl.tmp
rm: cannot remove `core.*': Protocol error
rm: cannot remove `*.pox': Protocol error
rm: cannot remove `*.old.po': Protocol error
make[1]: *** [mostlyclean] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build/ld/po'
make: *** [clean-recursive] Error 1
make: Leaving directory `/mnt/lfs/sources/binutils-build/ld'
How important is it that make clean works right? Logically, if the error happens only when there are no files to remove, there are two choices:
-It's alright, since if it wants to delete it and it's not there, no problem.
-It's bad, because those files should be there but aren't.

So what should I do? Just continue with this, and ignore the rm errors?
 
Old 07-20-2009, 01:11 AM   #10
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
Quote:
-It's alright, since if it wants to delete it and it's not there, no problem.
-It's bad, because those files should be there but aren't.
What you say here doesn't hold.
I think that the files don't really need to be here, but rm should not give an error. The -f flag is used meaning it will always delete and not complain when nothing is there. However in your case it does complain.

Judging by all this I presume the error is mainly in rm.
Therefore in theory you should be able to build the program, IF all else is right. However that also means that your configure script should run completely and not halt as a result of the rm -f *.core error.

Some new things I just thought off: on what kind of drive are you installing LFS(USB/HD, ext3,ext2) and how is it mounted (rw, ro) and do you have a sticky bit set somewhere?

That's about all I can think of now, good luck
 
Old 07-20-2009, 09:06 AM   #11
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
Well, it didn't seem like configure was halted by the error, just make clean. But whatever.

The drive is a 5 GB drive formatted as ext3, mounted as "(rw,relatime,errors=remount-ro)". I don't see any sticky bit.

The sources folder, where I am building binutils (actually, it's in a subdirectory), is a Virtual Box shared folder, mounted as rw. Everything inside /mnt/lfs belongs to user lfs, who has full permissions over everything.
 
Old 07-21-2009, 09:00 PM   #12
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
I tried going on with the Binutils build, and except this, I've gotten no errors. How can I test if ld was correctly compiled and installed?
 
Old 07-22-2009, 04:24 AM   #13
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 190

Rep: Reputation: 51
First a small remark.
It seems that something is wrong with your rm that makes it complain when there are no files to delete.
This probably doesn't interfere with the compiling of a program.
But this could give rise to different problems.

Now back to the new question, testing whether binutils installed well.

You could have tried the make check command if your system has Tcl, expect and dejagnu installed.
I think it should also be possible to do make check after you have done make install.
Otherwise just rerun the compilation.

You could also play a bit with readelf.
It gives information about binaries.
Try for instance: readelf -l /bin/bash, which for me gives this:


Code:
Elf file type is EXEC (Executable file)
Entry point 0x805f500
There are 8 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x08048034 0x08048034 0x00100 0x00100 R E 0x4
  INTERP         0x000134 0x08048134 0x08048134 0x00013 0x00013 R   0x1
      [Requesting program interpreter: /lib/ld-linux.so.2]
  LOAD           0x000000 0x08048000 0x08048000 0xa5da0 0xa5da0 R E 0x1000
  LOAD           0x0a6000 0x080ee000 0x080ee000 0x04b44 0x09878 RW  0x1000
  DYNAMIC        0x0a6014 0x080ee014 0x080ee014 0x000e0 0x000e0 RW  0x4
  NOTE           0x000148 0x08048148 0x08048148 0x00020 0x00020 R   0x4
  GNU_EH_FRAME   0x0a5cd8 0x080edcd8 0x080edcd8 0x0002c 0x0002c R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

 Section to Segment mapping:
  Segment Sections...
   00
   01     .interp
   02     .interp .note.ABI-tag .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
   03     .ctors .dtors .jcr .dynamic .got .got.plt .data .bss
   04     .dynamic
   05     .note.ABI-tag
   06     .eh_frame_hdr
   07
Doing more test will be difficult. Binutils is an important package for your system that also works together with the compiler. I know to little to recommend further testing, but in your situation I would just continue building the rest and keep checking if everything works. Odds are everything will just compile.

With this your problem with rm isn't solved yet, however.
 
Old 07-24-2009, 09:39 PM   #14
31tempe
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Rep: Reputation: 0
perfect solution!!

There are a variety of possible operating systems which can be installed on a personal computer. As an alternative to Linux you may wish to consider Microsoft Vista. Although it certainly is more expensive, it is professionally written and you will find that all of the unfortunate issues and problems you are experiencing will simply disappear when using a quality operating system.

cheers
 
Old 07-24-2009, 10:39 PM   #15
ReyJavikVI
Member
 
Registered: Jun 2009
Posts: 67

Original Poster
Rep: Reputation: 16
I'm not sure if that was a joke.
 
  


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
lfs-6.3 - chapter 6: binutils-2.17 - make error regarding libbfd-2.17.so :not found me-$-on Linux From Scratch 5 07-02-2009 02:49 PM
binutils compile error... chapter 5... newbie need help jaydoc Linux From Scratch 7 01-27-2009 04:15 AM
LFS 6.4 Chapter 5.4. Binutils-2.18 - Pass 1 gazza1z Linux From Scratch 2 01-23-2009 11:16 AM
can't compile binutils (chapter 6) alaios Linux From Scratch 2 03-24-2004 04:00 PM
binutils chapter 5 pass 2 qod Linux From Scratch 3 11-03-2003 12:39 PM

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

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