Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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).
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?
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.
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).
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?
-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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.